added no warnings 'redefine'; so we can define subs in normalization perl
authorDobrica Pavlinusic <dpavlin@rot13.org>
Tue, 6 Nov 2007 20:26:31 +0000 (20:26 +0000)
committerDobrica Pavlinusic <dpavlin@rot13.org>
Tue, 6 Nov 2007 20:26:31 +0000 (20:26 +0000)
without annoying warnings.

git-svn-id: svn+ssh://mjesec/home/dpavlin/svn/webpac2/trunk@1011 07558da8-63fa-0310-ba24-9fe276d99e06

lib/WebPAC/Normalize.pm

index 47c9c5e..9f39027 100644 (file)
@@ -105,14 +105,15 @@ sub data_structure {
        die "need row argument" unless ($arg->{row});
        die "need normalisation argument" unless ($arg->{rules});
 
-       no strict 'subs';
        _set_lookup( $arg->{lookup} ) if defined($arg->{lookup});
        _set_ds( $arg->{row} );
        _set_config( $arg->{config} ) if defined($arg->{config});
        _clean_ds( %{ $arg } );
        $load_row_coderef = $arg->{load_row_coderef};
 
-       eval "$arg->{rules}";
+       no strict 'subs';
+       no warnings 'redefine';
+       eval "$arg->{rules};";
        die "error evaling $arg->{rules}: $@\n" if ($@);
 
        return _get_ds();