develooper Front page | perl.perl5.porters | Postings from May 2012

[perl #43400] "use Module my $var" doesn't declare $var properly

Thread Next
From:
Eric Brine via RT
Date:
May 16, 2012 16:44
Subject:
[perl #43400] "use Module my $var" doesn't declare $var properly
Message ID:
rt-3.6.HEAD-4610-1337211841-1286.43400-15-0@perl.org
On Wed Jun 27 13:00:57 2007, jsailor wrote:
> 
> This is a bug report for perl from jsailor@jesnetplus.com,
> generated with the help of perlbug 1.35 running under perl v5.8.8.
> 
> 
> -----------------------------------------------------------------
> [Please enter your report here]
> 
> Attempting to declare a variable in a use statement does not make the
>    variable
> visible later as it should.
> 
> For example,
> 
>   perl -wMstrict -e 'use DirHandle my $var; print $var'
>   # DirHandle chosen simply because it does not define an import
>    method
> 
> dies, even though the my declaration is not contained in a block or
>    eval, which
> means, according to the documentation in perlfunc for my.

Closing this ticket as it behaves as documented and not even the
petitioner is asking for a warning here.


---
via perlbug:  queue: perl5 status: open
https://rt.perl.org:443/rt3/Ticket/Display.html?id=43400

Thread Next


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