File: Role1.pm

package info (click to toggle)
librole-hooks-perl 0.008-2
  • links: PTS, VCS
  • area: main
  • in suites: bookworm, forky, sid, trixie
  • size: 244 kB
  • sloc: perl: 696; makefile: 2
file content (14 lines) | stat: -rw-r--r-- 298 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
package Local::Role1;
use Local::Mite -role;

use Role::Hooks ();

Role::Hooks->before_apply(__PACKAGE__, sub {
	push @{ $Local::xxx{+__PACKAGE__}||=[] }, [before_apply => @_];
});

Role::Hooks->after_apply(__PACKAGE__, sub {
	push @{ $Local::xxx{+__PACKAGE__}||=[] }, [after_apply => @_];
});

1;