native::Base(3)
πΈ NAME πΈ
Okay so this is native::Base(3), straight out of the User Contributed Perl Documentation section, and its whole main-character thing is SVN::Base β the base class for importing symbols for svn modules. π
β¨ SYNOPSIS β¨
# 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_);
π¦ DESCRIPTION π¦
Bestie, SVN::Base is the module that scoops up the raw symbols swig created for the Subversion Perl bindings, drops them into the proper namespace, and makes them way easier to use. β¨
It also finds the accessors for members of a C struct and builds a simpler accessor function, like $data->field() and $data->field($new_value). Obsessed.
Once you understand the convention for Subversion functions in the Perl bindings, you can 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 that swig wraps raw functions into are different Perl modules β for example, SVN::_Core and SVN::_Repos. Upon import, SVN::Base bootstraps the requested module if it isn't loaded yet, iterates over the symbols provided in that module, and then puts the function with the prefix trimmed into the namespace of the caller for this import. No cap, that's the whole pipeline. π§
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. iykyk. π
π¨ CAVEATS π¨
SVN::Baseconsiders a function as a structure member accessor if it is postfixed_getor_set. Real functions with these postfixes will need extra handling. π«
π AUTHORS π
Chia-liang Kao <clkao@clkao.org> π
π COPYRIGHT π
The legal era, bestie β this part stays exactly as it is:
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.
That's the whole page, bestie β made with perl v5.42.3 on 2024-11-27, and the page itself is native::Base(3) π
β¨
π¦ where this page comes from
- nixpkgs unstable: subversion-client 1.14.5
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash-1017 on : a language model's rewrite of the original, under its terms