diff options
author | dakkar <dakkar@luxion> | 2006-01-28 11:21:58 +0000 |
---|---|---|
committer | dakkar <dakkar@luxion> | 2006-01-28 11:21:58 +0000 |
commit | 8b30558e59d43c78394c3c3204d30752ffb1d26c (patch) | |
tree | 61d4e346fc2ad996514dd0c8c0e16f392c341a54 /t/lib | |
parent | pipeline fatte e testate, forse fix #2 (diff) | |
download | WebCoso-8b30558e59d43c78394c3c3204d30752ffb1d26c.tar.gz WebCoso-8b30558e59d43c78394c3c3204d30752ffb1d26c.tar.bz2 WebCoso-8b30558e59d43c78394c3c3204d30752ffb1d26c.zip |
usato Class::Std anche negli step
git-svn-id: svn://luxion/repos/WebCoso/trunk@143 fcb26f47-9200-0410-b104-b98ab5b095f3
Diffstat (limited to 't/lib')
-rw-r--r-- | t/lib/WebCoso/Step/Step1.pm | 11 | ||||
-rw-r--r-- | t/lib/WebCoso/Step/Step2.pm | 11 |
2 files changed, 12 insertions, 10 deletions
diff --git a/t/lib/WebCoso/Step/Step1.pm b/t/lib/WebCoso/Step/Step1.pm index 9b18d16..c9f2c96 100644 --- a/t/lib/WebCoso/Step/Step1.pm +++ b/t/lib/WebCoso/Step/Step1.pm @@ -1,14 +1,19 @@ package WebCoso::Step::Step1; use base 'WebCoso::Step::Base'; +use Class::Std; use strict; use warnings; +{ +my %calls_of :ATTR(:default<[]> :get<calls>); +my %p1_of :ATTR(:init_arg<p1>); + sub process { my ($self,$resource,$stage)=@_; my $out='stuff'; - push @{$self->{calls}},{ + push @{$calls_of{ident $self}},{ resource => $resource, out_res => $out, stage => $stage, @@ -17,9 +22,5 @@ sub process { return $out; } -sub get_calls { - my ($self)=@_; - return @{$self->{calls}}; } - 1; diff --git a/t/lib/WebCoso/Step/Step2.pm b/t/lib/WebCoso/Step/Step2.pm index 0a45e3c..08a32c2 100644 --- a/t/lib/WebCoso/Step/Step2.pm +++ b/t/lib/WebCoso/Step/Step2.pm @@ -1,14 +1,19 @@ package WebCoso::Step::Step2; use base 'WebCoso::Step::Base'; +use Class::Std; use strict; use warnings; +{ +my %calls_of :ATTR(:default<[]> :get<calls>); +my %p2_of :ATTR(:init_arg<p2>); + sub process { my ($self,$resource,$stage)=@_; my $out='stuff'; - push @{$self->{calls}},{ + push @{$calls_of{ident $self}},{ resource => $resource, out_res => $out, stage => $stage, @@ -17,9 +22,5 @@ sub process { return $out; } -sub get_calls { - my ($self)=@_; - return @{$self->{calls}}; } - 1; |