develooper Front page | perl.perl5.porters | Postings from February 2000

perlthrtut and attrs/attributes

Thread Next
Tom Christiansen
February 22, 2000 05:51
perlthrtut and attrs/attributes
Message ID:
I see that pod/perlthrtut.pod still uses 

    sub per_object { 
        use attrs qw(locked method); 
        my ($class, $thrnum) = @_; 

Instead of

    sub per_object: locked method { 
        my ($class, $thrnum) = @_; 

And also that lib/ directs you at the top to use
the now-illegal 

    sub foo : locked, method { }

That's not legal these days:

    % cd /usr/local/src/perl5.5.660 

    % ./perl -Ilib -e 'sub foo : locked, method { }'
    Invalid separator character ',' in attribute list at -e line 1, near "sub foo : locked"
    syntax error at -e line 1, near "sub foo : locked"
    Execution of -e aborted due to compilation errors.

    % ./perl -Ilib -e 'sub foo : locked method { }'


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