/usr/share/perl5/SVN/Dump/Text.pm is in libsvn-dump-perl 0.06-2.
This file is owned by root:root, with mode 0o644.
The actual contents of the file can be viewed below.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 | package SVN::Dump::Text;
use strict;
use warnings;
my $NL = "\012";
# blessed string reference
sub new {
my ( $class, @args ) = @_;
return bless \( join '', @args ), $class;
}
sub set {
my ( $self, $text ) = @_;
$$self = $text;
}
sub get { ${ $_[0] } }
*as_string = \&get;
sub digest {
my ( $self, $algo ) = @_;
return eval {
require Digest;
Digest->new( uc $algo )->add($$self)->hexdigest;
};
}
1;
__END__
=head1 NAME
SVN::Dump::Text - A text block from a svn dump
=head1 SYNOPSIS
# SVN::Dump::Text objects are returned by the read_text_block()
# method of SVN::Dump::Reader
=head1 DESCRIPTION
A SVN::Dump::Text object represents the text of a
SVN dump record.
=head1 METHODS
The following methods are available:
=over 4
=item new( $text )
Create a new SVN::Dump::Text object, initialised with the given text.
=item get()
Return the text of the SVN::Dump::Text object.
=item set( $text )
Set the text of the SVN::Dump::Text object.
=item as_string()
Return a string representation of the text block.
=item digest( $algo )
Return a digest of the text computed with the C<$algo> algorithm in
hexadecimal form. See the L<Digest> module for valid values of C<$algo>.
Return C<undef> if the digest algorithm is not supported.
=back
=head1 SEE ALSO
L<SVN::Dump::Reader>, L<SVN::Dump::Record>.
=head1 COPYRIGHT
Copyright 2006-2013 Philippe Bruhat (BooK), All Rights Reserved.
=head1 LICENSE
This program is free software; you can redistribute it and/or modify it
under the same terms as Perl itself.
=cut
|