man > SVN::Core

📛 NAME

SVN::Core - Core module of the subversion perl bindings

🚀 Quick Reference

Use CaseCommandDescription
Load bindings & init APRuse SVN::Core;Loads core module, calls apr_initialize and cleanup
Create default poolSVN::Pool->new_defaultCreates a root pool and sets as default
Create subpoolSVN::Pool->new_default_subCreates a subpool of current default pool
Use Perl IO as svn_streamprint $stream $text; close $stream;Native Perl IO handle works as svn_stream_t
Use Perl IO as svn_stream inputSVN::Repos::dump_fs($repos, \*STDOUT, ...)Pass glob refs as svn_stream_t
Open auth batonSVN::Core::auth_open([$providers])Returns auth_baton from provider array
Open auth with prompt providersSVN::Core::auth_open_helper([$providers])Returns (auth_baton, callbacks_array)
Disable automatic error croaking$SVN::Error::handler = undef;Each call returns svn_error_t on error
Default error handler$SVN::Error::handler = \&SVN::Error::croak_on_error;Calls croak with error message
Wrap error with custom message$child->quick_wrap($new_msg)Wraps error for rethrowing

📋 SYNOPSIS

use SVN::Core; # does apr_initialize and cleanup for you

# create a root pool and set it as default pool for later use
my $pool = SVN::Pool->new_default;

sub something {
    # create a subpool of the current default pool
    my $pool = SVN::Pool->new_default_sub;
    # some svn operations...

    # $pool gets destroyed and the previous default pool
    # is restored when $pool's lexical scope ends
}

# svn_stream_t as native perl io handle
my $stream = $txn->root->apply_text('trunk/filea', undef);
print $stream $text;
close $stream;

# native perl io handle as svn_stream_t
SVN::Repos::dump_fs($repos, \*STDOUT, \*STDERR,
                    0, $repos->fs->youngest_rev, 0);

📖 DESCRIPTION

SVN::Core implements higher level functions of fundamental subversion functions.

🔧 FUNCTIONS

🧩 OTHER OBJECTS

📁 svn_stream_t - SVN::Stream

You can use native perl io handles (including io globs) as svn_stream_t in subversion functions. Returned svn_stream_t are also translated into perl io handles, so you could access them with regular print, read, etc.

Note that some functions take a stream to read from or write to, but do not close the stream while still holding the reference to the io handle. In this case the handle won't be destroyed properly. You should always set up the correct default pool before calling such functions.

🔄 svn_pool_t - SVN::Pool

The perl bindings significantly simplify the usage of pools, while still being manually adjustable.

For functions requiring a pool as the last argument (which are, almost all of the subversion functions), the pool argument is optional. The default pool is used if it is omitted. When "SVN::Core" is loaded, it creates a new default pool, which is also available from "SVN::Core->gpool".

For callback functions providing a pool to your subroutine, you could also use $pool->default to make it the default pool in the scope.

Methods

❌ svn_error_t - SVN::Error

By default the perl bindings handle exceptions for you. The default handler automatically croaks with an appropriate error message. This is likely sufficient for simple scripts, but more complex usage may demand handling of errors.

You can override the default exception handler by changing the $SVN::Error::handler variable. This variable holds a reference to a perl sub that should be called whenever an error is returned by a svn function. This sub will be passed a svn_error_t object. Its return value is ignored.

If you set the $SVN::Error::handler to undef then each call will return an svn_error_t object as its first return in the case of an error, followed by the normal return values. If there is no error then a svn_error_t will not be returned and only the normal return values will be returned. When using this mode you should be careful only to call functions in array context. For example: my ($ci) = $ctx->mkdir('http://svn/foo'); In this case $ci will be an svn_error_t object if an error occurs and a svn_client_commit_info object otherwise. If you leave the parenthesis off around $ci (scalar context) it will be the commit_info object, which in the case of an error will be undef.

