root/lang/perl/Class-Component/trunk/t/MyClass/Attribute/Dump.pm
@
8646
| Revision 8646, 362 bytes (checked in by yappo, 5 years ago) |
|---|
| Line | |
|---|---|
| 1 | package MyClass::Attribute::Dump; |
| 2 | |
| 3 | use strict; |
| 4 | use warnings; |
| 5 | use base 'Class::Component::Attribute'; |
| 6 | |
| 7 | use YAML; |
| 8 | |
| 9 | sub register { |
| 10 | my($class, $plugin, $c, $method, $value, $code) = @_; |
| 11 | |
| 12 | no strict 'refs'; |
| 13 | no warnings 'redefine'; |
| 14 | my $cname = ref($plugin) or return; |
| 15 | *{"$cname\::$method"} = sub { |
| 16 | (Dump($_[2]), Dump($value)); |
| 17 | }; |
| 18 | } |
| 19 | |
| 20 | 1; |
Note: See TracBrowser
for help on using the browser.
![(please configure the [header_logo] section in trac.ini)](/share/chrome/site/your_project_logo.png)