1 |
use strict; |
2 |
use warnings; |
3 |
|
4 |
=head1 NAME |
5 |
|
6 |
Transports::Action::transport |
7 |
|
8 |
=cut |
9 |
|
10 |
package Transports::Action::transport; |
11 |
use base qw/Transports::Action Jifty::Action/; |
12 |
|
13 |
=head2 arguments |
14 |
|
15 |
=cut |
16 |
|
17 |
sub arguments { |
18 |
# This should return an arrayref of arguments |
19 |
} |
20 |
|
21 |
=head2 take_action |
22 |
|
23 |
=cut |
24 |
|
25 |
sub take_action { |
26 |
my $self = shift; |
27 |
|
28 |
# Custom action code |
29 |
|
30 |
$self->report_success if not $self->result->failure; |
31 |
|
32 |
return 1; |
33 |
} |
34 |
|
35 |
=head2 report_success |
36 |
|
37 |
=cut |
38 |
|
39 |
sub report_success { |
40 |
my $self = shift; |
41 |
# Your success message here |
42 |
$self->result->message('Success'); |
43 |
} |
44 |
|
45 |
=head2 available_actions |
46 |
|
47 |
=cut |
48 |
|
49 |
sub available_values { |
50 |
my $self = shift; |
51 |
|
52 |
return qw/foo bar baz/; |
53 |
} |
54 |
|
55 |
1; |
56 |
|