Oh, the original code does what I want it to do already. Unfortunately the warning pops up. Your version circumvents the warning, but in a way that is not helpful to me, because it cannot be applied to the real code. A little less compact version of the actual code would be:
Something like this. Now to apply your changes, I would need to change the lexical into a package global, which simply is not what I intended for this variable to be at this place.package Get::Me::My::Config; use Config::Std; sub get_config { read_config _file_name() => my %config; return \%config; } package Database::Stuff; use base q(Rose::DB); use Get::Me::My::Config; sub init_db { my $db_conf = Get::Me::My::Config->get_config->{db_conf}; return _create_db_from($db_conf); }
In reply to Re^4: Config::Std to lexial in BEGIN { } throws warning?
by gorash
in thread Config::Std to lexical in BEGIN { } throws warning?
by gorash
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |