blib/lib/WWW/Mechanize/Plugin/Snapshot.pm | |||
---|---|---|---|
Criterion | Covered | Total | % |
statement | 55 | 133 | 41.3 |
branch | 0 | 50 | 0.0 |
condition | 0 | 14 | 0.0 |
subroutine | 10 | 19 | 52.6 |
pod | 4 | 4 | 100.0 |
total | 69 | 220 | 31.3 |
line | stmt | bran | cond | sub | pod | time | code |
---|---|---|---|---|---|---|---|
1 | package WWW::Mechanize::Plugin::Snapshot; | ||||||
2 | |||||||
3 | our $VERSION = '0.20'; | ||||||
4 | |||||||
5 | 7 | 7 | 1734015 | use warnings; | |||
7 | 15 | ||||||
7 | 213 | ||||||
6 | 7 | 7 | 38 | use strict; | |||
7 | 14 | ||||||
7 | 233 | ||||||
7 | 7 | 7 | 38 | use Carp; | |||
7 | 18 | ||||||
7 | 508 | ||||||
8 | |||||||
9 | 7 | 7 | 44 | use base qw(Class::Accessor::Fast); | |||
7 | 11 | ||||||
7 | 6175 | ||||||
10 | __PACKAGE__->mk_accessors(qw(_snap_dir_made _suffix snapshot_comment | ||||||
11 | snap_prefix _run_tag _snap_count)); | ||||||
12 | |||||||
13 | 7 | 7 | 24117 | use File::Path; | |||
7 | 16 | ||||||
7 | 465 | ||||||
14 | 7 | 7 | 39 | use File::Spec; | |||
7 | 13 | ||||||
7 | 150 | ||||||
15 | 7 | 7 | 15411 | use Text::Template; | |||
7 | 27440 | ||||||
7 | 385 | ||||||
16 | 7 | 7 | 2936 | use Data::Dumper; | |||
7 | 22657 | ||||||
7 | 1413 | ||||||
17 | |||||||
18 | my %template = ( | ||||||
19 | horizontal => { | ||||||
20 | frame =>< | ||||||
21 | |||||||
22 | |||||||
23 | |
||||||
24 | |||||||
25 | |||||||
26 | |||||||
27 | |||||||
28 | |||||||
29 | |||||||
30 | |||||||
31 | EOS | ||||||
32 | |||||||
33 | content=>< | ||||||
34 | [\$content] | ||||||
35 | EOS | ||||||
36 | |||||||
37 | debug=>< | ||||||
38 | |||||||
39 | |||||||
40 | |
||||||
41 | |||||||
47 | |||||||
48 | |||||||
49 | Description[\$comment] |
||||||
50 | Original URL[\$url] |
||||||
51 | HTTP request[\$req] |
||||||
52 | HTTP response[\$res] |
||||||
53 | Cookie jar[\$jar] |
||||||
54 | |||||||
55 | |||||||
56 | EOS | ||||||
57 | }, | ||||||
58 | |||||||
59 | vertical => { | ||||||
60 | frame =>< | ||||||
61 | |||||||
62 | |||||||
63 | |
||||||
64 | |||||||
65 | |||||||
66 | |||||||
67 | |||||||
68 | |||||||
69 | |||||||
70 | |||||||
71 | EOS | ||||||
72 | |||||||
73 | content=>< | ||||||
74 | [\$content] | ||||||
75 | EOS | ||||||
76 | |||||||
77 | debug=>< | ||||||
78 | |||||||
79 | |||||||
80 | |
||||||
81 | |||||||
87 | |||||||
88 | |||||||
89 | Description[\$comment] |
||||||
90 | Original URL[\$url] |
||||||
91 | HTTP request[\$req] |
||||||
92 | HTTP response[\$res] |
||||||
93 | Cookie jar[\$jar] |
||||||
94 | |||||||
95 | |||||||
96 | EOS | ||||||
97 | }, | ||||||
98 | |||||||
99 | popup => { | ||||||
100 | frame =>< | ||||||
101 | |
||||||
102 | |||||||
108 | |||||||
109 | |||||||
110 | Pop up original page in another window. |
||||||
111 | |||||||
112 | |||||||
113 |