Created
November 15, 2011 07:52
-
-
Save shibayu36/1366418 to your computer and use it in GitHub Desktop.
This file contains 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
package Sample::Accessor; | |
use strict; | |
use warnings; | |
use base qw(Class::Accessor::Fast); | |
__PACKAGE__->mk_accessors(qw(hoge fuga)); | |
sub new { | |
my ($class, $args) = @_; | |
# hogehoge | |
return $class->SUPER::new($args); | |
} | |
1; | |
package main; | |
my $accessor = Sample::Accessor->new({hoge => 'hoge', fuga => 'fuga'}); | |
use Data::Dumper; | |
warn Dumper($accessor); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment