Commit | Line | Data |
---|---|---|
b63a955f | 1 | package ORTestClass; |
2 | ||
3 | use Moo; | |
4 | ||
5 | has counter => (is => 'rwp', default => sub { 0 }); | |
6 | ||
7 | sub increment { $_[0]->_set_counter($_[0]->counter + 1); } | |
8 | ||
9 | sub pid { $$ } | |
10 | ||
fe6c9a7f | 11 | sub call_callback { |
12 | my ($self, $value, $cb) = @_; | |
13 | $cb->(); | |
14 | return $value; | |
15 | } | |
16 | ||
b63a955f | 17 | 1; |