If you plan on using explicit exception handling, understanding the exception handling system the C API uses is helpful. You can find information on it in the HACKING file and the API documentation. Looking at the implementation of SVN::Error::croak_on_error and SVN::Error::expanded_message may be helpful as well.

📜 svn_log_changed_path_t

📜 svn_log_changed_path2_t

An object to represent a path that changed for a log entry.

🏷️ svn_node_kind_t - SVN::Node

An enum of the following constants:

🔀 svn_tristate_t - SVN::Tristate

An enum of the following constants:

Note that these true/false values have nothing to do with Perl's concept of truth. In fact, each constant would evaluate to true in a boolean context.

📏 svn_depth_t - SVN::Depth

An enum of the following constants:

🔢 svn_opt_revision_t

A revision, specified in one of "SVN::Core::opt_revision_*" ways.

🔢 svn_opt_revision_range_t

An object representing a range of revisions.

⚙️ svn_config_t

Opaque object describing a set of configuration options.

📁 svn_dirent_t

✅ svn_commit_info_t

📝 svn_log_entry_t

🔑 svn_auth_cred_simple_t

🔑 svn_auth_cred_username_t

🔒 svn_auth_cred_ssl_server_trust_t

🔒 svn_auth_ssl_server_cert_info_t

🔒 svn_auth_cred_ssl_client_cert_t

🔒 svn_auth_cred_ssl_client_cert_pw_t

🏷️ CONSTANTS

🔒 SVN::Auth::SSL

🔒 _p_svn_lock_t

Objects of this class contain information about locks placed on files in a repository. It has the following accessor methods:

👤 AUTHORS

Chia-liang Kao <clkao AT clkao.org>

📄 COPYRIGHT

Licensed to the Apache Software Foundation (ASF) under one
or more contributor license agreements.  See the NOTICE file
distributed with this work for additional information
regarding copyright ownership.  The ASF licenses this file
to you under the Apache License, Version 2.0 (the
"License"); you may not use this file except in compliance
with the License.  You may obtain a copy of the License at

  http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing,
software distributed under the License is distributed on an
"AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
KIND, either express or implied.  See the License for the
specific language governing permissions and limitations
under the License.
SVN::Core
📛 NAME 🚀 Quick Reference 📋 SYNOPSIS 📖 DESCRIPTION 🔧 FUNCTIONS 🧩 OTHER OBJECTS
📁 svn_stream_t - SVN::Stream 🔄 svn_pool_t - SVN::Pool ❌ svn_error_t - SVN::Error 📜 svn_log_changed_path_t 📜 svn_log_changed_path2_t 🏷️ svn_node_kind_t - SVN::Node 🔀 svn_tristate_t - SVN::Tristate 📏 svn_depth_t - SVN::Depth 🔢 svn_opt_revision_t 🔢 svn_opt_revision_range_t ⚙️ svn_config_t 📁 svn_dirent_t ✅ svn_commit_info_t 📝 svn_log_entry_t 🔑 svn_auth_cred_simple_t 🔑 svn_auth_cred_username_t 🔒 svn_auth_cred_ssl_server_trust_t 🔒 svn_auth_ssl_server_cert_info_t 🔒 svn_auth_cred_ssl_client_cert_t 🔒 svn_auth_cred_ssl_client_cert_pw_t
🏷️ CONSTANTS
🔒 SVN::Auth::SSL 🔒 _p_svn_lock_t
👤 AUTHORS 📄 COPYRIGHT

Generated by phpman v4.9.26-1-g511901d · Markdown · JSON · MCP Author: Che Dong Under GNU General Public License
2026-07-28 20:35 @216.73.217.46
CrawledBy Mozilla/5.0 AppleWebKit/537.36 (KHTML, like Gecko; compatible; ClaudeBot/1.0; +claudebot@anthropic.com)
Valid XHTML 1.0 Transitional!Valid CSS!
Enhanced by LLM: deepseek-v4-flash / taotoken.net / www.chedong.com - original format

^_top_^