http://qs321.pair.com?node_id=485148


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;