Skip Menu |

This queue is for tickets about the Role-Tiny CPAN distribution.

Report information
The Basics
Id: 116674
Status: resolved
Priority: 0/
Queue: Role-Tiny

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

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



Subject: Undefined existing subs in class cause error when applying role
Show quoted text
> perl -e'package ThingRole; use Role::Tiny; package Thing; sub foo; use Role::Tiny::With; use Data::Dumper; print +Dumper(Role::Tiny::_getstash("Thing")); with "ThingRole";'
$VAR1 = { 'BEGIN' => *Thing::BEGIN, 'foo' => -1, 'with' => *Thing::with, 'Dumper' => *Thing::Dumper }; Can't use string ("-1") as a symbol ref while "strict refs" in use at /home/grinnz/.plenv/versions/5.24.0/lib/perl5/site_perl/5.24.0/Role/Tiny.pm line 374.
On Tue Aug 02 18:29:49 2016, DBOOK wrote: Show quoted text
> > perl -e'package ThingRole; use Role::Tiny; package Thing; sub foo; > > use Role::Tiny::With; use Data::Dumper; print > > +Dumper(Role::Tiny::_getstash("Thing")); with "ThingRole";'
> $VAR1 = { > 'BEGIN' => *Thing::BEGIN, > 'foo' => -1, > 'with' => *Thing::with, > 'Dumper' => *Thing::Dumper > }; > Can't use string ("-1") as a symbol ref while "strict refs" in use at > /home/grinnz/.plenv/versions/5.24.0/lib/perl5/site_perl/5.24.0/Role/Tiny.pm > line 374.
Since RT thought it was a quote, the command above was supposed to be: perl -e'package ThingRole; use Role::Tiny; package Thing; sub foo; use Role::Tiny::With; use Data::Dumper; print +Dumper(Role::Tiny::_getstash("Thing")); with "ThingRole";' This is with Role::Tiny 2.000003 and it happens all the way back to perl 5.8.1 at least.
Fixed in git.
Fixed in 2.000004