Fix Tie::StdScalar when $instance exists but isn't a 'true' value
authorRuud H.G. van Tol <rvtol@isolution.nl>
Wed, 28 Oct 2015 14:04:38 +0000 (14:04 +0000)
committerSteve Hay <steve.m.hay@googlemail.com>
Wed, 28 Oct 2015 17:42:47 +0000 (17:42 +0000)
Patch received from Ruud H.G. van Tol <rvtol@isolution.nl>.
Committer added ++$VERSION and Porting/checkAUTHORS.pl change.

Porting/checkAUTHORS.pl
lib/Tie/Scalar.pm

index 9b161d2..fe448dd 100755 (executable)
@@ -858,6 +858,7 @@ rootbeer\100teleport.com                rootbeer\100redcat.com
 +                                       tomphoenix\100unknown
 rurban\100x-ray.at                      rurban\100cpan.org
 +                                       rurban\100cpanel.net
+rvtol+news\100isolution.nl              rvtol\100isolution.nl
 sartak\100bestpractical.com             sartak\100gmail.com
 +                                       code\100sartak.org
 sadinoff\100olf.com                     danny-cpan\100sadinoff.com
index b56ac9a..50b9701 100644 (file)
@@ -1,6 +1,6 @@
 package Tie::Scalar;
 
-our $VERSION = '1.03';
+our $VERSION = '1.04';
 
 =head1 NAME
 
@@ -145,7 +145,7 @@ package Tie::StdScalar;
 
 sub TIESCALAR {
     my $class = shift;
-    my $instance = shift || undef;
+    my $instance = @_ ? shift : undef;
     return bless \$instance => $class;
 }