line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
1
|
|
|
|
|
|
|
package Argon::Task; |
2
|
|
|
|
|
|
|
# ABSTRACT: Base interface for Argon-runnable tasks |
3
|
|
|
|
|
|
|
$Argon::Task::VERSION = '0.17'; |
4
|
1
|
|
|
1
|
|
155396
|
use strict; |
|
1
|
|
|
|
|
6
|
|
|
1
|
|
|
|
|
23
|
|
5
|
1
|
|
|
1
|
|
5
|
use warnings; |
|
1
|
|
|
|
|
1
|
|
|
1
|
|
|
|
|
18
|
|
6
|
1
|
|
|
1
|
|
231
|
use Argon; |
|
1
|
|
|
|
|
2
|
|
|
1
|
|
|
|
|
83
|
|
7
|
|
|
|
|
|
|
|
8
|
|
|
|
|
|
|
sub new { |
9
|
1
|
|
|
1
|
0
|
80
|
my ($class, $code, $args) = @_; |
10
|
1
|
|
|
|
|
8
|
bless [$code, $args], $class; |
11
|
|
|
|
|
|
|
} |
12
|
|
|
|
|
|
|
|
13
|
|
|
|
|
|
|
sub run { |
14
|
2
|
|
|
2
|
0
|
437
|
Argon::ASSERT_EVAL_ALLOWED; |
15
|
1
|
|
|
|
|
2
|
my $self = shift; |
16
|
1
|
|
|
|
|
3
|
my ($str_code, $args) = @$self; |
17
|
1
|
|
|
1
|
|
12
|
my $code = eval "do { $str_code };"; |
|
1
|
|
|
|
|
4
|
|
|
1
|
|
|
|
|
92
|
|
|
1
|
|
|
|
|
72
|
|
18
|
1
|
|
|
|
|
23
|
$code->(@$args); |
19
|
|
|
|
|
|
|
} |
20
|
|
|
|
|
|
|
|
21
|
|
|
|
|
|
|
1; |
22
|
|
|
|
|
|
|
|
23
|
|
|
|
|
|
|
__END__ |
24
|
|
|
|
|
|
|
|
25
|
|
|
|
|
|
|
=pod |
26
|
|
|
|
|
|
|
|
27
|
|
|
|
|
|
|
=encoding UTF-8 |
28
|
|
|
|
|
|
|
|
29
|
|
|
|
|
|
|
=head1 NAME |
30
|
|
|
|
|
|
|
|
31
|
|
|
|
|
|
|
Argon::Task - Base interface for Argon-runnable tasks |
32
|
|
|
|
|
|
|
|
33
|
|
|
|
|
|
|
=head1 VERSION |
34
|
|
|
|
|
|
|
|
35
|
|
|
|
|
|
|
version 0.17 |
36
|
|
|
|
|
|
|
|
37
|
|
|
|
|
|
|
=head1 AUTHOR |
38
|
|
|
|
|
|
|
|
39
|
|
|
|
|
|
|
Jeff Ober <sysread@fastmail.fm> |
40
|
|
|
|
|
|
|
|
41
|
|
|
|
|
|
|
=head1 COPYRIGHT AND LICENSE |
42
|
|
|
|
|
|
|
|
43
|
|
|
|
|
|
|
This software is copyright (c) 2017 by Jeff Ober. |
44
|
|
|
|
|
|
|
|
45
|
|
|
|
|
|
|
This is free software; you can redistribute it and/or modify it under |
46
|
|
|
|
|
|
|
the same terms as the Perl 5 programming language system itself. |
47
|
|
|
|
|
|
|
|
48
|
|
|
|
|
|
|
=cut |