- or download this
$ cat ChainOfResponsibilityIf.pm
package PM::1081903::ChainOfResponsibilityIf;
...
requires 'addHandler';
1;
- or download this
$ cat CoRHandler.pm
package PM::1081903::CoRHandler;
...
sub _processCommand { 1 }
1;
- or download this
$ cat GenericCommandHandler.pm
package PM::1081903::GenericCommandHandler;
...
override '_processCommand' => sub { };
1;
- or download this
$ cat GCHSuccessor.pm
package PM::1081903::GCHSuccessor;
...
);
1;
- or download this
#!/usr/bin/env perl
...
my $gchs = PM::1081903::GCHSuccessor::->new(
successor => PM::1081903::GenericCommandHandler::->new()
);
- or download this
Attribute (successor) does not pass the type constraint because: Valid
+ation failed for 'PM::1081903::ChainOfResposibilityIf' with value PM:
+:1081903::GenericCommandHandler=HASH(0x7fa22882a610) (not isa PM::108
+1903::ChainOfResposibilityIf) at /Users/ken/perl5/perlbrew/perls/perl
+-5.18.1t/lib/site_perl/5.18.1/darwin-thread-multi-2level/Moose/Meta/A
+ttribute.pm line 1279.
Moose::Meta::Attribute::verify_against_type_constraint('Moose::Met
+a::Attribute=HASH(0x7fa2292b89e0)', 'PM::1081903::GenericCommandHandl
+er=HASH(0x7fa22882a610)', 'instance', 'PM::1081903::GCHSuccessor=HASH
+(0x7fa2288525c8)') called at /Users/ken/perl5/perlbrew/perls/perl-5.1
+8.1t/lib/site_perl/5.18.1/darwin-thread-multi-2level/Moose/Meta/Attri
+bute.pm line 1266
...
Class::MOP::Class::new_object('Moose::Meta::Class=HASH(0x7fa22929a
+2e8)', 'HASH(0x7fa2290d5108)') called at /Users/ken/perl5/perlbrew/pe
+rls/perl-5.18.1t/lib/site_perl/5.18.1/darwin-thread-multi-2level/Moos
+e/Meta/Class.pm line 284
Moose::Meta::Class::new_object('Moose::Meta::Class=HASH(0x7fa22929
+a2e8)', 'HASH(0x7fa2290d5108)') called at /Users/ken/perl5/perlbrew/p
+erls/perl-5.18.1t/lib/site_perl/5.18.1/darwin-thread-multi-2level/Moo
+se/Object.pm line 28
Moose::Object::new('PM::1081903::GCHSuccessor', 'successor', 'PM::
+1081903::GenericCommandHandler=HASH(0x7fa22882a610)') called at ./pm_
+example.pl line 9
- or download this
isa => 'PM::1081903::ChainOfResposibilityIf',
- or download this
isa => 'PM::1081903::CoRHandler',
- or download this
print $gchs->successor->handleRequest(), "\n";