develooper Front page | perl.perl6.language.strict | Postings from February 2001

Re: Warnings, strict, and CPAN

Peter Scott
February 17, 2001 17:27
Re: Warnings, strict, and CPAN
Message ID:
At 02:49 PM 2/17/01 -0500, wrote:
>On Sat, Feb 17, 2001 at 11:09:29AM -0800, Peter Scott wrote:
> > >No, there will probably be a big push to shut it off, based on
> > >historical reactions to this sort of thing.
> >
> > Maybe I'm missing something; I'm sure the philosophy is for the standard
> > distribution to be -w clean, so shouldn't everything be equally okay with
> > use warnings?
>Try it and see!  I'm serious.  It'll be an interesting experiment.

I started trying it and hit something really weird... or maybe I've just 
been working too many days in a row.

Why this difference depending on whether I reference a module with an 
absolute path or a relative one?

[peter@tweety ~]$ /usr/bin/perl -wc /usr/lib/perl5/5.6.0/
/usr/lib/perl5/5.6.0/ syntax OK

[peter@tweety ~]$ cd /usr/lib/perl5/5.6.0/

[peter@tweety 5.6.0]$ /usr/bin/perl -wc /usr/lib/perl5/5.6.0/
/usr/lib/perl5/5.6.0/ syntax OK

[peter@tweety 5.6.0]$ /usr/bin/perl -wc
Name "Shell::capture_stderr" used only once: possible typo at line 3. syntax OK

[peter@tweety 5.6.0]$ cd ..

[peter@tweety perl5]$ /usr/bin/perl -wc 5.6.0/
Name "Shell::capture_stderr" used only once: possible typo at 
5.6.0/ line 3.
5.6.0/ syntax OK

Nothing up my sleeve:

[peter@tweety perl5]$ env | grep -i perl
[peter@tweety perl5]$

Color me baffled.  And it's not just that module, there are many that 
exhibit this behavior, so it's something to do with perl -cw.

Peter Scott
Pacific Systems Design Technologies Perl Programming lists via nntp and http.
Comments to Ask Bjørn Hansen at | Group listing | About