{
    "mode": "perldoc",
    "parameter": "SVN::Core",
    "section": "",
    "url": "https://www.chedong.com/phpMan.php/perldoc/SVN%3A%3ACore/json",
    "generated": "2026-06-11T20:37:09Z",
    "synopsis": "use SVN::Core; # does aprinitialize and cleanup for you\n# create a root pool and set it as default pool for later use\nmy $pool = SVN::Pool->newdefault;\nsub something {\n# create a subpool of the current default pool\nmy $pool = SVN::Pool->newdefaultsub;\n# some svn operations...\n# $pool gets destroyed and the previous default pool\n# is restored when $pool's lexical scope ends\n}\n# svnstreamt as native perl io handle\nmy $stream = $txn->root->applytext('trunk/filea', undef);\nprint $stream $text;\nclose $stream;\n# native perl io handle as svnstreamt\nSVN::Repos::dumpfs($repos, \\*STDOUT, \\*STDERR,\n0, $repos->fs->youngestrev, 0);",
    "sections": {
        "NAME": {
            "content": "SVN::Core - Core module of the subversion perl bindings\n",
            "subsections": []
        },
        "SYNOPSIS": {
            "content": "use SVN::Core; # does aprinitialize and cleanup for you\n\n# create a root pool and set it as default pool for later use\nmy $pool = SVN::Pool->newdefault;\n\nsub something {\n# create a subpool of the current default pool\nmy $pool = SVN::Pool->newdefaultsub;\n# some svn operations...\n\n# $pool gets destroyed and the previous default pool\n# is restored when $pool's lexical scope ends\n}\n\n# svnstreamt as native perl io handle\nmy $stream = $txn->root->applytext('trunk/filea', undef);\nprint $stream $text;\nclose $stream;\n\n# native perl io handle as svnstreamt\nSVN::Repos::dumpfs($repos, \\*STDOUT, \\*STDERR,\n0, $repos->fs->youngestrev, 0);\n",
            "subsections": []
        },
        "DESCRIPTION": {
            "content": "SVN::Core implements higher level functions of fundamental subversion functions.\n",
            "subsections": []
        },
        "FUNCTIONS": {
            "content": "SVN::Core::authopen([auth provider array]);\nTakes a reference to an array of authentication providers and returns an authbaton. If you\nuse prompt providers you can not use this function, but need to use the authopenhelper.\n\nSVN::Core::authopenhelper([auth provider array]);\nPrompt providers return two values instead of one. The 2nd parameter is a reference to\nwhatever was passed into them as the callback. authopenhelper splits up these arguments,\npassing the provider objects into authopen which gives it an authbaton and putting the\nother ones in an array. The first return value of this function is the authbaton, the\nsecond is a reference to an array containing the references to the callbacks.\n\nThese callback arrays should be stored in the object the authbaton is attached to.\n",
            "subsections": []
        },
        "OTHER OBJECTS": {
            "content": "svnstreamt - SVN::Stream\nYou can use native perl io handles (including io globs) as svnstreamt in subversion functions.\nReturned svnstreamt are also translated into perl io handles, so you could access them with\nregular print, read, etc.\n\nNote that some functions take a stream to read from or write to, but do not close the stream\nwhile still holding the reference to the io handle. In this case the handle won't be destroyed\nproperly. You should always set up the correct default pool before calling such functions.\n\nsvnpoolt - SVN::Pool\nThe perl bindings significantly simplify the usage of pools, while still being manually\nadjustable.\n\nFor functions requiring a pool as the last argument (which are, almost all of the subversion\nfunctions), the pool argument is optional. The default pool is used if it is omitted. When\n\"SVN::Core\" is loaded, it creates a new default pool, which is also available from\n\"SVN::Core->gpool\".\n\nFor callback functions providing a pool to your subroutine, you could also use $pool->default to\nmake it the default pool in the scope.\n\nMethods",
            "subsections": [
                {
                    "name": "new",
                    "content": "Create a new pool. The pool is a root pool if $parent is not supplied.\n"
                },
                {
                    "name": "new_default",
                    "content": "Create a new pool. The pool is a root pool if $parent is not supplied. Set the new pool as\ndefault pool.\n\nnewdefaultsub\nCreate a new subpool of the current default pool, and set the resulting pool as new default\npool.\n\nclear\nClear the pool.\n\nDESTROY\nDestroy the pool. If the pool was the default pool, restore the previous default pool. This\nis normally called automatically when the SVN::Pool object is no longer used and destroyed\nby the perl garbage collector.\n\nsvnerrort - SVN::Error\nBy default the perl bindings handle exceptions for you. The default handler automatically croaks\nwith an appropriate error message. This is likely sufficient for simple scripts, but more\ncomplex usage may demand handling of errors.\n\nYou can override the default exception handler by changing the $SVN::Error::handler variable.\nThis variable holds a reference to a perl sub that should be called whenever an error is\nreturned by a svn function. This sub will be passed a svnerrort object. Its return value is\nignored.\n\nIf you set the $SVN::Error::handler to undef then each call will return an svnerrort object as\nits first return in the case of an error, followed by the normal return values. If there is no\nerror then a svnerrort will not be returned and only the normal return values will be\nreturned. When using this mode you should be careful only to call functions in array context.\nFor example: my ($ci) = $ctx->mkdir('http://svn/foo'); In this case $ci will be an svnerrort\nobject if an error occurs and a svnclientcommitinfo object otherwise. If you leave the\nparenthesis off around $ci (scalar context) it will be the commitinfo object, which in the case\nof an error will be undef.\n\nIf you plan on using explicit exception handling, understanding the exception handling system\nthe C API uses is helpful. You can find information on it in the HACKING file and the API\ndocumentation. Looking at the implementation of SVN::Error::croakonerror and\nSVN::Error::expandedmessage may be helpful as well.\n\n$svnerrort->aprerr()\nAPR error value, possibly SVN custom error.\n\n$svnerrort->message()\nDetails from producer of error.\n\n$svnerrort->child()\nsvnerrort object of the error that's wrapped.\n\n$svnerrort->pool()\nThe pool holding this error and any child errors it wraps.\n\n$svnerrort->file()\nSource file where the error originated.\n\n$svnerrort->line()\nSource line where the error originated.\n\nSVN::Error::strerror($aprstatust)\nReturns the english description of the status code.\n\n$svnerrort->strerror()\nReturns the english description of the aprerr status code set on the $svnerrort. This is\nshort for: SVN::Error::strerror($svnerrort->aprerr());\n\nSVN::Error::create($aprerr, $child, $message);\nReturns a new svnerrort object with the error status specified in $aprerr, the child as\n$child, and error message of $message.\n\nSVN::Error::quickwrap($child, $newmsg); or $child->quickwrap($newmsg);\nA quick n' easy way to create a wrappered exception with your own message before throwing it\nup the stack.\n\n$child is the svnerrort object you want to wrap and $newmsg is the new error string you\nwant to set.\n\nSVN::Error::compose($chain, $newerror); or $chain->compose($newerror);\nAdd newerr to the end of $chain's chain of errors.\n\nThe $newerr chain will be copied into $chain's pool and destroyed, so $newerr itself\nbecomes invalid after this function.\n\nSVN::Error::clear($svnerrort); or $svnerrort->clear();\nFree the memory used by $svnerrort, as well as all ancestors and descendants of\n$svnerrort.\n\nYou must call this on every svnerrort object you get or you will leak memory.\n\nSVN::Error::expandedmessage($svnerrort) or $svnerrort->expandedmessage()\nReturns the error message by tracing through the svnerrort object and its children and\nconcatenating the error messages. This is how the internal exception handlers get their\nerror messages.\n\nSVN::Error::iserror($value)\nReturns true if value is of type svnerror. Returns false if value is anything else or\nundefined. This is useful for seeing if a call has returned an error.\n\nSVN::Error::croakonerror\nDefault error handler. It takes an svnerrort and extracts the error messages from it and\ncroaks with those messages.\n\nIt can be used in two ways. The first is detailed above as setting it as the automatic\nexception handler via setting $SVN::Error::handler.\n\nThe second is if you have $SVN::Error::handler set to undef as a wrapper for calls you want\nto croak on when there is an error, but you don't want to write an explicit error handler.\nFor example:\n\nmy $rev = SVN::Error::croakonerror($ctx->checkout($url,$path,'HEAD',1));\n\nIf there is no error then croakonerror will return the arguments passed to it unchanged.\n\nSVN::Error::confessonerror\nThe same as croakonerror except it will give a more detailed stack backtrace, including\ninternal calls within the implementation of the perl bindings. This is useful when you are\ndoing development work on the bindings themselves.\n\nSVN::Error::ignoreerror\nThis is useful for wrapping around calls which you wish to ignore any potential error. It\nchecks to see if the first parameter is an error and if it is it clears it. It then returns\nall the other parameters.\n\nsvnlogchangedpatht\n$lcp->action()\n'A'dd, 'D'elete, 'R'eplace, 'M'odify\n\n$lcp->copyfrompath()\nSource path of copy, or \"undef\" if there isn't any previous revision history.\n\n$lcp->copyfromrev()\nSource revision of copy, or $SVN::Core::INVALIDREVNUM if there is no previous history.\n\nsvnlogchangedpath2t\nAn object to represent a path that changed for a log entry.\n\n$lcp->action()\n'A'dd, 'D'elete, 'R'eplace, 'M'odify\n\n$lcp->copyfrompath()\nSource path of copy, or \"undef\" if there isn't any previous revision history.\n\n$lcp->copyfromrev()\nSource revision of copy, or $SVN::Core::INVALIDREVNUM if there is no previous history.\n\n$lcp->nodekind()\nThe type of the node, a $SVN::Node enum; may be $SVN::Node::unknown.\n\n$lcp->textmodified()\nIs the text modified, a \"SVN::Tristate\" enum, may be $SVN::Tristate::unknown.\n\n$lcp->propsmodified()\nAre properties modified, a \"SVN::Tristate\" enum, may be $SVN::Tristate::unknown.\n\nsvnnodekindt - SVN::Node\nAn enum of the following constants:\n\n$SVN::Node::none, $SVN::Node::file, $SVN::Node::dir, $SVN::Node::unknown.\n\nsvntristatet - SVN::Tristate\nAn enum of the following constants:\n\n$SVN::Tristate::true, $SVN::Tristate::false, $SVN::Tristate::unknown\n\nNote that these true/false values have nothing to do with Perl's concept of truth. In fact, each\nconstant would evaluate to true in a boolean context.\n\nsvndeptht - SVN::Depth\nAn enum of the following constants:\n\n$SVN::Depth::unknown\nDepth undetermined or ignored. In some contexts, this means the client should choose an\nappropriate default depth. The server will generally treat it as $SVN::Depth::infinity.\n\n$SVN::Depth::exclude\nExclude (i.e., don't descend into) directory D.\n\nNote: In Subversion 1.5, $SVN::Depth::exclude is not supported anyhwere in the client-side\n(Wc/Client/etc) code; it is only supported as an argument to setpath functions in the Ra\nand Repos reporters. (This will enable future versions of Subversion to run updates, etc,\nagainst 1.5 servers with proper $SVN::Depth::exclude behavior, once we get a chance to\nimplement client side support for $SVN::Depth::exclude).\n\n$SVN::Depth::empty\nJust the named directory D, no entries.\n\nUpdates will not pull in any files or subdirectories not already present.\n\n$SVN::Depth::files\nD + its files children, but not subdirs.\n\nUpdates will pull in any files not already present, but not subdirectories.\n\n$SVN::Depth::immediates\nD + immediate children (D and its entries).\n\nUpdates will pull in any files or subdirectories not already present; those subdirectories'\nthisdir entries will have depth-empty.\n\n$SVN::Depth::infinity\nD + all descendants (full recursion from D).\n\nUpdates will pull in any files or subdirectories not already present; those subdirectories'\nthisdir entries will have depth-infinity. Equivalent to the pre 1.5 default update\nbehavior.\n\nsvnoptrevisiont\nA revision, specified in one of \"SVN::Core::optrevision*\" ways.\n\n$rev->kind()\nAn enum denoting how the revision $rev was specified. One of\n$SVN::Core::optrevisionunspecified, $SVN::Core::optrevisionnumber,\n$SVN::Core::optrevisiondate, $SVN::Core::optrevisioncommitted,\n$SVN::Core::optrevisionprevious, $SVN::Core::optrevisionbase,\n$SVN::Core::optrevisionworking or $SVN::Core::optrevisionhead.\n\n$rev->value()\nExtra data about the revision. Only relevant if \"$rev->kind\" is\n$SVN::Core::optrevisionnumber (where it contains the revision number) or\n$SVN::Core::optrevisiondate (where it contains a date).\n\nsvnoptrevisionranget\nAn object representing a range of revisions.\n\n$range->start()\nThe first revision in the range, a \"psvnoptrevisiont\" object.\n\n$range->end()\nThe last revision in the range, a \"psvnoptrevisiont\" object.\n\nsvnconfigt\nOpaque object describing a set of configuration options.\n\nsvndirentt\n$dirent->kind()\nNode kind. A number which matches one of these constants: $SVN::Node::none,\n$SVN::Node::file, $SVN::Node::dir, $SVN::Node::unknown.\n\n$dirent->size()\nLength of file text, or 0 for directories.\n\n$dirent->hasprops()\nDoes the node have properties?\n\n$dirent->createdrev()\nLast revision in which this node changed.\n\n$dirent->time()\nTime of createdrev (mod-time).\n\n$dirent->lastauthor()\nAuthor of created rev.\n\nsvncommitinfot\n$commit->revision()\nJust committed revision.\n\n$commit->date()\nServer-side date of the commit.\n\n$commit->author()\nAuthor of the commit.\n\n$commit->postcommiterr()\nError message from the post-commit hook, or undef.\n\n$commit->reposroot()\nRepository root, may be \"undef\" if unknown.\n\nsvnlogentryt\n$entry->revision()\nThe revision of the commit.\n\n$entry->revprops()\nA reference to a hash of requested revision properties, which may be \"undef\" if it would\ncontain no revprops.\n\n$entry->haschildren()\nWhether or not this message has children.\n\n$entry->changedpaths2()\nA reference to hash containing as keys every path committed in \"$entry->revision()\"; the\nvalues are \"psvnlogchangedpath2t\" objects.\n\n$entry->noninheritable()\nWhether \"$entry->revision()\" should be interpreted as non-inheritable in the same sense of\n\"psvnmergeranget\".\n\n$entry->subtractivemerge()\nWhether \"$entry->revision()\" is a merged revision resulting from a reverse merge.\n\nsvnauthcredsimplet\n$simple->username()\nUsername.\n\n$simple->password()\nPassword.\n\n$simple->maysave()\nIndicates if the credentials may be saved (to disk).\n\nsvnauthcredusernamet\n$username->username()\nUsername.\n\n$username->maysave()\nIndicates if the credentials may be saved (to disk).\n\nsvnauthcredsslservertrustt\n$strust->maysave()\nIndicates if the credentials may be saved (to disk).\n\n$strust->acceptedfailures()\nBit mask of the accepted failures.\n\nsvnauthsslservercertinfot\n$scert->hostname()\nPrimary CN.\n\n$scert->fingerprint()\nASCII fingerprint.\n\n$scert->validfrom()\nASCII date from which the certificate is valid.\n\n$scert->validuntil()\nASCII date until which the certificate is valid.\n\n$scert->issuerdname()\nDN of the certificate issuer.\n\n$scert->asciicert()\nBase-64 encoded DER certificate representation.\n\nsvnauthcredsslclientcertt\n$ccert->certfile()\nFull paths to the certificate file.\n\n$ccert->maysave()\nIndicates if the credentials may be saved (to disk).\n\nsvnauthcredsslclientcertpwt\n$ccertpw->password()\nCertificate password.\n\n$ccertpw->maysave()\nIndicates if the credentials may be saved (to disk).\n"
                }
            ]
        },
        "CONSTANTS": {
            "content": "SVN::Auth::SSL\n$SVN::Auth::SSL::NOTYETVALID\nCertificate is not yet valid.\n\n$SVN::Auth::SSL::EXPIRED\nCertificate has expired.\n\n$SVN::Auth::SSL::CNMISMATCH\nCertificate's CN (hostname) does not match the remote hostname.\n\n$SVN::Auth::SSL::UNKNOWNCA\nCertificate authority is unknown (i.e. not trusted).\n\n$SVN::Auth::SSL::OTHER\nOther failure. This can happen if some unknown error condition occurs.\n\npsvnlockt\nObjects of this class contain information about locks placed on files in a repository. It has\nthe following accessor methods:\n\npath\nThe full path to the file which is locked, starting with a forward slash (\"/\").\n\ntoken\nA string containing the lock token, which is a unique URI.\n\nowner\nThe username of whoever owns the lock.\n\ncomment\nA comment associated with the lock, or undef if there isn't one.\n\nisdavcomment\nTrue if the comment was made by a generic DAV client.\n\ncreationdate\nTime at which the lock was created, as the number of microseconds since 00:00:00 January 1,\n1970 UTC. Divide it by 1000000 to get a Unix timet value.\n\nexpirationdate\nWhen the lock will expire. Has the value '0' if the lock will never expire.\n",
            "subsections": []
        },
        "AUTHORS": {
            "content": "Chia-liang Kao <clkao@clkao.org>\n",
            "subsections": []
        },
        "COPYRIGHT": {
            "content": "Licensed to the Apache Software Foundation (ASF) under one\nor more contributor license agreements.  See the NOTICE file\ndistributed with this work for additional information\nregarding copyright ownership.  The ASF licenses this file\nto you under the Apache License, Version 2.0 (the\n\"License\"); you may not use this file except in compliance\nwith the License.  You may obtain a copy of the License at\n\nhttp://www.apache.org/licenses/LICENSE-2.0\n\nUnless required by applicable law or agreed to in writing,\nsoftware distributed under the License is distributed on an\n\"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\nKIND, either express or implied.  See the License for the\nspecific language governing permissions and limitations\nunder the License.\n",
            "subsections": []
        }
    },
    "summary": "SVN::Core - Core module of the subversion perl bindings",
    "flags": [],
    "examples": [],
    "see_also": []
}