| 1 | package SVN::Dump::Text; | ||
| 2 | |||
| 3 | 13 | ▶ | use strict; |
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||
| 4 | 13 | ▶ | use warnings; |
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||
| 5 | |||
| 6 | 13 | my $NL = "\012"; | |
| 7 | |||
| 8 | # blessed string reference | ||
| 9 | sub new { | ||
| 10 | 99 | ▶ | my ( $class, @args ) = @_; |
|
Subroutine
new: called CC=1 SCAR=0.0
Pod
documented
| |||
| 11 | 99 | return bless \( join '', @args ), $class; | |
| 12 | } | ||
| 13 | |||
| 14 | sub set { | ||
| 15 | 27 | ▶ | my ( $self, $text ) = @_; |
|
Subroutine
set: called CC=1 SCAR=0.0
Pod
documented
| |||
| 16 | 27 | $$self = $text; | |
| 17 | } | ||
| 18 | 180 | ▶ | sub get { ${ $_[0] } } |
|
Subroutine
get: called CC=1 SCAR=0.0
Pod
documented
| |||
| 19 | 13 | *as_string = \&get; | |
| 20 | |||
| 21 | sub digest { | ||
| 22 | 7 | ▶ | my ( $self, $algo ) = @_; |
|
Subroutine
digest: called CC=1 SCAR=0.0
Pod
documented
| |||
| 23 | 7 | return eval { | |
| 24 | 7 | require Digest; | |
| 25 | 7 | Digest->new( uc $algo )->add($$self)->hexdigest; | |
| 26 | }; | ||
| 27 | } | ||
| 28 | |||
| 29 | 13 | 1; | |
| 30 | |||
| 31 | __END__ | ||