BEGIN has less issues than INIT, and it parallels use.
In fact, if you want to completely mimic use, you can do the following:
BEGIN { package Foo::Bar; use Class::Struct; struct('field' => '$'); $INC{'Foo/Bar.pm} = 1; }
Then you can do use Foo::Bar qw( ...imports... ); at a later point.
In reply to Re^5: Class::Struct problem
by ikegami
in thread Class::Struct problem
by rovf
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |