- or download this
sub Value_eq {
my ($target_value) = @_;
...
sub Negative {
sub { $_[0] < 0 ? 0 : undef }
}
- or download this
package Base;
...
multimethod new => (Value_eq('Der')) => sub {...}
multimethod new => (Value_eq('Der'), '$') => sub {...}
# etc.
- or download this
sub This::Class {
my $target_value = caller;
sub { $_[0] eq $target_value ? 0 : undef }
}
- or download this
package Base;
...
multimethod new => (This::Class) => sub {...}
multimethod new => (This::Class, '$') => sub {...}
# etc.