package interface; my %classes; sub import { my $callerpackage = caller; $classes{$callerpackage} = [@_]; } INIT { while (my $class, $info) = each %classes) { check_a_class($class, $info); } }
To me that seems much cleaner than locks and evals. Especially as the real module forgets to check $@ to see if the code being eval'd died or not.
In reply to Re: interface.pm explained
by fergal
in thread interface.pm explained
by gaal
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |