« Component/Component/DisableDynamicPlugin.pm
↑ Summary
Component/Component/Plaggerize/ConfigLoader.pm »
| 1 | package Class::Component::Attribute::Method; | ||
| 2 | |||
| 3 | use strict; | ||
| 4 | use warnings; | ||
| 5 | use base 'Class::Component::Attribute'; | ||
| 6 | |||
| 7 | sub register { | ||
| 8 | my($class, $plugin, $c, $method, $value) = @_; | ||
| 9 | |||
| 10 | if ($value) { | ||
| 11 | $c->register_method( $value => { plugin => $plugin, method => $method } ); | ||
| 12 | } else { | ||
| 13 | $c->register_method( $method => $plugin ); | ||
| 14 | } | ||
| 15 | } | ||
| 16 | |||
| 17 | 1; |