| 1 | package Attribute::Util; | ||||||||||
| 2 | |||||||||||
| 3 | 5 | ▶ | use warnings; | ||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||
| 4 | 5 | ▶ | use strict; | ||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||
| 5 | 5 | ▶ | use Attribute::Handlers; | ||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||
| 6 | 5 | ▶ | use Carp (); | ||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||
| 7 | |||||||||||
| 8 | 5 | our $VERSION = sprintf "%d.%02d", q$Revision: 1.7 $ =~ /(\d+)/g; | |||||||||
| 9 | 5 | our @DEFAULT_ATTRIBUTES = qw(Abstract Alias Memoize Method SigHandler); | |||||||||
| 10 | |||||||||||
| 11 | 5 | ▶ | sub import{ | ||||||||
|
Subroutine
import: called CC=4 SCAR=13.9
| |||||||||||
| 12 | 5 | my $pkg = shift; | |||||||||
| 13 | 5 | ▶ | my @attrs = @_ ? @_ : @DEFAULT_ATTRIBUTES; | ||||||||
|
Branch: 1 branch
| |||||||||||
| 14 | 5 | for my $attr (@attrs){ | |||||||||
| 15 | 21 | eval qq{ require Attribute::$attr; }; | |||||||||
| 16 | 21 | ▶ | $@ and Carp::croak $@; | ||||||||
|
Branch: 1 branch
| |||||||||||
| 17 | # import is not neccessary for Attribute modules. | ||||||||||
| 18 | } | ||||||||||
| 19 | } | ||||||||||
| 20 | |||||||||||
| 21 | 5 | "Rosebud"; # for MARCEL's sake, not 1 -- dankogai | |||||||||
| 22 | |||||||||||
| 23 | __END__ | ||||||||||