Subject: | Getopt::Euclid dies at compile time |
Date: | Tue, 12 May 2009 13:46:45 -0400 |
To: | bug-getopt-euclid [...] rt.cpan.org |
From: | Jordan Macdonald <macdjord [...] gmail.com> |
Show quoted text
>
> jordan@jordan-pc:~/sendNAV/mine$ perl -c sendNAVReports.plx
> Uncaught exception from user code:
> Invalid [] range "{-m" in regex; marked by <-- HERE in m/\A (?: \s*
> (?:(??{exists$ARGV{q{-w[eek-ly]]}}?'(?!)':''})
> (?:-w(?:eek-ly)?])(?{($ARGV{q{-w[eek-ly]]}}||=[{}])->[-1]{q{}} = 1})
> (?:(?<!\w)|(?!\w)) (?{$ARGV{q{-w[eek-ly]]}} ||= [{}]
> })|(??{exists$ARGV{q{-t[ag] [=|:] <report_type>}}?'(?!)':''}) (?:-t(?:ag)?
> [\s\0\1]*(?:=|:)? [\s\0\1]*(?:(\S+)(?{($ARGV{q{-t[ag] [=|:]
> <report_type>}}||=[{}])->[-1]{q{report_type}} = $^N}))) (?:(?<!\w)|(?!\w))
> (?{$ARGV{q{-t[ag] [=|:] <report_type>}} ||= [{}] })|(??{exists$A at
> /usr/local/share/perl/5.8.8/Getopt/Euclid.pm line 513, <$fh> line 1.
> BEGIN failed--compilation aborted at sendNAVReports.plx line 18.
> at sendNAVReports.plx line 18
>
Situation:
Getopt::Euclid is the first use other than pragmas and constants.
POD, with human-readable content stripped:
Show quoted text> __END__
> =pod
>
> =head1 NAME
>
> sendNAVReports.plx
>
> =head1 VERSION
>
> sendNAVReports V1.0
>
> =head1 REQUIRED ARGUMENTS
>
> =over
>
> =item -s[tart] [=|:] <timestamp>
>
> BLAH BLAH BLAH
>
> =for Euclid:
> timestamp.type: integer >= 0
>
> =item -e[nd] [=|:] <timestamp>
>
> BLAH BLAH BLAH
>
> =for Euclid:
> timestamp.type: integer >= 0
>
> =item -f[ile] [=|:] <customer_file>
>
> BLAH BLAH BLAH
>
> =for Euclid:
> customer_file.type: readable
>
> =back
>
> =head1 OPTIONS
>
> BLAH BLAH BLAH
>
> =over
>
> =item -t[ag] [=|:] <report_type>
>
> BLAH BLAH BLAH
>
> =item -[no[t][-|_]]a[ll][email[s]] | -n
>
> BLAH BLAH BLAH
>
> =for Euclid:
> false: -no[t][-|_]a[ll][email[s]] | -n
>
> =item -m[onth[ly]
>
> BLAH BLAH BLAH
>
> =item -w[eek-ly]]
>
> BLAH BLAH BLAH
>
> =back
>
> =head1 COPYRIGHT
>
> BLAH BLAH BLAH
>
> =cut
>
Also, on an unrelated note: The CPAN documentation for Getopt::Euclid states
that "Getopt::Euclid doesn't export
anything.<http://search.cpan.org/%7Edconway/Getopt-Euclid-v0.2.0/lib/Getopt/Euclid.pm#Program_Interface>".
Therefore, it would seem reasonable to assume that adding an explicit empty
import list to the use statment should have no effect. This is not the case;
given an empty import list Getopt::Euclid will fail silently.
--
So many books, so little time... - Anon.