From e9f2a7b776fb74d684e1d6fb26f71acf00cd71ab Mon Sep 17 00:00:00 2001 From: fukachan Date: Sun, 11 Mar 2001 11:07:09 +0000 Subject: fix @ISA handling fix typo --- fml/lib/IO/MapAdapter.pm | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/fml/lib/IO/MapAdapter.pm b/fml/lib/IO/MapAdapter.pm index 6fa4e19d..b370e3da 100644 --- a/fml/lib/IO/MapAdapter.pm +++ b/fml/lib/IO/MapAdapter.pm @@ -9,7 +9,7 @@ # package IO::MapAdapter; -use vars qw(@ISA); +use vars qw(@ISA @ORIG_ISA $FirstTime); use strict; use Carp; @@ -131,7 +131,10 @@ sub new } } - unshift(@ISA, $pkg); + # save @ISA for further use, re-evaluate @ISA + @ORIG_ISA = @ISA unless $FirstTime++; + @ISA = ($pkg, @ORIG_ISA); + eval qq{ require $pkg; $pkg->import();}; $pkg->configure($me) if $pkg->can('configure'); _error_reason($me, $@) if $@; @@ -221,6 +224,7 @@ sub get_recipient { my ($self) = @_; $self->get_next_value;} =head2 C +=cut # Descriptions: # Arguments: $self $args @@ -230,7 +234,7 @@ sub add { my ($self, $addr) = @_; - if ($self->SUPER::can('add')) { + if ($self->can('add')) { $self->SUPER::add($addr); } else { @@ -239,7 +243,6 @@ sub add } } -=cut # Descriptions: destructor # request is forwarded to close() method. -- cgit v1.2.1