Beefy Boxes and Bandwidth Generously Provided by pair Networks
laziness, impatience, and hubris
 
PerlMonks  

Re: strict or not strict?

by Roger (Parson)
on Aug 19, 2005 at 14:20 UTC ( [id://485148]=note: print w/replies, xml ) Need Help??


in reply to strict or not strict?

You could also checkout the cute little module Class::Data::Inheritable for an alternative solution...

#!/usr/bin/perl use strict; use warnings; use base 'Class::Data::Inheritable'; my %data = ( "blah"=>1, "boo"=>2, "hoo"=>3 ); # assign each key to a variable of the same name foreach (keys %data) { # no strict; __PACKAGE__->mk_classdata($_, $data{$_}); } # end-foreach print blah(); exit;


Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others perusing the Monastery: (5)
As of 2024-04-19 13:49 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found