Changeset 2391 for lang/perl/Class-Hookable
- Timestamp:
- 12/04/07 11:48:17 (13 months ago)
- Location:
- lang/perl/Class-Hookable/trunk
- Files:
-
- 1 added
- 1 modified
-
lib/Class/Hookable.pm (modified) (3 diffs)
-
t/03_utility/03_registered_function.t (added)
Legend:
- Unmodified
- Added
- Removed
-
lang/perl/Class-Hookable/trunk/lib/Class/Hookable.pm
r2390 r2391 219 219 } 220 220 221 sub registered_function { 222 my ( $self, $method ) = @_; 223 224 Carp::croak "Method name is not specified" 225 if ( ! $method ); 226 227 my $action = $self->hookable_all_methods->{$method}; 228 229 return if ( ! $action ); 230 return $action; 231 } 232 221 233 sub delete_plugin { 222 234 my ( $self, $object, @hooks ) = @_; … … 638 650 639 651 This method returns plugin and callback registered with a hook. 652 640 653 Return value is a list of hash reference including plugin and callback. 654 When there are no registered plugin and callback, this method returns empty list. 641 655 642 656 =head2 registered_methods … … 650 664 and When specifying plugin object (or class name) as an arguments, 651 665 the method name with which a plugin is registered is returned. 666 667 =head2 registered_function 668 669 my $action = $hook->registered_function('method.name'); 670 my ( $plugin, $function ) = @{ $action }{qw( plugin function )}; 671 672 This method returns plugin and callback registered with a method. 673 674 Return value is a hash reference including plugin and callback. 675 When nothing is registered, no this methods are returned. 652 676 653 677 =head2 delete_plugin
![(please configure the [header_logo] section in trac.ini)](/share/chrome/site/your_project_logo.png)