blib/lib/Regexp/Storable.pm | |||
---|---|---|---|
Criterion | Covered | Total | % |
statement | 0 | 5 | 0.0 |
branch | 0 | 2 | 0.0 |
condition | n/a | ||
subroutine | 0 | 2 | 0.0 |
pod | n/a | ||
total | 0 | 9 | 0.0 |
line | stmt | bran | cond | sub | pod | time | code |
---|---|---|---|---|---|---|---|
1 | package Regexp::Storable; | ||||||
2 | |||||||
3 | our $VERSION = '0.06'; | ||||||
4 | |||||||
5 | package Regexp; | ||||||
6 | |||||||
7 | |||||||
8 | sub STORABLE_freeze { | ||||||
9 | 0 | 0 | my $serialized = substr($_[0], rindex($_[0],':')+1, -1); | ||||
10 | 0 | return $serialized; | |||||
11 | } | ||||||
12 | |||||||
13 | sub STORABLE_thaw { | ||||||
14 | 0 | 0 | my ( $original, $cloning, $thaw ) = @_; | ||||
15 | 0 | 0 | my $final = ($thaw) ? qr/$thaw/ : qr//; | ||||
16 | 0 | Regexp::Copy::re_copy($final, $original); | |||||
17 | } | ||||||
18 | |||||||
19 | 1; |