You are viewing a plain text version of this content. The canonical link for it is here.
Posted to modperl@perl.apache.org by Honza Pazdziora <ad...@informatics.muni.cz> on 2000/02/22 18:39:59 UTC

PATCH: Apache::PerlRun -- assigning undef to hash

Hello,

when using Apache::PerlRun I came across the

Odd number of elements in hash assignment at /export/packages/perl-5.005_03/lib/site_perl/5.005/sun4-solaris/Apache/PerlRun.pm line 311.
Use of uninitialized value at /export/packages/perl-5.005_03/lib/site_perl/5.005/sun4-solaris/Apache/PerlRun.pm line 311.

messages. The following patches silent them. Also, I have some bad
experianed with defined on hashes or arrays -- it might be better to
have something similar to Exporter.pm's handling. Should I send
a patch that would use the globs?

@@ -308,10 +308,10 @@
            undef_cv_if_owner($package, \&{ $tab->{$_} });
        } 
         if(defined %{ $tab->{$_} }) {
-            %{ $tab->{$_} } = undef;
+            undef %{ $tab->{$_} };
         }
         if(defined @{ $tab->{$_} }) {
-            @{ $tab->{$_} } = undef;
+            undef @{ $tab->{$_} };
         }
         if(defined ${ $tab->{$_} }) {
            ${ $tab->{$_} } = undef;

-- 
------------------------------------------------------------------------
 Honza Pazdziora | adelton@fi.muni.cz | http://www.fi.muni.cz/~adelton/
   .project: Perl, DBI, Oracle, MySQL, auth. WWW servers, MTB, Spain.
------------------------------------------------------------------------

Re: PATCH: Apache::PerlRun -- assigning undef to hash

Posted by Doug MacEachern <do...@pobox.com>.
On Tue, 22 Feb 2000, Honza Pazdziora wrote:

> 
> Hello,
> 
> when using Apache::PerlRun I came across the
> 
> Odd number of elements in hash assignment at /export/packages/perl-5.005_03/lib/site_perl/5.005/sun4-solaris/Apache/PerlRun.pm line 311.
> Use of uninitialized value at /export/packages/perl-5.005_03/lib/site_perl/5.005/sun4-solaris/Apache/PerlRun.pm line 311.
> 
> messages. The following patches silent them. Also, I have some bad
> experianed with defined on hashes or arrays -- it might be better to
> have something similar to Exporter.pm's handling. Should I send
> a patch that would use the globs?

thanks.  but, this is also fixed in the cvs tree.  if you could verify,
that would be great.