in reply to Trying to figure out subroutine attributes
That seems like a roundabout way of doing it. Instead, it would probably be easier to use your handler to maintain a table of available methods. The following is untested but should be close:
my %RPC_METHODS; sub xmlrpc_methods { my $package = shift; return keys %{ $RPC_METHODS{$package} }; } sub xmlrpc : ATTR(CODE) { my ( $package, $symbol ) = @_; my $name = *{$symbol}{NAME}; $RPC_METHODS{$package}{$name} = 1; }
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^2: Trying to figure out subroutine attributes
by Anonymous Monk on Dec 08, 2006 at 22:12 UTC | |
by pemungkah (Priest) on Dec 09, 2006 at 01:36 UTC | |
by Anonymous Monk on Dec 11, 2006 at 15:37 UTC | |
by pemungkah (Priest) on Dec 11, 2006 at 19:54 UTC |