EntityModel-Class
view release on metacpan or search on metacpan
lib/EntityModel/Class.pm view on Meta::CPAN
# Apply watchers after we've defined the fields - each watcher is field => method
foreach my $watcher (grep { exists $info->{$_}->{watch} } @attribs) {
my $w = $info->{$watcher}->{watch};
foreach my $watched (keys %$w) {
$class->add_watcher($pkg, $watcher, $watched, $info->{$watched}, $w->{$watched});
}
}
# Thanks to Check::UnitCheck
Check::UnitCheck::unitcheckify(sub {
# FIXME Can't call any log functions within UNITCHECK
local $::DISABLE_LOG = 1;
my %ml = %methodList;
$class->add_method($pkg, $_, $ml{$_}) foreach keys %ml;
$class->add_method($pkg, 'import', sub { }) unless $pkg->can('import');
}) if %methodList;
}
=head2 add_method
=cut
( run in 2.235 seconds using v1.01-cache-2.11-cpan-748bfb374f4 )