develooper Front page | perl.perl5.porters | Postings from February 2000

Re: [PATCH 5.5.660] double EXPORT_OK in h2xs

February 24, 2000 05:57
Re: [PATCH 5.5.660] double EXPORT_OK in h2xs
Message ID:
In <12548.951399865@chthon>, Tom Christiansen writes:
:>h2xs generates a .pm file with 'our @EXPORT_OK;' and, later,
:>"our @EXPORT_OK = ( @{ $EXPORT_TAGS{'all'} } );". This patch removes
:>the initial declaration.
:>(I'm assuming the array doesn't need to be predeclared before the
:>'require Exporter;' - if it does, the 'our' should be removed from
:>the second use instead.)
:Seems like a prudent application of -w would catch whatever's going
:on here.
:    % perl -we 'our $x = 10; our $x = 20'
:    "our" variable $x masks earlier declaration in same scope at -e line 1.
:    % perl -we 'our $x = 10; {our $x = 20}'
:    "our" variable $x redeclared at -e line 1.
:    (Did you mean "local" instead of "our"?)

I'm not sure what you're trying to say here - application of -w was
what caught it, hence the patch.

Hugo Perl Programming lists via nntp and http.
Comments to Ask Bjørn Hansen at | Group listing | About