| 1 | package Regexp::Storable; | ||||||||||
| 2 | |||||||||||
| 3 | 1 | our $VERSION = '0.06'; | |||||||||
| 4 | |||||||||||
| 5 | package Regexp; | ||||||||||
| 6 | |||||||||||
| 7 | |||||||||||
| 8 | 0 | ▶ | sub STORABLE_freeze { | ||||||||
|
Subroutine
STORABLE_freeze: not called CC=1 SCAR=6.9
| |||||||||||
| 9 | 0 | my $serialized = substr($_[0], rindex($_[0],':')+1, -1); | |||||||||
| 10 | 0 | return $serialized; | |||||||||
| 11 | } | ||||||||||
| 12 | |||||||||||
| 13 | 0 | ▶ | sub STORABLE_thaw { | ||||||||
|
Subroutine
STORABLE_thaw: not called CC=2 SCAR=17.9
| |||||||||||
| 14 | 0 | my ( $original, $cloning, $thaw ) = @_; | |||||||||
| 15 | 0 | ▶ | my $final = ($thaw) ? qr/$thaw/ : qr//; | ||||||||
|
Branch: 1 branch
| |||||||||||
| 16 | 0 | Regexp::Copy::re_copy($final, $original); | |||||||||
| 17 | } | ||||||||||
| 18 | |||||||||||
| 19 | 1 | 1; | |||||||||