Skip Menu |
 

This queue is for tickets about the Sub-Attributes CPAN distribution.

Report information
The Basics
Id: 115570
Status: resolved
Priority: 0/
Queue: Sub-Attributes

People
Owner: DFARRELL [...] cpan.org
Requestors: ANDK [...] cpan.org
Cc:
AdminCc:

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



Subject: Fails with perls < 5.18
Download (untitled) / with headers
text/plain 442b
As per subject. Best illustrated with the matrix: http://matrix.cpantesters.org/?dist=Sub-Attributes%200.01 Sample fail report: http://www.cpantesters.org/cpan/report/b0a2903c-376b-11e6-b0e5-a9ff5116cbd0 If this is intentional, it would be cool if you could declare your requirement. That way the FAILS are converted to UNKNOWNS. Details about how to do it are on this page: http://wiki.cpantesters.org/wiki/CPANAuthorNotes HTH&&Thanks,
Download (untitled) / with headers
text/plain 969b
On Thu Jun 23 22:31:29 2016, ANDK wrote: Show quoted text
> As per subject. Best illustrated with the matrix: > > http://matrix.cpantesters.org/?dist=Sub-Attributes%200.01 > > Sample fail report: > > http://www.cpantesters.org/cpan/report/b0a2903c-376b-11e6-b0e5- > a9ff5116cbd0 > > If this is intentional, it would be cool if you could declare your > requirement. That way the FAILS are converted to UNKNOWNS. Details > about how to do it are on this page: > http://wiki.cpantesters.org/wiki/CPANAuthorNotes > > HTH&&Thanks,
The problem is the use of unescaped literal :: in a double-quoted string: *{"$class::$subroutine"} = $coderef; I am surprised the behaviour changed in 5.18. That may not have been intentional. In any case, at least one of the colons needs to be escaped: *{"$class\::$subroutine"} = $coderef; *{"$class:\:$subroutine"} = $coderef; and then it works. (I usually use the latter, since it is more exotic, but still perfectly readable. :-)
Download (untitled) / with headers
text/plain 828b
On Fri Jun 24 11:52:23 2016, SPROUT wrote: Show quoted text
> The problem is the use of unescaped literal :: in a double-quoted > string: > > *{"$class::$subroutine"} = $coderef; > > I am surprised the behaviour changed in 5.18. That may not have been > intentional.
It seems it was not. I have reported the inadvertent change in behaviour at <https://rt.perl.org/Ticket/Display.html?id=128478>. Perl is now inconsistent in how it parses "$foo::$bar" and "$foo::@bar", so the behaviour may change back in 5.26. Hence it would be good to change to module to use a backslash. Show quoted text
> > In any case, at least one of the colons needs to be escaped: > > *{"$class\::$subroutine"} = $coderef; > *{"$class:\:$subroutine"} = $coderef; > > and then it works. (I usually use the latter, since it is more > exotic, but still perfectly readable. :-)
Thanks for the responses everyone, very useful! This should be fixed per version 0.02


This service is sponsored and maintained by Best Practical Solutions and runs on Perl.org infrastructure.

Please report any issues with rt.cpan.org to rt-cpan-admin@bestpractical.com.