Skip Menu |

This queue is for tickets about the String-Base CPAN distribution.

Report information
The Basics
Id: 71822
Status: resolved
Priority: 0/
Queue: String-Base

People
Owner: Nobody in particular
Requestors: 'spro^^*%*^6ut# [...] &$%*c
Cc:
AdminCc:

Bug Information
Severity: (no value)
Broken in: (no value)
Fixed in: (no value)



Subject: pos() leaves junk on the stack
$ perl -lMblib -e '$_="hello"; pos($_) = 3; use String::Base +7; use Devel::Peek; $,=",";print scalar pos($_)' 3,7 In addition to leaving an extra value on the stack, in does not return the correct value. But I do not see how this example differs that much from the tests in t/pos.t.
The difference between your test case and t/pos.t is the use of the warnings pragma. The bug is a duff constant-fold operation which S:B needs to suppress. Prior to Perl 5.9.4 it suppresses it successfully, but on later Perls the use of warnings causes the core to suppress it (presumably because it generates a warning), so it didn't show up in the test suite and I didn't use the stronger suppression method. Fixed in String-Base-0.001.