line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
1
|
1
|
|
|
1
|
|
21
|
use 5.006; |
|
1
|
|
|
|
|
3
|
|
|
1
|
|
|
|
|
45
|
|
2
|
1
|
|
|
1
|
|
5
|
use strict; |
|
1
|
|
|
|
|
2
|
|
|
1
|
|
|
|
|
40
|
|
3
|
1
|
|
|
1
|
|
5
|
use warnings; |
|
1
|
|
|
|
|
3
|
|
|
1
|
|
|
|
|
73
|
|
4
|
|
|
|
|
|
|
|
5
|
|
|
|
|
|
|
package Tie::Array::Stack; |
6
|
|
|
|
|
|
|
|
7
|
|
|
|
|
|
|
our $AUTHORITY = 'cpan:TOBYINK'; |
8
|
|
|
|
|
|
|
our $VERSION = '0.003'; |
9
|
|
|
|
|
|
|
|
10
|
1
|
|
|
1
|
|
5
|
use Carp; |
|
1
|
|
|
|
|
3
|
|
|
1
|
|
|
|
|
60
|
|
11
|
1
|
|
|
1
|
|
5
|
use Tie::Array (); |
|
1
|
|
|
|
|
3
|
|
|
1
|
|
|
|
|
197
|
|
12
|
|
|
|
|
|
|
our @ISA = qw(Tie::StdArray); |
13
|
|
|
|
|
|
|
|
14
|
|
|
|
|
|
|
eval qq[ |
15
|
|
|
|
|
|
|
sub $_ { croak "$_ operation not permitted on stack" } 1 |
16
|
0
|
|
|
0
|
|
0
|
] || die $@ for qw(STORE SHIFT UNSHIFT EXISTS DELETE SPLICE); |
|
0
|
|
|
0
|
|
0
|
|
|
1
|
|
|
1
|
|
1738
|
|
|
0
|
|
|
0
|
|
0
|
|
|
1
|
|
|
1
|
|
620
|
|
|
1
|
|
|
1
|
|
605
|
|
17
|
|
|
|
|
|
|
|
18
|
|
|
|
|
|
|
sub FETCH |
19
|
|
|
|
|
|
|
{ |
20
|
3
|
|
|
3
|
|
2144
|
my $self = shift; |
21
|
|
|
|
|
|
|
|
22
|
|
|
|
|
|
|
# The final item on the stack can be peeked at. |
23
|
3
|
100
|
66
|
|
|
19
|
if ($_[0] == -1 or $_[0] + 1 == scalar(@$self)) |
24
|
|
|
|
|
|
|
{ |
25
|
2
|
|
|
|
|
11
|
return $self->SUPER::FETCH(@_); |
26
|
|
|
|
|
|
|
} |
27
|
|
|
|
|
|
|
|
28
|
1
|
|
|
|
|
96
|
croak "FETCH operation not permitted on stack"; |
29
|
|
|
|
|
|
|
} |
30
|
|
|
|
|
|
|
|
31
|
|
|
|
|
|
|
1; |
32
|
|
|
|
|
|
|
|
33
|
|
|
|
|
|
|
|
34
|
|
|
|
|
|
|
__END__ |