develooper Front page | perl.perl5.porters | Postings from July 2012

Re: Objects without stashes?

Thread Next
From:
Father Chrysostomos
Date:
July 29, 2012 13:40
Subject:
Re: Objects without stashes?
Message ID:
22106ED8-8FD9-4948-929A-9DC71E987BB7@cpan.org
Rev. Chip said:
> I didn't use the term "stash" or "glob", and that was on purpose.  I would
> like to see this work, where the RHS of bless is a simple hash that stays
> simple:
> 
>     bless [0], { inc => sub { ++$_[0][0] },
>                  dec => sub { --$_[0][0] },
> 		 DESTROY => sub { print "BYE\n" } };

    bless [0], package { sub inc { ++$_[0][0] },
                         sub dec { --$_[0][0] },
                         DESTROY { print "BYE\n" } };


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