/usr/share/perl5/SVN/Class/Info.pm is in libsvn-class-perl 0.18-1.
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 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 | package SVN::Class::Info;
use strict;
use warnings;
use base qw( Rose::Object );
use Rose::Object::MakeMethods::Generic (
scalar => [
qw( path name wc_root _url root rev
node schedule author last_rev date
updated checksum uuid rel_url
)
]
);
use Carp;
use Data::Dump;
use SVN::Class::Repos;
our $VERSION = '0.18';
=head1 NAME
SVN::Class::Info - Subversion workspace info
=head1 SYNOPSIS
use SVN::Class;
my $file = svn_file( 'path/to/file' );
my $info = $file->info;
printf "repository URL = %s\n", $info->url;
=head1 DESCRIPTION
SVN::Class::Info represents the output of the C<svn info> command.
=head1 METHODS
SVN::Class::Info B<does not> inherit from SVN::Class, but only
Class::Accessor::Fast.
=cut
=head2 new( $dir->stdout )
Creates new SVN::Class::Info instance. The lone argument should
be an array ref of output from a call to the SVN::Class object's
info() method.
You normally do not need to use this method directly. See the SVN::Class
info() method.
=cut
sub new {
my $class = shift;
my $buf = shift;
if ( !$buf or !ref($buf) or ref($buf) ne 'ARRAY' ) {
croak "need array ref of 'svn info' output";
}
return $class->SUPER::new( _make_hash(@$buf) );
}
=head2 dump
Returns dump() of the object, just like SVN::Class->dump().
=cut
sub dump {
return Data::Dump::dump(@_);
}
my %fieldmap = (
Path => 'path',
Name => 'name',
URL => '_url',
'Working Copy Root Path' => 'wc_root',
'Relative URL' => 'rel_url',
'Repository Root' => 'root',
'Repository UUID' => 'uuid',
'Revision' => 'rev',
'Node Kind' => 'node',
'Schedule' => 'schedule',
'Last Changed Author' => 'author',
'Last Changed Rev' => 'last_rev',
'Last Changed Date' => 'date',
'Text Last Updated' => 'updated',
'Checksum' => 'checksum'
);
sub _make_hash {
my %hash;
for (@_) {
my ( $field, $value ) = (m/^([^:]+):\ (.+)$/);
if ( !exists $fieldmap{$field} ) {
croak "unknown field name in svn info: $field";
}
$hash{ $fieldmap{$field} } = $value;
}
return %hash;
}
=head2 url
Get the URL value. Returns a SVN::Class::Repos object.
=cut
sub url {
my $self = shift;
return SVN::Class::Repos->new( $self->_url );
}
=head2 path
=head2 wc_root
Working Copy Root Path
=head2 name
=head2 root
=head2 rev
=head2 node
=head2 schedule
=head2 author
=head2 last_rev
=head2 date
=head2 updated
=head2 checksum
=head2 uuid
Get/set the info params. These are really only useful as accessors (getters).
=head2 rel_url
=cut
1;
__END__
=head1 AUTHOR
Peter Karman, C<< <karman at cpan.org> >>
=head1 BUGS
Please report any bugs or feature requests to
C<bug-svn-class at rt.cpan.org>, or through the web interface at
L<http://rt.cpan.org/NoAuth/ReportBug.html?Queue=SVN-Class>.
I will be notified, and then you'll automatically be notified of progress on
your bug as I make changes.
=head1 SUPPORT
You can find documentation for this module with the perldoc command.
perldoc SVN::Class
You can also look for information at:
=over 4
=item * AnnoCPAN: Annotated CPAN documentation
L<http://annocpan.org/dist/SVN-Class>
=item * CPAN Ratings
L<http://cpanratings.perl.org/d/SVN-Class>
=item * RT: CPAN's request tracker
L<http://rt.cpan.org/NoAuth/Bugs.html?Dist=SVN-Class>
=item * Search CPAN
L<http://search.cpan.org/dist/SVN-Class>
=back
=head1 ACKNOWLEDGEMENTS
I looked at SVN::Agent before starting this project. It has
a different API, more like SVN::Client in the SVN::Core, but
I cribbed some of the ideas.
The Minnesota Supercomputing Institute C<< http://www.msi.umn.edu/ >>
sponsored the development of this software.
=head1 COPYRIGHT
Copyright 2008 by the Regents of the University of Minnesota.
This program is free software; you can redistribute it and/or modify it
under the same terms as Perl itself.
=head1 SEE ALSO
Path::Class, Class::Accessor::Fast, SVN::Agent, IPC::Cmd
|