line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
1
|
|
|
|
|
|
|
package Template::Plugin::Shuffle; |
2
|
|
|
|
|
|
|
|
3
|
2
|
|
|
2
|
|
95409
|
use strict; |
|
2
|
|
|
|
|
5
|
|
|
2
|
|
|
|
|
97
|
|
4
|
2
|
|
|
2
|
|
11
|
use vars qw($VERSION); |
|
2
|
|
|
|
|
2
|
|
|
2
|
|
|
|
|
126
|
|
5
|
|
|
|
|
|
|
$VERSION = "0.02"; |
6
|
|
|
|
|
|
|
|
7
|
2
|
|
|
2
|
|
10
|
use base qw(Template::Plugin); |
|
2
|
|
|
|
|
8
|
|
|
2
|
|
|
|
|
1740
|
|
8
|
2
|
|
|
2
|
|
5873
|
use Template::Plugin; |
|
2
|
|
|
|
|
4
|
|
|
2
|
|
|
|
|
43
|
|
9
|
2
|
|
|
2
|
|
907
|
use Template::Stash; |
|
2
|
|
|
|
|
17593
|
|
|
2
|
|
|
|
|
56
|
|
10
|
2
|
|
|
2
|
|
1642
|
use Algorithm::Numerical::Shuffle qw(shuffle); |
|
2
|
|
|
|
|
800
|
|
|
2
|
|
|
|
|
293
|
|
11
|
|
|
|
|
|
|
|
12
|
|
|
|
|
|
|
sub new { |
13
|
1
|
|
|
1
|
1
|
36
|
my ($pkg, $context, @args) = @_; |
14
|
|
|
|
|
|
|
$context->define_vmethod('LIST', shuffle => sub { |
15
|
1
|
|
|
1
|
|
41
|
return [ shuffle(@{$_[0]}) ]; |
|
1
|
|
|
|
|
4
|
|
16
|
1
|
|
|
|
|
9
|
}); |
17
|
1
|
|
|
|
|
42
|
return $pkg->SUPER::new($context, @args); |
18
|
|
|
|
|
|
|
} |
19
|
|
|
|
|
|
|
|
20
|
|
|
|
|
|
|
1; |
21
|
|
|
|
|
|
|
__END__ |