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

RE: [ID 20000322.005] -w gives DynaLoader::dl_error redefined war ningfrom static load; -Mwarnings doesn't

Thread Previous
From:
paul.marquess
Date:
March 22, 2000 04:39
Subject:
RE: [ID 20000322.005] -w gives DynaLoader::dl_error redefined war ningfrom static load; -Mwarnings doesn't
Message ID:
5104D4DBC598D211B5FE0000F8FE7EB2067FE5DC@mbtlipnt02.btlabs.bt.co.uk
From: Moore, Paul [mailto:Paul.Moore@uk.origin-it.com]

> From: Dominic Dunlop [mailto:domo@computer.org]
> > 
> > $ perl -w -MIO -e 1      # (Or any XS module of your choice)
> > Subroutine DynaLoader::dl_error redefined at 
> > /usr/local/lib/perl5/5.6.0/powerpc-machten/DynaLoader.pm line 93.
> > $ perl -Mwarnings -MIO -e 1
> > $ perl -Mwarnings=all -MCPAN -e  1
> > $
> > 
> > Firstly, I don't think I should be getting a warning at all.  I assume
> > it's something to do with perl being statically linked.  Secondly, I'm
> > surprised that the behaviour's different with C<-Mwarnings> instead of
> > C<-w>.
> 
> The issue of the difference between -Mwarnings and -w is probably because
> the "warnings" module is lexical. Hence
> 
>     perl -Mwarnings -MIO -e 1
> 
> means roughly
> 
>     perl <<EOF
>         use warnings;
>         use IO;
>         1;
>     EOF
> 
> which doesn't propogate the warning setting through to the IO module. -w,
on
> the other hand, affects *all* included code.

Got it in one.

Paul

Thread Previous


nntp.perl.org: Perl Programming lists via nntp and http.
Comments to Ask Bjørn Hansen at ask@perl.org | Group listing | About