- or download this
# TestRole role:
package TestRole;
...
$c->add_something("123");
my @arr = $c->test_method();
print Dumper(\@arr) . "\n";
- or download this
'TestRole' requires the method 'test_method' to be implemented by 'Con
+sumer'
- or download this
handles => {
test_method => 'elements',
add_something => 'push',
},
- or download this
sub add_something {
my ($self, %args) = @_;
...
sub test_method {
# add the 'elements' code here.
}