Skip Menu |

Preferred bug tracker

Please visit the preferred bug tracker to report your issue.

This queue is for tickets about the Mac-Errors CPAN distribution.

Report information
The Basics
Id: 3660
Status: resolved
Worked: 15 min
Priority: 0/
Queue: Mac-Errors

People
Owner: bdfoy [...] cpan.org
Requestors: cnandor [...] cpan.org
Cc:
AdminCc:

Bug Information
Severity: Important
Broken in: 0.91
Fixed in: (no value)



Subject: Some constants are missed
A bunch of constants are missed because they have no description. Here's a patch: bash-2.05a# diff -u lib/Errors.pm `pmpath Mac::Errors` --- lib/Errors.pm Tue Mar 18 11:56:36 2003 +++ /usr/local/lib/perl5/site_perl/5.8.0/Mac/Errors.pm Wed Aug 27 18:45:32 2003 @@ -87,7 +87,7 @@ sub FETCH { return $^E unless exists $MacErrors{ $^E + 0 }; - return $MacErrors{ $^E + 0 }->description; + return $MacErrors{ $^E + 0 }->description || $MacErrors{ $^E + 0 }->symbol; } constants(); @@ -96,7 +96,7 @@ { seek DATA, 0, 0; # this reads the entire script my $data = do { local $/; <DATA> }; - while( $data =~ m|=item (\w+)\s+([^\n]+)\n\s+=cut\s+sub \1 { (-?\d+) }|g ) + while( $data =~ m|=item (\w+)(?:\s+([^\n]+))?\n\s+?=cut\s+sub \1 { (-?\d+) }|g ) { my( $symbol, $desc, $value ) = ( $1, $2, $3 ); push @EXPORT_OK, $symbol;