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;