Skip Menu |

This queue is for tickets about the Test-Smoke CPAN distribution.

Report information
The Basics
Id: 63073
Status: resolved
Priority: 0/
Queue: Test-Smoke

People
Owner: Nobody in particular
Requestors: ANDK [...] cpan.org
Cc:
AdminCc:

Bug Information
Severity: Normal
Broken in: 1.44
Fixed in: 1.46



Subject: Bleadperl 9aa8b00 breaks ABELTJE/Test-Smoke-1.44
Reported to rt.perl.org because I don't know if this will be considered a perl bug or a test script bug. http://rt.perl.org/rt3/Ticket/Display.html?id=79302
CC: perlbug [...] perl.org, abeltje [...] cpan.org, bug-Test-Smoke [...] rt.cpan.org
Subject: [rt.cpan.org #63073] [perl #79302] Re: Bleadperl 9aa8b00 breaks ABELTJE/Test-Smoke-1.44
Date: Sun, 21 Nov 2010 12:50:21 -0800
To: Andreas J. Koenig <andreas.koenig.7os6VVqR [...] franz.ak.mind.de>
From: Father Chrysostomos <sprout [...] cpan.org>
On Nov 16, 2010, at 9:15 PM, Andreas J. Koenig wrote: Show quoted text
> What jumps into the eye is that in the testscript t/sysinfo_proc.t the > use of tie() happens before the package is parsed.
What jumps into *my* eye is that it says tie $handle and $handle is a scalar. It should be tie *$handle. tie $handle used to tie a handle if a typeglob had been assigned to $handle. I consider this change to be a bug fix (but feel free to remonstrate if you disagree). The main problem here in 5.12 and earlier is that tied $scalar cannot reliably be used to see whether a scalar is tied, because a typeglob might have been assigned to or returned from it. The same happens with untie $scalar, which may or may not work, depending on what was last assigned. I fixed those and also made tie() match. This means that tie $scalar will always tie a scalar, and, if the scalar has been used before, you don’t have to check its value to see whether you need to undefine it to be able to tie it.
On Sun Nov 21 15:50:33 2010, sprout@cpan.org wrote: Show quoted text
> > On Nov 16, 2010, at 9:15 PM, Andreas J. Koenig wrote: >
> > What jumps into the eye is that in the testscript t/sysinfo_proc.t
> the
> > use of tie() happens before the package is parsed.
> > What jumps into *my* eye is that it says tie $handle and $handle is a > scalar. It should be tie *$handle. > > tie $handle used to tie a handle if a typeglob had been assigned to > $handle. I consider this change to be a bug fix (but feel free to > remonstrate if you disagree). > > The main problem here in 5.12 and earlier is that tied $scalar cannot > reliably be used to see whether a scalar is tied, because a > typeglob might have been assigned to or returned from it. The same > happens with untie $scalar, which may or may not work, depending on > what was last assigned. I fixed those and also made tie() match. > This means that tie $scalar will always tie a scalar, and, if the > scalar has been used before, you don’t have to check its value to > see whether you need to undefine it to be able to tie it. >
Here is a patch to make the test work with 5.15.
Subject: open_cdBMh7bT.txt
diff -rup Test-Smoke-1.44-OATnoc-orig/t/sysinfo_proc.t Test-Smoke-1.44-OATnoc/t/sysinfo_proc.t --- Test-Smoke-1.44-OATnoc-orig/t/sysinfo_proc.t 2011-11-04 23:07:54.000000000 -0700 +++ Test-Smoke-1.44-OATnoc/t/sysinfo_proc.t 2011-11-04 23:08:09.000000000 -0700 @@ -58,7 +58,7 @@ my $this_system = Test::Smoke::SysInfo:: # we can do this fully qualified filehandle as we only use GLOBs # to keep up with 5.005xx no strict 'refs'; - tie $handle, 'ReadProc', $files{ $fn }; + tie *$handle, 'ReadProc', $files{ $fn }; } else { CORE::open \$handle, $second, @args; }
Integrated. -- Abe.