in reply to Re^2: Detecting an imported function
in thread Detecting an imported function
By placing this at the end of my file, it runs after all use() and ->import has occurred. Any imported methods will be visible now. Because my caller called me with a use() call, this code is run during the BEGIN-time of my caller. This is what I imagined tye was suggesting.
package Example; use vars qw( @Methods ); use Anything::You::Like; ... no strict 'refs'; @Methods = grep *{__PACKAGE__ . "::$_"}{CODE}, $keys %{__PACKAGE__ . " +::"}; 1;
|
|---|