[svn.haxx.se] · SVN Dev · SVN Users · SVN Org · TSVN Dev · TSVN Users · Subclipse Dev · Subclipse Users · this month's index

Re: Seg fault, Perl bindings, "perl -c"

From: Nik Clayton <nik_at_ngo.org.uk>
Date: 2006-09-12 13:51:19 CEST

Malcolm Rowe wrote:
> I'm happy to say that I didn't understand that at all :-). Hopefully
> someone with more knowledge of the Perl bindings can pick this up now.
> (Particularly, I'm confused as to why the pool would be created if you
> run Perl with the -c option - I thought you said that that only executed
> BEGIN blocks?)

It does. "use SVN::Core" (or "-MSVN::Core" on the command line) is
exactly equivalent to:

     BEGIN {
         require SVN::Core;
         import SVN::Core ();

(see "perldoc -f use" for details). The "require SVN::Core;"
essentially places the entire contents of SVN/Core.pm inside that BEGIN
block, which has the effect of causing the

     our $gpool = SVN::Pool->new_default();

line to be inside the BEGIN block, which is why it executes.

The fact that there's a BEGIN block inside SVN/Core.pm is a bit of a


To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org
Received on Tue Sep 12 13:51:47 2006

This is an archived mail posted to the Subversion Dev mailing list.

This site is subject to the Apache Privacy Policy and the Apache Public Forum Archive Policy.