Created
October 15, 2008 13:57
-
-
Save hakobe/16906 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
use strict; | |
use warnings; | |
package Puu; | |
use base qw( Class::Accessor::Lvalue::Fast); | |
__PACKAGE__->mk_accessors(qw(nyo nyu)); | |
package main; | |
use Data::Dumper; | |
use Perl6::Say; | |
sub p($) { | |
say Dumper @_; | |
} | |
my $puu = Puu->new; | |
$puu->nyo = 1; | |
p $puu->nyo; # 1 | |
$puu->nyo++; | |
p $puu->nyo; # 2 | |
$puu->nyo += 1; | |
p $puu->nyo; # 3 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment