in reply to Re: RFC: Simulating Python's @decorators in Perl with Attributes
in thread RFC: Simulating Python's @decorators in Perl with Attributes
my %capital : Hash::Sorted;
> would be too cumbersome.
did you ever get this to work? I can't.
I even tried Perl4's quote as separator...
use strict; use warnings; use Attribute::Handlers; package H; sub Sorted :ATTR { print "sorted" } package main; my $tst :H::Sorted; sub tst :H::Sorted { print "hui" } tst();
Invalid separator character ':' in attribute list at /home/lanx/B/PL/P +M/uni_attr.pl line 16, near "$tst :H" syntax error at /home/lanx/B/PL/PM/uni_attr.pl line 16, near "$tst :H" Invalid separator character ':' in attribute list at /home/lanx/B/PL/P +M/uni_attr.pl line 18, near "sub tst :H" syntax error at /home/lanx/B/PL/PM/uni_attr.pl line 18, near "sub tst +:H" Execution of /home/lanx/B/PL/PM/uni_attr.pl aborted due to compilation + errors.
Cheers Rolf
( addicted to the Perl Programming Language)
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^3: RFC: Simulating Python's @decorators in Perl with Attributes
by Arunbear (Prior) on Jun 01, 2013 at 14:06 UTC | |
by LanX (Saint) on Jun 01, 2013 at 14:18 UTC | |
by Arunbear (Prior) on Jun 02, 2013 at 18:32 UTC | |
by LanX (Saint) on Jun 02, 2013 at 20:03 UTC |