X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=blobdiff_plain;f=lib%2FDBM%2FDeep.pm;h=280585c419a8ab49fdab24f7ea30a74c0b1185b2;hb=c9cec40e1c65cb1a386d84f0dd23b0cc6ce64f5f;hp=8e27817e897a464f9b2ac280baa7e84fbaa7d5af;hpb=994ccd8e3cac357677196eb4ad5dad76089626a7;p=dbsrgits%2FDBM-Deep.git diff --git a/lib/DBM/Deep.pm b/lib/DBM/Deep.pm index 8e27817..280585c 100644 --- a/lib/DBM/Deep.pm +++ b/lib/DBM/Deep.pm @@ -278,19 +278,13 @@ sub import { ## # Recursively import Perl hash/array structure ## - #XXX This use of ref() seems to be ok if (!ref($_[0])) { return; } # Perl calls import() on use -- ignore my $self = shift->_get_self; my ($struct) = @_; - #XXX This use of ref() seems to be ok + # struct is not a reference, so just import based on our type if (!ref($struct)) { - ## - # struct is not a reference, so just import based on our type - ## - shift @_; - if ($self->_type eq TYPE_HASH) { $struct = {@_}; } elsif ($self->_type eq TYPE_ARRAY) { $struct = [@_]; } }