From bfca76c722ed45b41cc8bc4e2eb62c4c47bf9af7 Mon Sep 17 00:00:00 2001 From: Mike Rylander Date: Tue, 29 Jul 2014 12:45:09 -0400 Subject: [PATCH] make import() compatible with Exporter Signed-off-by: Mike Rylander --- Open-ILS/src/perlmods/lib/OpenILS/Utils/CStoreEditor.pm | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) 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(@_); } -- 2.11.0