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

perlthrtut and attrs/attributes

Thread Next
From:
Tom Christiansen
Date:
February 22, 2000 05:51
Subject:
perlthrtut and attrs/attributes
Message ID:
20673.951227492@chthon
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/attrs.pm 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 { }'

--tom

Thread Next


nntp.perl.org: Perl Programming lists via nntp and http.
Comments to Ask Bjørn Hansen at ask@perl.org | Group listing | About