| 1 | package Data::Model::Mixin::Queue::Q4M; | ||
| 2 | use strict; | ||
| 3 | use warnings; | ||
| 4 | |||
| 5 | use Carp (); | ||
| 6 | $Carp::Internal{(__PACKAGE__)}++; | ||
| 7 | |||
| 8 | sub register_method { | ||
| 9 | +{ | ||
| 10 | queue_running => \&queue_running, | ||
| 11 | queue_abort => \&queue_abort, | ||
| 12 | }; | ||
| 13 | } | ||
| 14 | |||
| 15 | sub queue_running { | ||
| 16 | my $self = $_[0]; | ||
| 17 | my $driver = $self->get_base_driver; | ||
| 18 | Carp::croak "Can't find base_driver" unless $driver; | ||
| 19 | |||
| 20 | $driver->queue_running( @_ ); | ||
| 21 | } | ||
| 22 | |||
| 23 | sub queue_abort { | ||
| 24 | my $self = $_[0]; | ||
| 25 | my $driver = $self->get_base_driver; | ||
| 26 | Carp::croak "Can't find base_driver" unless $driver; | ||
| 27 | |||
| 28 | $driver->queue_abort( @_ ); | ||
| 29 | } | ||
| 30 | |||
| 31 | 1; | ||
| 32 | |||
| 33 | =head1 NAME | ||
| 34 | |||
| 35 | Data::Model::Mixin::Queue::Q4M - add methods for Driver::Queue::Q4M | ||
| 36 | |||
| 37 | =head1 SEE ALSO | ||
| 38 | |||
| 39 | L<Data::Model::Driver::Queue::Q4M> | ||
| 40 | |||
| 41 | =head1 AUTHOR | ||
| 42 | |||
| 43 | Kazuhiro Osawa E<lt>yappo <at> shibuya <döt> plE<gt> | ||
| 44 | |||
| 45 | =head1 LICENSE | ||
| 46 | |||
| 47 | This library is free software; you can redistribute it and/or modify | ||
| 48 | it under the same terms as Perl itself. | ||
| 49 | |||
| 50 | =cut |