SVN::Base(3perl)

SVN::Base3perl

Base class for importing symbols for svn modules

Usage

    # Load the svn_ra_* functions into the SVN::Ra namespace.
    package SVN::Ra;
    use SVN::Base qw(Ra svn_ra_);
    # Load svn_config_t structure accessors in the magic namcespace
    # provided by swig, so we could use it returned by other functions
    package _p_svn_config_t;
    use SVN::Base qw(Core svn_config_);

Overview

SVN::Base is a module importing the subversion perl bindings raw symbols created by swig, into proper namespace and make them easier to use.

It will also find the accessors for members of a C struct, create an simpler accessor function like "$data->field()" and "$data->field($new_value)".

Once you understand the convention of subversion functions in perl bindings, you could look at the subversion api and write them in perl. The API is available in the source header files or online at <https://subversion.apache.org/docs/api/latest/>.

Internals

The perl bindings of swig wraps raw functions into different perl modules, for example, SVN::_Core, SVN::_Repos. Upon import, SVN::Base bootstrap the requested module if it's not yet loaded, and iterate over the symbols provided in that module, it them puts the function with prefix trimmed in the namespace of the caller for this import.

The 3rd through the last parameter is a list of symbol endings that you wish for SVN::Base not to import into your namespace. This is useful for cases where you may want to import certain symbols differently than normally.

Caveats

SVN::Base consider a function as structure member accessor if it is postfixed ``_get'' or ``_set''. Real functions with this postfixes will need extra handling.

Releases

11 releases since Debian 3.1 (Sarge); the text changed 10 times.

  1. 3.1
  2. 4.0
  3. 5.0
  4. 6.0
  5. 7
  6. 8
  7. 9
  8. 10
  9. 11
  10. 12
  11. 13

Authors

Chia-liang Kao <[email protected]>

From libsvn-perl 1.14.5-3 in Debian 13 (Trixie). Parsed by carta from the page's man source.