From: Mike Rylander Date: Tue, 29 Jul 2014 16:45:09 +0000 (-0400) Subject: make import() compatible with Exporter X-Git-Url: https://old-git.evergreen-ils.org/?a=commitdiff_plain;h=bfca76c722ed45b41cc8bc4e2eb62c4c47bf9af7;p=working%2FEvergreen.git make import() compatible with Exporter Signed-off-by: Mike Rylander --- diff --git a/Open-ILS/src/perlmods/lib/OpenILS/Utils/CStoreEditor.pm b/Open-ILS/src/perlmods/lib/OpenILS/Utils/CStoreEditor.pm index bab4afd109..995461011c 100644 --- a/Open-ILS/src/perlmods/lib/OpenILS/Utils/CStoreEditor.pm +++ b/Open-ILS/src/perlmods/lib/OpenILS/Utils/CStoreEditor.pm @@ -59,11 +59,17 @@ sub personality { sub import { my $class = shift; - my %args = @_; - $class->personality( $args{personality} ) if ($args{personality}); + my @super_args = (); + while ( my $a = shift ) { + if ($a eq 'personality') { + $class->personality( shift ); + } else { + push @super_args, $a; + } + } - return 1; + return $class->SUPER::import( @super_args ); } sub new_editor { return OpenILS::Utils::CStoreEditor->new(@_); }