in reply to Re: Re: Re: Re: Re: Re: Why breaking can() is acceptable
in thread Why breaking can() is acceptable
Wouldn't the following be sufficient?
package Class::FlyweightWrapper; ... sub can { my $self = $object{shift(@_)}; my ($method_name) = @_; my $sub = $self->can($method_name) or return; sub { $object{shift(@_)}->$method_name( @_ ) } }
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Re: Re: Re: Re: Re: Re: Re: Why breaking can() is acceptable
by tilly (Archbishop) on Apr 06, 2004 at 19:01 UTC |