in reply to List Wrapper for Object Methods.
Though this does smell like it would benefit from the composite design pattern.our $AUTOLOAD; sub AUTOLOAD { my $self = shift; my $method = $AUTOLOAD; $method =~ s/.*://; # strip out Package:: foreach my $anything (@{$self}) { die "method $method not supported" unless $anything->can($method); $anything->$method(@_); } }
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^2: List Wrapper for Object Methods.
by pelagic (Priest) on Dec 03, 2004 at 11:25 UTC | |
by Arunbear (Prior) on Dec 03, 2004 at 12:01 UTC |