Beefy Boxes and Bandwidth Generously Provided by pair Networks
Problems? Is your data what you think it is?
 
PerlMonks  

Re: require and use strict vars

by ikegami (Patriarch)
on Dec 02, 2021 at 19:09 UTC ( [id://11139329]=note: print w/replies, xml ) Need Help??


in reply to require and use strict vars

# Compensate for delayed/conditional load of Data::Dumper. package Data::Dumper { our $Indent; # Avoids `used only once` warnings. sub Dumper; # Avoids having to use parens. } # Demo require Data::Dumper; $Data::Dumper::Indent = 0; print Data::Dumper::Dumper $data;
If you want to import,
# Compensate for delayed/conditional load of Data::Dumper. package Data::Dumper { our $Indent; # Avoids `used only once` warnings. } sub Dumper; # Avoids having to use parens. # Demo require Data::Dumper; import Data::Dumper; $Data::Dumper::Indent = 0; print Dumper $data;

The sub declarations can also be used to provide the prototype.

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others admiring the Monastery: (3)
As of 2024-04-25 23:36 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found