Skip Menu |

Preferred bug tracker

Please visit the preferred bug tracker to report your issue.

This queue is for tickets about the Package-Stash-XS CPAN distribution.

Report information
The Basics
Id: 132497
Status: new
Priority: 0/
Queue: Package-Stash-XS

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

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



Subject: Subsequent modification of variable passed to the constructor will change name attribute of existing object.
If the constructor is passed a package name via a variable and that variable is subsequently changed, the stash's name will change as well. For example: my $package = "Test000"; my $pkg1 = Package::Stash->new( $package ); say "PKG1 = ", $pkg1->name; ++ $package; say "PKG1 = ", $pkg1->name; results in: % PACKAGE_STASH_IMPLEMENTATION=XS perl bug.pl PKG1 = Test000 PKG1 = Test001 This does not occur when using the PP implementation: % PACKAGE_STASH_IMPLEMENTATION=PP perl bug.pl PKG1 = Test000 PKG1 = Test000