develooper Front page | perl.perl5.porters | Postings from October 2014

Accidental attributes+prototype fix

Thread Next
Rafael Garcia-Suarez
October 8, 2014 06:54
Accidental attributes+prototype fix
Message ID:
The program below will correctly print $ with perls 5.16 and above,
but does not get the prototype on earlier perls: (the BEGIN is required)

use strict;
use warnings;
use Attribute::Handlers;
sub Foo :ATTR(BEGIN) {
    my (undef, undef, $referent) = @_;
    print prototype($referent),"\n";
sub bar ($) :Foo { }

This does not appear to be documented in any perldelta, so I'm
wondering if this fix is accidental, and more importantly do anyone
know if we have a regression test for it?

Thread Next Perl Programming lists via nntp and http.
Comments to Ask Bjørn Hansen at | Group listing | About