Fix compiler warning due to missing function prototype.
[svn.git] / subversion / bindings / swig / perl / native / Core.pm
blob7a1281e216af62c39b5803b511e4930942e64dac
1 use strict;
2 use warnings;
4 package SVN::Core;
5 use SVN::Base qw(Core svn_ VERSION);
6 # Some build tool hates VERSION assign across two lines.
7 $SVN::Core::VERSION = "$SVN::Core::VER_MAJOR.$SVN::Core::VER_MINOR.$SVN::Core::VER_MICRO";
9 =head1 NAME
11 SVN::Core - Core module of the subversion perl bindings
13 =head1 SYNOPSIS
15 use SVN::Core; # does apr_initialize and cleanup for you
17 # create a root pool and set it as default pool for later use
18 my $pool = SVN::Pool->new_default;
20 sub something {
21 # create a subpool of the current default pool
22 my $pool = SVN::Pool->new_default_sub;
23 # some svn operations...
25 # $pool gets destroyed and the previous default pool
26 # is restored when $pool's lexical scope ends
29 # svn_stream_t as native perl io handle
30 my $stream = $txn->root->apply_text('trunk/filea', undef);
31 print $stream $text;
32 close $stream;
34 # native perl io handle as svn_stream_t
35 SVN::Repos::dump_fs($repos, \*STDOUT, \*STDERR,
36 0, $repos->fs->youngest_rev, 0);
38 =head1 DESCRIPTION
40 SVN::Core implements higher level functions of fundamental subversion
41 functions.
43 =head1 FUNCTIONS
45 =over 4
47 =cut
49 BEGIN {
50 SVN::_Core::apr_initialize();
53 my $gpool = SVN::Pool->new_default;
54 sub gpool { $gpool } # holding the reference to gpool
55 SVN::Core::utf_initialize($gpool);
57 END {
58 SVN::_Core::apr_terminate();
61 =item SVN::Core::auth_open([auth provider array]);
63 Takes a reference to an array of authentication providers
64 and returns an auth_baton. If you use prompt providers
65 you can not use this function, but need to use the
66 auth_open_helper.
68 =item SVN::Core::auth_open_helper([auth provider array);
70 Prompt providers return two values instead of one. The
71 2nd parameter is a reference to whatever was passed into
72 them as the callback. auth_open_helper splits up these
73 arguments, passing the provider objects into auth_open
74 which gives it an auth_baton and putting the other
75 ones in an array. The first return value of this
76 function is the auth_baton, the second is a reference
77 to an array containing the references to the callbacks.
79 These callback arrays should be stored in the object
80 the auth_baton is attached to.
82 =back
84 =cut
86 sub auth_open_helper {
87 my $args = shift;
88 my (@auth_providers,@auth_callbacks);
90 foreach my $arg (@{$args}) {
91 if (ref($arg) eq '_p_svn_auth_provider_object_t') {
92 push @auth_providers, $arg;
93 } else {
94 push @auth_callbacks, $arg;
97 my $auth_baton = SVN::Core::auth_open(\@auth_providers);
98 return ($auth_baton,\@auth_callbacks);
101 # import the INVALID and IGNORED constants
102 our $INVALID_REVNUM = $SVN::_Core::SWIG_SVN_INVALID_REVNUM;
103 our $IGNORED_REVNUM = $SVN::_Core::SWIG_SVN_IGNORED_REVNUM;
105 package _p_svn_stream_t;
106 use SVN::Base qw(Core svn_stream_);
108 package SVN::Stream;
109 use IO::Handle;
110 our @ISA = qw(IO::Handle);
112 =head1 OTHER OBJECTS
114 =head2 svn_stream_t - SVN::Stream
116 You can use native perl io handles (including io globs) as
117 svn_stream_t in subversion functions. Returned svn_stream_t are also
118 translated into perl io handles, so you could access them with regular
119 print, read, etc.
121 Note that some functions take a stream to read from or write to, but do not
122 close the stream while still holding the reference to the io handle.
123 In this case the handle won't be destroyed properly.
124 You should always set up the correct default pool before calling
125 such functions.
127 =cut
129 use Symbol ();
131 sub new
133 my $class = shift;
134 my $self = bless Symbol::gensym(), ref($class) || $class;
135 tie *$self, $self;
136 *$self->{svn_stream} = shift;
137 $self;
140 sub svn_stream {
141 my $self = shift;
142 *$self->{svn_stream};
145 sub TIEHANDLE
147 return $_[0] if ref($_[0]);
148 my $class = shift;
149 my $self = bless Symbol::gensym(), $class;
150 *$self->{svn_stream} = shift;
151 $self;
154 sub CLOSE
156 my $self = shift;
157 *$self->{svn_stream}->close
158 if *$self->{svn_stream};
159 undef *$self->{svn_stream};
162 sub GETC
164 my $self = shift;
165 my $buf;
166 return $buf if $self->read($buf, 1);
167 return undef;
170 sub print
172 my $self = shift;
173 $self->WRITE ($_[0], length ($_[0]));
176 sub PRINT
178 my $self = shift;
179 if (defined $\) {
180 if (defined $,) {
181 $self->print(join($,, @_).$\);
182 } else {
183 $self->print(join("",@_).$\);
185 } else {
186 if (defined $,) {
187 $self->print(join($,, @_));
188 } else {
189 $self->print(join("",@_));
194 sub PRINTF
196 my $self = shift;
197 my $fmt = shift;
198 $self->print(sprintf($fmt, @_));
201 sub getline
203 my $self = shift;
204 *$self->{pool} ||= SVN::Core::pool_create (undef);
205 my ($buf, $eof) = *$self->{svn_stream}->readline ($/, *$self->{pool});
206 return undef if $eof && !length($buf);
207 return $eof ? $buf : $buf.$/;
210 sub getlines
212 die "getlines() called in scalar context\n" unless wantarray;
213 my $self = shift;
214 my($line, @lines);
215 push @lines, $line while defined($line = $self->getline);
216 return @lines;
219 sub READLINE
221 my $self = shift;
222 unless (defined $/) {
223 my $buf = '';
224 while (length( my $chunk = *$self->{svn_stream}->read
225 ($SVN::Core::STREAM_CHUNK_SIZE)) ) {
226 $buf .= $chunk;
228 return $buf;
230 elsif (ref $/) {
231 my $buf = *$self->{svn_stream}->read (${$/});
232 return length($buf) ? $buf : undef;
234 return wantarray ? $self->getlines : $self->getline;
237 sub READ {
238 my $self = shift;
239 my $len = $_[1];
240 if (@_ > 2) { # read offset
241 substr($_[0],$_[2]) = *$self->{svn_stream}->read ($len);
242 } else {
243 $_[0] = *$self->{svn_stream}->read ($len);
245 return $len;
248 sub WRITE {
249 my $self = shift;
250 my $slen = length($_[0]);
251 my $len = $slen;
252 my $off = 0;
254 if (@_ > 1) {
255 $len = $_[1] if $_[1] < $len;
256 if (@_ > 2) {
257 $off = $_[2] || 0;
258 die "Offset outside string" if $off > $slen;
259 if ($off < 0) {
260 $off += $slen;
261 die "Offset outside string" if $off < 0;
263 my $rem = $slen - $off;
264 $len = $rem if $rem < $len;
266 *$self->{svn_stream}->write (substr ($_[0], $off, $len));
268 return $len;
271 *close = \&CLOSE;
273 sub FILENO {
274 return undef; # XXX perlfunc says this means the file is closed
277 sub DESTROY {
278 my $self = shift;
279 $self->close;
282 package _p_apr_pool_t;
284 my %WRAPPED;
286 sub default {
287 my ($pool) = @_;
288 my $pobj = SVN::Pool->_wrap ($$pool);
289 $WRAPPED{$pool} = $pobj;
290 $pobj->default;
293 sub DESTROY {
294 my ($pool) = @_;
295 delete $WRAPPED{$pool};
298 package SVN::Pool;
299 use SVN::Base qw(Core svn_pool_);
301 =head2 svn_pool_t - SVN::Pool
303 The perl bindings significantly simplify the usage of pools, while
304 still being manually adjustable.
306 For functions requiring a pool as the last argument (which are, almost all
307 of the subversion functions), the pool argument is optional. The default pool
308 is used if it is omitted. When C<SVN::Core> is loaded, it creates a
309 new default pool, which is also available from C<SVN::Core-E<gt>gpool>.
311 For callback functions providing a pool to your subroutine, you could
312 also use $pool-E<gt>default to make it the default pool in the scope.
314 =head3 Methods
316 =over 4
318 =item new ([$parent])
320 Create a new pool. The pool is a root pool if $parent is not supplied.
322 =item new_default ([$parent])
324 Create a new pool. The pool is a root pool if $parent is not supplied.
325 Set the new pool as default pool.
327 =item new_default_sub
329 Create a new subpool of the current default pool, and set the
330 resulting pool as new default pool.
332 =item clear
334 Clear the pool.
336 =item DESTROY
338 Destroy the pool. If the pool was the default pool, restore the
339 previous default pool. This is normally called
340 automatically when the SVN::Pool object is no longer used and
341 destroyed by the perl garbage collector.
343 =back
345 =cut
348 # block is here to restrict no strict refs to this block
349 no strict 'refs';
350 *{"apr_pool_$_"} = *{"SVN::_Core::apr_pool_$_"}
351 for qw/clear destroy/;
354 my @POOLSTACK;
356 sub new {
357 my ($class, $parent) = @_;
358 $parent = $$parent if ref ($parent) eq 'SVN::Pool';
359 my $self = bless \create ($parent), $class;
360 return $self;
363 sub new_default_sub {
364 my $parent = ref ($_[0]) ? ${+shift} : $SVN::_Core::current_pool;
365 my $self = SVN::Pool->new_default ($parent);
366 return $self;
369 sub new_default {
370 my $self = new(@_);
371 $self->default;
372 return $self;
375 sub default {
376 my $self = shift;
377 push @POOLSTACK, $SVN::_Core::current_pool
378 unless $$SVN::_Core::current_pool == 0;
379 $SVN::_Core::current_pool = $$self;
382 sub clear {
383 my $self = shift;
384 apr_pool_clear ($$self);
387 my $globaldestroy;
389 END {
390 $globaldestroy = 1;
393 my %WRAPPOOL;
395 # Create a cloned _p_apr_pool_t pointing to the same apr_pool_t
396 # but on different address. this allows pools that are from C
397 # to have proper lifetime.
398 sub _wrap {
399 my ($class, $rawpool) = @_;
400 my $pool = \$rawpool;
401 bless $pool, '_p_apr_pool_t';
402 my $npool = \$pool;
403 bless $npool, $class;
404 $WRAPPOOL{$npool} = 1;
405 $npool;
408 use Scalar::Util 'reftype';
410 sub DESTROY {
411 return if $globaldestroy;
412 my $self = shift;
413 # for some reason, REF becomes SCALAR in perl -c or after apr_terminate
414 return if reftype($self) eq 'SCALAR';
415 if ($$self eq $SVN::_Core::current_pool) {
416 $SVN::_Core::current_pool = pop @POOLSTACK;
418 if (exists $WRAPPOOL{$self}) {
419 delete $WRAPPOOL{$self};
421 else {
422 apr_pool_destroy ($$self)
426 package _p_svn_error_t;
427 use SVN::Base qw(Core svn_error_t_);
429 sub strerror {
430 return SVN::Error::strerror($_[$[]->apr_err());
433 sub handle_error {
434 return SVN::Error::handle_error(@_);
437 sub expanded_message {
438 return SVN::Error::expanded_message(@_);
441 sub handle_warning {
442 # need to swap parameter order.
443 return SVN::Error::handle_warning($_[$[+1],$_[$[]);
446 foreach my $function (qw(compose clear quick_wrap)) {
447 no strict 'refs';
448 my $real_function = \&{"SVN::_Core::svn_error_$function"};
449 *{"_p_svn_error_t::$function"} = sub {
450 return $real_function->(@_);
454 package SVN::Error;
455 use SVN::Base qw(Core svn_error_);
456 use SVN::Base qw(Core SVN_ERR_);
457 use Carp;
458 our @CARP_NOT = qw(SVN::Base SVN::Client SVN::Core SVN::Delta
459 SVN::Delta::Editor SVN::Error SVN::Fs SVN::Node
460 SVN::Pool SVN::Ra SVN::Ra::Callbacks SVN::Ra::Reporter
461 SVN::Repos SVN::Stream SVN::TxDelta SVN::Wc);
463 =head2 svn_error_t - SVN::Error
465 By default the perl bindings handle exceptions for you. The default handler
466 automatically croaks with an appropriate error message. This is likely
467 sufficient for simple scripts, but more complex usage may demand handling of
468 errors.
470 You can override the default exception handler by changing the
471 $SVN::Error::handler variable. This variable holds a reference to a perl sub
472 that should be called whenever an error is returned by a svn function. This
473 sub will be passed a svn_error_t object. Its return value is ignored.
475 If you set the $SVN::Error::handler to undef then each call will return an
476 svn_error_t object as its first return in the case of an error, followed by the
477 normal return values. If there is no error then a svn_error_t will not be
478 returned and only the normal return values will be returned. When using this
479 mode you should be careful only to call functions in array context. For
480 example: my ($ci) = $ctx-E<gt>mkdir('http://svn/foo'); In this case $ci will
481 be an svn_error_t object if an error occurs and a svn_client_commit_info object
482 otherwise. If you leave the parenthesis off around $ci (scalar context) it
483 will be the commit_info object, which in the case of an error will be undef.
485 If you plan on using explicit exception handling, understanding the exception
486 handling system the C API uses is helpful. You can find information on it in
487 the HACKING file and the API documentation. Looking at the implementation of
488 SVN::Error::croak_on_error and SVN::Error::expanded_message may be helpful as
489 well.
491 =over 4
493 =item $svn_error_t-E<gt>apr_err()
495 APR error value, possibly SVN_ custom error.
497 =item $svn_error_t-E<gt>message()
499 Details from producer of error.
501 =item $svn_error_t-E<gt>child()
503 svn_error_t object of the error that's wrapped.
505 =item $svn_error_t-E<gt>pool()
507 The pool holding this error and any child errors it wraps.
509 =item $svn_error_t-E<gt>file()
511 Source file where the error originated.
513 =item $svn_error_t-E<gt>line()
515 Source line where the error originated.
517 =item SVN::Error::strerror($apr_status_t)
519 Returns the english description of the status code.
521 =item $svn_error_t-E<gt>strerror()
523 Returns the english description of the apr_err status code set on the
524 $svn_error_t. This is short for:
525 SVN::Error::strerror($svn_error_t-E<gt>apr_err());
527 =item SVN::Error::create($apr_err, $child, $message);
529 Returns a new svn_error_t object with the error status specified in $apr_err,
530 the child as $child, and error message of $message.
532 =item SVN::Error::quick_wrap($child, $new_msg); or $child-E<gt>quick_wrap($new_msg);
534 A quick n' easy way to create a wrappered exception with your own message
535 before throwing it up the stack.
537 $child is the svn_error_t object you want to wrap and $new_msg is the new error
538 string you want to set.
540 =item SVN::Error::compose($chain, $new_error); or $chain-E<gt>compose($new_error);
542 Add new_err to the end of $chain's chain of errors.
544 The $new_err chain will be copied into $chain's pool and destroyed, so $new_err
545 itself becomes invalid after this function.
547 =item SVN::Error::clear($svn_error_t); or $svn_error_t-E<gt>clear();
549 Free the memory used by $svn_error_t, as well as all ancestors and descendants
550 of $svn_error_t.
552 You must call this on every svn_error_t object you get or you will leak memory.
554 =cut
556 # Permit users to determine if they want automatic croaking or not.
557 our $handler = \&croak_on_error;
559 # Import functions that don't follow the normal naming scheme.
560 foreach my $function (qw(handle_error handle_warning strerror)) {
561 no strict 'refs';
562 my $real_function = \&{"SVN::_Core::svn_$function"};
563 *{"SVN::Error::$function"} = sub {
564 return $real_function->(@_);
568 =item SVN::Error::expanded_message($svn_error_t) or $svn_error_t-E<gt>expanded_message()
570 Returns the error message by tracing through the svn_error_t object and its
571 children and concatenating the error messages. This is how the internal
572 exception handlers get their error messages.
574 =cut
576 sub expanded_message {
577 my $svn_error = shift;
578 unless (is_error($svn_error)) {
579 return undef;
582 my $error_message = $svn_error->strerror();
583 while ($svn_error) {
584 $error_message .= ': ' . $svn_error->message();
585 $svn_error = $svn_error->child();
587 return $error_message;
591 =item SVN::Error::is_error($value)
593 Returns true if value is of type svn_error. Returns false if value is
594 anything else or undefined. This is useful for seeing if a call has returned
595 an error.
597 =cut
599 sub is_error {
600 return (ref($_[$[]) eq '_p_svn_error_t');
603 =item SVN::Error::croak_on_error
605 Default error handler. It takes an svn_error_t and extracts the error messages
606 from it and croaks with those messages.
608 It can be used in two ways. The first is detailed above as setting it as the
609 automatic exception handler via setting $SVN::Error::handler.
611 The second is if you have $SVN::Error::handler set to undef as a wrapper for
612 calls you want to croak on when there is an error, but you don't want to write
613 an explicit error handler. For example:
615 my $result_rev=SVN::Error::croak_on_error($ctx-E<gt>checkout($url,$path,'HEAD',1));
617 If there is no error then croak_on_error will return the arguments passed to it
618 unchanged.
620 =cut
622 sub croak_on_error {
623 unless (is_error($_[$[])) {
624 return @_;
626 my $svn_error = shift;
628 my $error_message = $svn_error->expanded_message();
630 $svn_error->clear();
632 croak($error_message);
635 =item SVN::Error::confess_on_error
637 The same as croak_on_error except it will give a more detailed stack backtrace,
638 including internal calls within the implementation of the perl bindings.
639 This is useful when you are doing development work on the bindings themselves.
641 =cut
643 sub confess_on_error {
644 unless (is_error($_[$[])) {
645 return @_;
647 my $svn_error = shift;
649 my $error_message = $svn_error->expanded_message();
651 $svn_error->clear();
653 confess($error_message);
656 =item SVN::Error::ignore_error
658 This is useful for wrapping around calls which you wish to ignore any potential
659 error. It checks to see if the first parameter is an error and if it is it
660 clears it. It then returns all the other parameters.
662 =back
664 =cut
666 sub ignore_error {
667 if (is_error($_[$[])) {
668 my $svn_error = shift;
669 $svn_error->clear();
672 return @_;
675 package _p_svn_log_changed_path_t;
676 use SVN::Base qw(Core svn_log_changed_path_t_);
678 =head2 svn_log_changed_path_t
680 =over 4
682 =item $lcp-E<gt>action()
684 'A'dd, 'D'elete, 'R'eplace, 'M'odify
686 =item $lcp-E<gt>copyfrom_path()
688 Source path of copy, or C<undef> if there isn't any previous revision
689 history.
691 =item $lcp-E<gt>copyfrom_rev()
693 Source revision of copy, or C<$SVN::Core::INVALID_REVNUM> if there is
694 no previous history.
696 =back
698 =cut
700 package SVN::Node;
701 use SVN::Base qw(Core svn_node_);
703 =head2 svn_node_kind_t - SVN::Node
705 An enum of the following constants:
707 $SVN::Node::none, $SVN::Node::file,
708 $SVN::Node::dir, $SVN::Node::unknown.
710 =cut
712 package _p_svn_opt_revision_t;
713 use SVN::Base qw(Core svn_opt_revision_t_);
715 =head2 svn_opt_revision_t
717 =cut
719 package _p_svn_opt_revision_t_value;
720 use SVN::Base qw(Core svn_opt_revision_t_value_);
722 package _p_svn_config_t;
723 use SVN::Base qw(Core svn_config_);
725 =head2 svn_config_t
727 Opaque object describing a set of configuration options.
729 =cut
731 package _p_svn_dirent_t;
732 use SVN::Base qw(Core svn_dirent_t_);
734 =head2 svn_dirent_t
736 =over 4
738 =item $dirent-E<gt>kind()
740 Node kind. A number which matches one of these constants:
741 $SVN::Node::none, $SVN::Node::file,
742 $SVN::Node::dir, $SVN::Node::unknown.
744 =item $dirent-E<gt>size()
746 Length of file text, or 0 for directories.
748 =item $dirent-E<gt>has_props()
750 Does the node have properties?
752 =item $dirent-E<gt>created_rev()
754 Last revision in which this node changed.
756 =item $dirent-E<gt>time()
758 Time of created_rev (mod-time).
760 =item $dirent-E<gt>last_author()
762 Author of created rev.
764 =back
766 =cut
768 package _p_svn_auth_cred_simple_t;
769 use SVN::Base qw(Core svn_auth_cred_simple_t_);
771 =head2 svn_auth_cred_simple_t
773 =over 4
775 =item $simple-E<gt>username()
777 Username.
779 =item $simple-E<gt>password()
781 Password.
783 =item $simple-E<gt>may_save()
785 Indicates if the credentials may be saved (to disk).
787 =back
789 =cut
791 package _p_svn_auth_cred_username_t;
792 use SVN::Base qw(Core svn_auth_cred_username_t_);
794 =head2 svn_auth_cred_username_t
796 =over 4
798 =item $username-E<gt>username()
800 Username.
802 =item $username-E<gt>may_save()
804 Indicates if the credentials may be saved (to disk).
806 =back
808 =cut
810 package _p_svn_auth_cred_ssl_server_trust_t;
811 use SVN::Base qw(Core svn_auth_cred_ssl_server_trust_t_);
813 =head2 svn_auth_cred_ssl_server_trust_t
815 =over 4
817 =item $strust-E<gt>may_save()
819 Indicates if the credentials may be saved (to disk).
821 =item $strust-E<gt>accepted_failures()
823 Bit mask of the accepted failures.
825 =back
827 =cut
829 package _p_svn_auth_ssl_server_cert_info_t;
830 use SVN::Base qw(Core svn_auth_ssl_server_cert_info_t_);
832 =head2 svn_auth_ssl_server_cert_info_t
834 =over 4
836 =item $scert-E<gt>hostname()
838 Primary CN.
840 =item $scert-E<gt>fingerprint()
842 ASCII fingerprint.
844 =item $scert-E<gt>valid_from()
846 ASCII date from which the certificate is valid.
848 =item $scert-E<gt>valid_until()
850 ASCII date until which the certificate is valid.
852 =item $scert-E<gt>issuer_dname()
854 DN of the certificate issuer.
856 =item $scert-E<gt>ascii_cert()
858 Base-64 encoded DER certificate representation.
860 =back
862 =cut
864 package _p_svn_auth_cred_ssl_client_cert_t;
865 use SVN::Base qw(Core svn_auth_cred_ssl_client_cert_t_);
867 =head2 svn_auth_cred_ssl_client_cert_t
869 =over 4
871 =item $ccert-E<gt>cert_file()
873 Full paths to the certificate file.
875 =item $ccert-E<gt>may_save()
877 Indicates if the credentials may be saved (to disk).
879 =back
881 =cut
883 package _p_svn_auth_cred_ssl_client_cert_pw_t;
884 use SVN::Base qw(Core svn_auth_cred_ssl_client_cert_pw_t_);
886 =head2 svn_auth_cred_ssl_client_cert_pw_t
888 =over 4
890 =item $ccertpw-E<gt>password()
892 Certificate password.
894 =item $ccertpw-E<gt>may_save()
896 Indicates if the credentials may be saved (to disk).
898 =back
900 =cut
902 =head1 CONSTANTS
904 =head2 SVN::Auth::SSL
906 =over 4
908 =item $SVN::Auth::SSL::NOTYETVALID
910 Certificate is not yet valid.
912 =item $SVN::Auth::SSL::EXPIRED
914 Certificate has expired.
916 =item $SVN::Auth::SSL::CNMISMATCH
918 Certificate's CN (hostname) does not match the remote hostname.
920 =item $SVN::Auth::SSL::UNKNOWNCA
922 Certificate authority is unknown (i.e. not trusted).
924 =item $SVN::Auth::SSL::OTHER
926 Other failure. This can happen if neon has introduced a new failure bit that we
927 do not handle yet.
929 =back
931 =cut
933 package SVN::Auth::SSL;
934 use SVN::Base qw(Core SVN_AUTH_SSL_);
936 package _p_svn_lock_t;
937 use SVN::Base qw(Core svn_lock_t_);
939 =head2 _p_svn_lock_t
941 Objects of this class contain information about locks placed on files
942 in a repository. It has the following accessor methods:
944 =over
946 =item path
948 The full path to the file which is locked, starting with a forward slash (C</>).
950 =item token
952 A string containing the lock token, which is a unique URI.
954 =item owner
956 The username of whoever owns the lock.
958 =item comment
960 A comment associated with the lock, or undef if there isn't one.
962 =item is_dav_comment
964 True if the comment was made by a generic DAV client.
966 =item creation_date
968 Time at which the lock was created, as the number of microseconds since
969 00:00:00 S<January 1>, 1970 UTC. Divide it by 1_000_000 to get a Unix
970 time_t value.
972 =item expiration_date
974 When the lock will expire. Has the value '0' if the lock will never expire.
976 =back
978 =cut
980 package SVN::MD5;
981 use overload
982 '""' => sub { SVN::Core::md5_digest_to_cstring(${$_[0]})};
984 sub new {
985 my ($class, $digest) = @_;
986 bless \$digest, $class;
989 =head1 AUTHORS
991 Chia-liang Kao E<lt>clkao@clkao.orgE<gt>
993 =head1 COPYRIGHT
995 Copyright (c) 2003 CollabNet. All rights reserved.
997 This software is licensed as described in the file COPYING, which you
998 should have received as part of this distribution. The terms are also
999 available at http://subversion.tigris.org/license-1.html. If newer
1000 versions of this license are posted there, you may use a newer version
1001 instead, at your option.
1003 This software consists of voluntary contributions made by many
1004 individuals. For exact contribution history, see the revision history
1005 and logs, available at http://subversion.tigris.org/.
1007 =cut