Beefy Boxes and Bandwidth Generously Provided by pair Networks
Welcome to the Monastery
 
PerlMonks  

Re^2: Is 'use vars' really obsolete?

by perl-diddler (Chaplain)
on Sep 22, 2017 at 00:40 UTC ( [id://1199858]=note: print w/replies, xml ) Need Help??

Help for this page

Select Code to Download


  1. or download this
        my $code  = 'package '.$pkgnam.';
                     use vars qw($'.$varname.');
    ...
    
        eval $code; 
        $@ and die "Error in exporting var $varname: $@";
    
  2. or download this
        my $code  = 'package ' . $pkgnam . ';
                     our  $'.$varname.' = "'.$value.'"';
    
        eval $code; 
        $@ and die "Error in exporting var $varname: $@";
    
  3. or download this
    Variable "$Tor_mgr" is not imported at ./rss_rdr line 724.
    Variable "$Tor_mgr" is not imported at ./rss_rdr line 736.
    ...
    Global symbol "$Tor_mgr" requires explicit package name at ./rss_rdr l
    +ine 736.
    Global symbol "$Tor_mgr" requires explicit package name at ./rss_rdr l
    +ine 745.
    BEGIN not safe after errors--compilation aborted at ./rss_rdr line 754
    +.
    

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://1199858]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others musing on the Monastery: (6)
As of 2024-03-29 00:05 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found