[Bast-commits] r9644 - in Class-Accessor-Grouped/trunk:
lib/Class/Accessor t
caelum at dev.catalyst.perl.org
caelum at dev.catalyst.perl.org
Wed Aug 11 04:10:04 GMT 2010
Author: caelum
Date: 2010-08-11 05:10:04 +0100 (Wed, 11 Aug 2010)
New Revision: 9644
Added:
Class-Accessor-Grouped/trunk/t/pod_spelling.t
Modified:
Class-Accessor-Grouped/trunk/lib/Class/Accessor/Grouped.pm
Log:
re-add pod_spelling.t since it is in MANIFEST.SKIP
Modified: Class-Accessor-Grouped/trunk/lib/Class/Accessor/Grouped.pm
===================================================================
--- Class-Accessor-Grouped/trunk/lib/Class/Accessor/Grouped.pm 2010-08-11 03:59:09 UTC (rev 9643)
+++ Class-Accessor-Grouped/trunk/lib/Class/Accessor/Grouped.pm 2010-08-11 04:10:04 UTC (rev 9644)
@@ -188,14 +188,17 @@
my $get = "get_$group";
# eval for faster fastiness
- return eval "sub {
+ my $code = eval "sub {
if(\@_ > 1) {
return shift->$set('$field', \@_);
}
else {
return shift->$get('$field');
}
- };"
+ };";
+ Carp::croak $@ if $@;
+
+ return $code;
}
=head2 make_group_ro_accessor
@@ -218,7 +221,7 @@
my $get = "get_$group";
- return eval "sub {
+ my $code = eval "sub {
if(\@_ > 1) {
my \$caller = caller;
Carp::croak(\"'\$caller' cannot alter the value of '$field' on \".
@@ -227,7 +230,10 @@
else {
return shift->$get('$field');
}
- };"
+ };";
+ Carp::croak $@ if $@;
+
+ return $code;
}
=head2 make_group_wo_accessor
@@ -250,7 +256,7 @@
my $set = "set_$group";
- return eval "sub {
+ my $code = eval "sub {
unless (\@_ > 1) {
my \$caller = caller;
Carp::croak(\"'\$caller' cannot access the value of '$field' on \".
@@ -259,7 +265,10 @@
else {
return shift->$set('$field', \@_);
}
- };"
+ };";
+ Carp::croak $@ if $@;
+
+ return $code;
}
=head2 get_simple
Added: Class-Accessor-Grouped/trunk/t/pod_spelling.t
===================================================================
--- Class-Accessor-Grouped/trunk/t/pod_spelling.t (rev 0)
+++ Class-Accessor-Grouped/trunk/t/pod_spelling.t 2010-08-11 04:10:04 UTC (rev 9644)
@@ -0,0 +1,37 @@
+#!perl -w
+# $Id: pod_spelling.t 7003 2009-07-08 02:24:06Z claco $
+use strict;
+use warnings;
+
+BEGIN {
+ use lib 't/lib';
+ use Test::More;
+
+ plan skip_all => 'set TEST_AUTHOR to enable this test' unless $ENV{TEST_AUTHOR};
+
+ eval 'use Test::Spelling 0.11';
+ plan skip_all => 'Test::Spelling 0.11 not installed' if $@;
+};
+
+set_spell_cmd('aspell list');
+
+add_stopwords(<DATA>);
+
+all_pod_files_spelling_ok();
+
+__DATA__
+Bowden
+Raygun
+Roditi
+isa
+mst
+behaviour
+further
+overridable
+Laco
+Pauley
+claco
+stylings
+fieldspec
+listref
+getters
More information about the Bast-commits
mailing list