1native::Base(3) User Contributed Perl Documentation native::Base(3)
2
3
4
6 SVN::Base - Base class for importing symbols for svn modules
7
9 # Load the svn_ra_* functions into the SVN::Ra namespace.
10 package SVN::Ra;
11 use SVN::Base qw(Ra svn_ra_);
12
13 # Load svn_config_t structure accessors in the magic namcespace
14 # provided by swig, so we could use it returned by other functions
15 package _p_svn_config_t;
16 use SVN::Base qw(Core svn_config_);
17
19 SVN::Base is a module importing the subversion perl bindings raw
20 symbols created by swig, into proper namespace and make them easier to
21 use.
22
23 It will also find the accessors for members of a C struct, create an
24 simpler accessor function like "$data->field()" and
25 "$data->field($new_value)".
26
27 Once you understand the convention of subversion functions in perl
28 bindings, you could look at the subversion api and write them in perl.
29 The API is available in the source header files or online at
30 <https://subversion.apache.org/docs/api/latest/>.
31
33 The perl bindings of swig wraps raw functions into different perl
34 modules, for example, SVN::_Core, SVN::_Repos. Upon import, SVN::Base
35 bootstrap the requested module if it's not yet loaded, and iterate over
36 the symbols provided in that module, it them puts the function with
37 prefix trimmed in the namespace of the caller for this import.
38
39 The 3rd through the last parameter is a list of symbol endings that you
40 wish for SVN::Base not to import into your namespace. This is useful
41 for cases where you may want to import certain symbols differently than
42 normally.
43
45 SVN::Base consider a function as structure member accessor if it is
46 postfixed ``_get'' or ``_set''. Real functions with this postfixes will
47 need extra handling.
48
50 Chia-liang Kao <clkao@clkao.org>
51
53 Licensed to the Apache Software Foundation (ASF) under one
54 or more contributor license agreements. See the NOTICE file
55 distributed with this work for additional information
56 regarding copyright ownership. The ASF licenses this file
57 to you under the Apache License, Version 2.0 (the
58 "License"); you may not use this file except in compliance
59 with the License. You may obtain a copy of the License at
60
61 http://www.apache.org/licenses/LICENSE-2.0
62
63 Unless required by applicable law or agreed to in writing,
64 software distributed under the License is distributed on an
65 "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
66 KIND, either express or implied. See the License for the
67 specific language governing permissions and limitations
68 under the License.
69
70
71
72perl v5.32.1 2021-02-10 native::Base(3)