File Coverage

blib/lib/Win32/Useful.pm
Criterion Covered Total %
statement 10 12 83.3
branch n/a
condition n/a
subroutine 4 4 100.0
pod n/a
total 14 16 87.5


line stmt bran cond sub pod time code
1             package Win32::Useful;
2            
3 2     2   1680 use strict;
  2         3  
  2         77  
4 2     2   11 use warnings;
  2         3  
  2         72  
5            
6 2     2   22 use vars qw/$VERSION/;
  2         3  
  2         119  
7             $VERSION = '0.02';
8            
9 2     2   1092 use Win32 ();
  0            
  0            
10            
11             =head1 NAME
12            
13             Win32::Useful - Collection of useful functions that extend Win32 functionality
14            
15             =head1 FUNCTIONS
16            
17             =head2 IsLastError( $errorcode )
18            
19             Checks whether or not I is equal to the the given
20             errorcode. Returns a I value if they are equal, 0 otherwise.
21            
22             Compares the values as unsigned values, so you do not have to cope
23             with I returning a signed integer.
24            
25             =cut
26            
27             sub IsLastError {
28             return sprintf("%u", shift) == sprintf("%u", Win32::GetLastError());
29             }
30            
31             =head1 AUTHOR
32            
33             Sascha Kiefer, L
34            
35             =head1 COPYRIGHT AND LICENSE
36            
37             Copyright (C) 2006 Sascha Kiefer
38            
39             This library is free software; you can redistribute it and/or modify
40             it under the same terms as Perl itself.
41            
42             =cut
43            
44             1;