X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=blobdiff_plain;f=examples%2FLazyClass.pod;h=cb678b14e49b8a1bd884058fa195dbdc396a5d10;hb=c9e77dbb017258dc44295fc4ec8e0bdd99ec9361;hp=8aaa30ce6e7741ca35ec7b04efb8d2f8b2f65167;hpb=677eb1584b6e27c6079daed35110cb4192153db4;p=gitmo%2FClass-MOP.git diff --git a/examples/LazyClass.pod b/examples/LazyClass.pod index 8aaa30c..cb678b1 100644 --- a/examples/LazyClass.pod +++ b/examples/LazyClass.pod @@ -12,7 +12,7 @@ use base 'Class::MOP::Class'; sub construct_instance { my ($class, %params) = @_; my $instance = {}; - foreach my $attr (map { $_->{attribute} } $class->compute_all_applicable_attributes()) { + foreach my $attr ($class->compute_all_applicable_attributes()) { # if the attr has an init_arg, use that, otherwise, # use the attributes name itself as the init_arg my $init_arg = $attr->has_init_arg() ? $attr->init_arg() : $attr->name;