line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
1
|
|
|
|
|
|
|
package Task::Pluggable; |
2
|
1
|
|
|
1
|
|
26383
|
use warnings; |
|
1
|
|
|
|
|
2
|
|
|
1
|
|
|
|
|
31
|
|
3
|
1
|
|
|
1
|
|
5
|
use strict; |
|
1
|
|
|
|
|
2
|
|
|
1
|
|
|
|
|
39
|
|
4
|
1
|
|
|
1
|
|
6
|
use base qw(Class::Data::Inheritable Class::Accessor); |
|
1
|
|
|
|
|
6
|
|
|
1
|
|
|
|
|
1021
|
|
5
|
1
|
|
|
1
|
|
4402
|
use Task::Pluggable::CommandLineTaskManager; |
|
1
|
|
|
|
|
3
|
|
|
1
|
|
|
|
|
14
|
|
6
|
|
|
|
|
|
|
__PACKAGE__->mk_classdata('task_manager'); |
7
|
|
|
|
|
|
|
|
8
|
|
|
|
|
|
|
=head1 NAME |
9
|
|
|
|
|
|
|
|
10
|
|
|
|
|
|
|
Task::Pluggable - Pluggable task module |
11
|
|
|
|
|
|
|
|
12
|
|
|
|
|
|
|
=head1 VERSION |
13
|
|
|
|
|
|
|
|
14
|
|
|
|
|
|
|
Version 0.02 |
15
|
|
|
|
|
|
|
|
16
|
|
|
|
|
|
|
=cut |
17
|
|
|
|
|
|
|
|
18
|
|
|
|
|
|
|
our $VERSION = '0.02'; |
19
|
|
|
|
|
|
|
|
20
|
|
|
|
|
|
|
|
21
|
|
|
|
|
|
|
=head1 SYNOPSIS |
22
|
|
|
|
|
|
|
|
23
|
|
|
|
|
|
|
Create new task directory |
24
|
|
|
|
|
|
|
|
25
|
|
|
|
|
|
|
for example |
26
|
|
|
|
|
|
|
|
27
|
|
|
|
|
|
|
mkdir task_dir |
28
|
|
|
|
|
|
|
cd task_dir |
29
|
|
|
|
|
|
|
perl -MTask::Pluggable -e "Task::Pluggable::create" |
30
|
|
|
|
|
|
|
./bin/ptm |
31
|
|
|
|
|
|
|
|
32
|
|
|
|
|
|
|
=head1 FUNCTIONS |
33
|
|
|
|
|
|
|
|
34
|
|
|
|
|
|
|
=head2 new |
35
|
|
|
|
|
|
|
|
36
|
|
|
|
|
|
|
create instanse |
37
|
|
|
|
|
|
|
|
38
|
|
|
|
|
|
|
|
39
|
|
|
|
|
|
|
=cut |
40
|
|
|
|
|
|
|
|
41
|
|
|
|
|
|
|
sub new{ |
42
|
0
|
|
|
0
|
1
|
|
my $class = shift; |
43
|
0
|
|
|
|
|
|
my $application_name = shift; |
44
|
0
|
|
|
|
|
|
my $self = $class->SUPER::new(); |
45
|
0
|
|
|
|
|
|
return $self; |
46
|
|
|
|
|
|
|
} |
47
|
|
|
|
|
|
|
|
48
|
|
|
|
|
|
|
=head2 create |
49
|
|
|
|
|
|
|
|
50
|
|
|
|
|
|
|
create task directory and task script |
51
|
|
|
|
|
|
|
|
52
|
|
|
|
|
|
|
=cut |
53
|
|
|
|
|
|
|
sub create { |
54
|
0
|
|
|
0
|
1
|
|
my $self = shift; |
55
|
0
|
|
|
|
|
|
my $command_line = Task::Pluggable::CommandLineTaskManager->new(); |
56
|
0
|
|
|
|
|
|
$command_line->task_name('create_task_env'); |
57
|
0
|
|
|
|
|
|
$command_line->do_task(); |
58
|
|
|
|
|
|
|
} |
59
|
|
|
|
|
|
|
|
60
|
|
|
|
|
|
|
|
61
|
|
|
|
|
|
|
=head2 run |
62
|
|
|
|
|
|
|
|
63
|
|
|
|
|
|
|
run task |
64
|
|
|
|
|
|
|
./bin/ptm |
65
|
|
|
|
|
|
|
|
66
|
|
|
|
|
|
|
internel code is |
67
|
|
|
|
|
|
|
|
68
|
|
|
|
|
|
|
$task = new Task::Pluggable(); |
69
|
|
|
|
|
|
|
$task->run(Task::Pluggable::CommandLineTaskManager); |
70
|
|
|
|
|
|
|
|
71
|
|
|
|
|
|
|
=cut |
72
|
|
|
|
|
|
|
sub run{ |
73
|
0
|
|
|
0
|
1
|
|
my $self = shift; |
74
|
0
|
|
|
|
|
|
my $manager = shift; |
75
|
0
|
|
|
|
|
|
$self->task_manager($manager); |
76
|
0
|
|
|
|
|
|
$self->task_manager->load_args(); |
77
|
0
|
|
|
|
|
|
$self->task_manager->do_task(); |
78
|
|
|
|
|
|
|
} |
79
|
|
|
|
|
|
|
|
80
|
|
|
|
|
|
|
|
81
|
|
|
|
|
|
|
=head1 AUTHOR |
82
|
|
|
|
|
|
|
|
83
|
|
|
|
|
|
|
Masafumi Yoshida, C<< >> |
84
|
|
|
|
|
|
|
|
85
|
|
|
|
|
|
|
=head1 BUGS |
86
|
|
|
|
|
|
|
|
87
|
|
|
|
|
|
|
Please report any bugs or feature requests to C, or through |
88
|
|
|
|
|
|
|
the web interface at L. I will be notified, and then you'll |
89
|
|
|
|
|
|
|
automatically be notified of progress on your bug as I make changes. |
90
|
|
|
|
|
|
|
|
91
|
|
|
|
|
|
|
|
92
|
|
|
|
|
|
|
|
93
|
|
|
|
|
|
|
|
94
|
|
|
|
|
|
|
=head1 SUPPORT |
95
|
|
|
|
|
|
|
|
96
|
|
|
|
|
|
|
You can find documentation for this module with the perldoc command. |
97
|
|
|
|
|
|
|
|
98
|
|
|
|
|
|
|
perldoc Task::Pluggable |
99
|
|
|
|
|
|
|
|
100
|
|
|
|
|
|
|
|
101
|
|
|
|
|
|
|
You can also look for information at: |
102
|
|
|
|
|
|
|
|
103
|
|
|
|
|
|
|
=over 4 |
104
|
|
|
|
|
|
|
|
105
|
|
|
|
|
|
|
=item * RT: CPAN's request tracker |
106
|
|
|
|
|
|
|
|
107
|
|
|
|
|
|
|
L |
108
|
|
|
|
|
|
|
|
109
|
|
|
|
|
|
|
=item * AnnoCPAN: Annotated CPAN documentation |
110
|
|
|
|
|
|
|
|
111
|
|
|
|
|
|
|
L |
112
|
|
|
|
|
|
|
|
113
|
|
|
|
|
|
|
=item * CPAN Ratings |
114
|
|
|
|
|
|
|
|
115
|
|
|
|
|
|
|
L |
116
|
|
|
|
|
|
|
|
117
|
|
|
|
|
|
|
=item * Search CPAN |
118
|
|
|
|
|
|
|
|
119
|
|
|
|
|
|
|
L |
120
|
|
|
|
|
|
|
|
121
|
|
|
|
|
|
|
=back |
122
|
|
|
|
|
|
|
|
123
|
|
|
|
|
|
|
|
124
|
|
|
|
|
|
|
=head1 ACKNOWLEDGEMENTS |
125
|
|
|
|
|
|
|
|
126
|
|
|
|
|
|
|
|
127
|
|
|
|
|
|
|
=head1 COPYRIGHT & LICENSE |
128
|
|
|
|
|
|
|
|
129
|
|
|
|
|
|
|
Copyright 2009 Masafumi Yoshida, all rights reserved. |
130
|
|
|
|
|
|
|
|
131
|
|
|
|
|
|
|
This program is free software; you can redistribute it and/or modify it |
132
|
|
|
|
|
|
|
under the same terms as Perl itself. |
133
|
|
|
|
|
|
|
|
134
|
|
|
|
|
|
|
|
135
|
|
|
|
|
|
|
=cut |
136
|
|
|
|
|
|
|
|
137
|
|
|
|
|
|
|
1; # End of Task::Pluggable |