[32271] in Perl-Users-Digest

home help back first fref pref prev next nref lref last post

Perl-Users Digest, Issue: 3538 Volume: 11

daemon@ATHENA.MIT.EDU (Perl-Users Digest)
Tue Nov 8 09:09:32 2011

Date: Tue, 8 Nov 2011 06:09:09 -0800 (PST)
From: Perl-Users Digest <Perl-Users-Request@ruby.OCE.ORST.EDU>
To: Perl-Users@ruby.OCE.ORST.EDU (Perl-Users Digest)

Perl-Users Digest           Tue, 8 Nov 2011     Volume: 11 Number: 3538

Today's topics:
        $sth->errstr; and $sth->execute; <elodie.gillain@gmail.com>
    Re: $sth->errstr; and $sth->execute; <ben@morrow.me.uk>
    Re: Backreferencing through two sets of slashes <derykus@gmail.com>
        Filename variable going away <stevem_@nogood.com>
    Re: Filename variable going away <rweikusat@mssgmbh.com>
    Re: Filename variable going away <ben@morrow.me.uk>
    Re: Filename variable going away <stevem_@nogood.com>
    Re: Filename variable going away <rweikusat@mssgmbh.com>
    Re: Model Centric Perl Web Framework <rweikusat@mssgmbh.com>
    Re: Model Centric Perl Web Framework <ilias@lazaridis.com>
    Re: Model Centric Perl Web Framework <ben@morrow.me.uk>
    Re: Module install problem DBD::Unify <justin.1104@purestblue.com>
    Re: Module install problem DBD::Unify <ben@morrow.me.uk>
    Re: Module install problem DBD::Unify <justin.1104@purestblue.com>
        time-lag after DBI->commit <dn.perl@gmail.com>
    Re: time-lag after DBI->commit <rvtol+usenet@xs4all.nl>
    Re: time-lag after DBI->commit <dn.perl@gmail.com>
        Digest Administrivia (Last modified: 6 Apr 01) (Perl-Users-Digest Admin)

----------------------------------------------------------------------

Date: Mon, 7 Nov 2011 09:23:08 -0800 (PST)
From: elodie <elodie.gillain@gmail.com>
Subject: $sth->errstr; and $sth->execute;
Message-Id: <a80c6399-7b75-4bad-8319-e4bf5bb2eaea@v5g2000vbh.googlegroups.com>

Hi all

I would appreciate if someone could explain what the following command
does:
$sth->execute;

I would also like to know what the following command does:
$sth->errstr;

Thanks in advance


------------------------------

Date: Mon, 07 Nov 2011 11:50:44 -0600
From: Ben Morrow <ben@morrow.me.uk>
Subject: Re: $sth->errstr; and $sth->execute;
Message-Id: <9MOdnRL5PLHphyXTnZ2dnUVZ7tmdnZ2d@bt.com>


Quoth elodie <elodie.gillain@gmail.com>:
> Hi all
> 
> I would appreciate if someone could explain what the following command
> does:
> $sth->execute;
> 
> I would also like to know what the following command does:
> $sth->errstr;

perldoc DBI.

If there is something specific about the explanation in there which you
don't understand, post again.

Ben



------------------------------

Date: Mon, 7 Nov 2011 19:39:07 -0800 (PST)
From: "C.DeRykus" <derykus@gmail.com>
Subject: Re: Backreferencing through two sets of slashes
Message-Id: <2b3127fa-2982-4b92-9a36-feb6c40f6ef1@e15g2000vba.googlegroups.com>

On Nov 6, 11:53=A0am, Eric Smith <allomor...@gmail.com> wrote:
> Hi
>
> if ( $foo =3D~ /(\d\d)-(\d\d)-\d\d\d\d/ and $bar =3D~ /(\d?\d):(\d\d):(\d
> \d)/ )
> {
> # How do I match here the the two fields of $foo ?
> # Or is it not possible in a single construction?
> # $bar of course gives its ($hours, $minutes, $seconds) =3D $1, $2 and
> $3
>
> }

You may need to clarify or provide some actual
data...  If, possibly, you're trying to match
alternate date formats, you might use something
such as this:

if ( /(?| (\d\d) - (\d\d) - (\d{4})  # format 1
                      |               #  or
          (\d\d?) : (\d\d) : (\d{4}) # format 2
      )/x )
{
    print "\$1=3D$1 \$2=3D$2  \$3=3D$3\n";
}

* see perlre for meaning of (?|pattern) "branch
   reset pattern)

--
Charles DeRykus


------------------------------

Date: Mon, 07 Nov 2011 12:54:19 -0800
From: Steve May <stevem_@nogood.com>
Subject: Filename variable going away
Message-Id: <fCXtq.14630$pt2.8774@newsfe18.iad>

Maybe a poor title, but this has been driving me nuts for about an hour 
now.....

Consider:

my $log_file = 'active.log';

print "log_file is $log_file\n";

# prints 'active_log'

open( LOG, '+>>', $log_file )
    or die "Can't open logfile: $log_file  $!\n";

# prints "Can't open logfile: "

Obviously there is more going on in this logging script, but if I print 
out the value of $log_file immediately before the open, the value is 
correct, then it seems to go away when reference in the open statement...

It's probably something stupid, but sheesh....

Perl 5.008 (I know, but it's not my server)

perl -V (just in case it's Perl itself)
Summary of my perl5 (revision 5.0 version 8 subversion 0) configuration:
Platform:
osname=linux, osvers=2.6.9-67.0.7.elsmp, archname=i386-linux-thread-multi
uname='linux hs20-bc2-4.build.redhat.com 2.6.9-67.0.7.elsmp #1 smp wed 
feb 27 04:47:23 est 2008 i686 i686 i386 gnulinux '
config_args='-des -Doptimize=-O2 -g -pipe -march=i386 -mcpu=i686 
-Dmyhostname=localhost -Dperladmin=root@localhost -Dcc=gcc -Dcf_by=Red 
Hat, Inc. -Dinstallprefix=/usr -Dprefix=/usr -Darchname=i386-linux 
-Dvendorprefix=/usr -Dsiteprefix=/usr 
-Dotherlibdirs=/usr/lib/perl5/5.8.0 -Duseshrplib -Dusethreads 
-Duseithreads -Duselargefiles -Dd_dosuid -Dd_semctl_semun -Di_db 
-Ui_ndbm -Di_gdbm -Di_shadow -Di_syslog -Dman3ext=3pm -Duseperlio 
-Dinstallusrbinperl -Ubincompat5005 -Uversiononly -Dpager=/usr/bin/less 
-isr -Dinc_version_list=5.8.0'
hint=recommended, useposix=true, d_sigaction=define
usethreads=define use5005threads=undef useithreads=define 
usemultiplicity=define
useperlio=define d_sfio=undef uselargefiles=define usesocks=undef
use64bitint=undef use64bitall=undef uselongdouble=undef
usemymalloc=n, bincompat5005=undef
Compiler:
cc='gcc', ccflags ='-D_REENTRANT -D_GNU_SOURCE -DTHREADS_HAVE_PIDS 
-DDEBUGGING -fno-strict-aliasing -I/usr/local/include 
-D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 -I/usr/include/gdbm',
optimize='-O2 -g -pipe -march=i386 -mcpu=i686',
cppflags='-D_REENTRANT -D_GNU_SOURCE -DTHREADS_HAVE_PIDS -DDEBUGGING 
-fno-strict-aliasing -I/usr/local/include -I/usr/include/gdbm'
ccversion='', gccversion='3.2.3 20030502 (Red Hat Linux 3.2.3-59)', 
gccosandvers=''
intsize=4, longsize=4, ptrsize=4, doublesize=8, byteorder=1234
d_longlong=define, longlongsize=8, d_longdbl=define, longdblsize=12
ivtype='long', ivsize=4, nvtype='double', nvsize=8, Off_t='off_t', 
lseeksize=8
alignbytes=4, prototype=define
Linker and Libraries:
ld='gcc', ldflags =' -L/usr/local/lib'
libpth=/usr/local/lib /lib /usr/lib
libs=-lnsl -lgdbm -ldb -ldl -lm -lpthread -lc -lcrypt -lutil
perllibs=-lnsl -ldl -lm -lpthread -lc -lcrypt -lutil
libc=/lib/libc-2.3.2.so, so=so, useshrplib=true, libperl=libperl.so
gnulibc_version='2.3.2'
Dynamic Linking:
dlsrc=dl_dlopen.xs, dlext=so, d_dlsymun=undef, ccdlflags='-rdynamic 
-Wl,-rpath,/usr/lib/perl5/5.8.0/i386-linux-thread-multi/CORE'
cccdlflags='-fPIC', lddlflags='-shared -L/usr/local/lib'


Characteristics of this binary (from libperl):
Compile-time options: DEBUGGING MULTIPLICITY USE_ITHREADS 
USE_LARGE_FILES PERL_IMPLICIT_CONTEXT
Locally applied patches:
MAINT18379
Built under linux
Compiled at Jun 5 2008 09:47:16
@INC:
/usr/lib/perl5/5.8.0/i386-linux-thread-multi
/usr/lib/perl5/5.8.0
/usr/lib/perl5/site_perl/5.8.0/i386-linux-thread-multi
/usr/lib/perl5/site_perl/5.8.0
/usr/lib/perl5/site_perl/5.8.0
/usr/lib/perl5/site_perl
/usr/lib/perl5/vendor_perl/5.8.0/i386-linux-thread-multi
/usr/lib/perl5/vendor_perl/5.8.0
/usr/lib/perl5/vendor_perl/5.8.0
/usr/lib/perl5/vendor_perl
/usr/lib/perl5/5.8.0/i386-linux-thread-multi
/usr/lib/perl5/5.8.0
 .

If anyone can slap me upside the head and give me a clue on what is 
going on I'd sure appreciate it....

TIA,

Steve M


------------------------------

Date: Mon, 07 Nov 2011 22:11:46 +0000
From: Rainer Weikusat <rweikusat@mssgmbh.com>
Subject: Re: Filename variable going away
Message-Id: <87fwhzziot.fsf@sapphire.mobileactivedefense.com>

Steve May <stevem_@nogood.com> writes:
> Consider:
>
> my $log_file = 'active.log';
>
> print "log_file is $log_file\n";
>
> # prints 'active_log'
>
> open( LOG, '+>>', $log_file )
>    or die "Can't open logfile: $log_file  $!\n";
>
> # prints "Can't open logfile: "
>
> Obviously there is more going on in this logging script, but if I
> print out the value of $log_file immediately before the open, the
> value is correct, then it seems to go away when reference in the open
> statement...

As it stands, this is rather unintelligible. What are the exact
symptoms of your problem? Could your perhaps post something
sufficiently completed that it can be run through perl with 'the
problem' actually occuring?


------------------------------

Date: Mon, 07 Nov 2011 16:16:36 -0600
From: Ben Morrow <ben@morrow.me.uk>
Subject: Re: Filename variable going away
Message-Id: <LIydncx-MoRZxSXTnZ2dnUVZ7qadnZ2d@bt.com>


Quoth Steve May <stevem_@nogood.com>:
> Maybe a poor title, but this has been driving me nuts for about an hour 
> now.....
> 
> Consider:
> 
> my $log_file = 'active.log';
> 
> print "log_file is $log_file\n";
> 
> # prints 'active_log'
> 
> open( LOG, '+>>', $log_file )
>     or die "Can't open logfile: $log_file  $!\n";
> 
> # prints "Can't open logfile: "

I don't believe you. It certainly doesn't for me.

> Obviously there is more going on in this logging script, but if I print 
> out the value of $log_file immediately before the open, the value is 
> correct, then it seems to go away when reference in the open statement...
> 
> It's probably something stupid, but sheesh....

Take the progam you have, which isn't working, and start removing
sections. Test it again after removing each bit, and if it started
working put that bit back. Carry on until you've made the program as
small as possible while still not working, and then post the result.

Ben



------------------------------

Date: Mon, 07 Nov 2011 17:34:36 -0800
From: Steve May <stevem_@nogood.com>
Subject: Re: Filename variable going away
Message-Id: <0J%tq.26261$Cr1.3192@newsfe03.iad>

On 11/07/2011 12:54 PM, Steve May wrote:
> Maybe a poor title, but this has been driving me nuts for about an hour
> now.....
>
> Consider:
>
> my $log_file = 'active.log';
>
> print "log_file is $log_file\n";
>
> # prints 'active_log'
>
> open( LOG, '+>>', $log_file )
> or die "Can't open logfile: $log_file $!\n";
>
> # prints "Can't open logfile: "
>
> Obviously there is more going on in this logging script, but if I print
> out the value of $log_file immediately before the open, the value is
> correct, then it seems to go away when reference in the open statement...
>
> It's probably something stupid, but sheesh....



Ah well... thanks guys, I'm considering this one closed.

This is a cgi program and the problem turned out to be a permissions 
issue (not used to non-SUEXEC servers), though why die would not pass 
along the value of $log_file still has me scratching my head.

I didn't post more code as it is property of the customer and as silly 
as non-disclosures are... well.

\s



------------------------------

Date: Tue, 08 Nov 2011 13:28:19 +0000
From: Rainer Weikusat <rweikusat@mssgmbh.com>
Subject: Re: Filename variable going away
Message-Id: <874nyerbf0.fsf@sapphire.mobileactivedefense.com>

Steve May <stevem_@nogood.com> writes:
> On 11/07/2011 12:54 PM, Steve May wrote:
>> Maybe a poor title, but this has been driving me nuts for about an hour
>> now.....
>>
>> Consider:
>>
>> my $log_file = 'active.log';
>>
>> print "log_file is $log_file\n";
>>
>> # prints 'active_log'
>>
>> open( LOG, '+>>', $log_file )
>> or die "Can't open logfile: $log_file $!\n";
>>
>> # prints "Can't open logfile: "
>>
>> Obviously there is more going on in this logging script, but if I print
>> out the value of $log_file immediately before the open, the value is
>> correct, then it seems to go away when reference in the open statement...

[...]

> This is a cgi program and the problem turned out to be a permissions
> issue (not used to non-SUEXEC servers), though why die would not pass
> along the value of $log_file still has me scratching my head.
>
> I didn't post more code as it is property of the customer and as silly
> as non-disclosures are... well.

It is silly to complain about a problem without saying what the
problem actually is and even more silly to post random mock-up code
that doesn't demonstrate the problem alongside of the content-free
complaint.



------------------------------

Date: Mon, 07 Nov 2011 13:46:08 +0000
From: Rainer Weikusat <rweikusat@mssgmbh.com>
Subject: Re: Model Centric Perl Web Framework
Message-Id: <87obworqov.fsf@sapphire.mobileactivedefense.com>

Ben Morrow <ben@morrow.me.uk> writes:

[...]

> IMHO if you're using an RDBMS just to serialise a handful of objects
> you're wasting it: the whole point of SQL is it lets you ask
> questions you weren't expecting when you put the data in the
> database.

The irony of SQL is that it was designed in order to enable people to
perform complex data analysis tasks without having to learn how to
write programs in an imperative programming language but that it is
mostly used by people who know how to do the latter and are not
exactly keen on learning the former.

[SCNR]


------------------------------

Date: Mon, 7 Nov 2011 20:18:17 -0800 (PST)
From: Ilias Lazaridis <ilias@lazaridis.com>
Subject: Re: Model Centric Perl Web Framework
Message-Id: <2111dc0d-b4b0-4bdd-ac5f-b15a31e784d2@s5g2000vbe.googlegroups.com>

On 7 =CE=9D=CE=BF=CE=AD, 03:22, Ben Morrow <b...@morrow.me.uk> wrote:
> Quoth Ilias Lazaridis <il...@lazaridis.com>:
>
> > On 5 , 02:11, George Mpouras
> > <antispam.gravital...@hotmail.com.nospam.me> wrote:
> > > Your question is very generic. For me the simple CGI with some DBI
> > > module is enough.
>
> > the question is quite concrete.
>
> I agree. I only didn't respond because I don't think I've got a good
> answer.
>
> > I do not ask "what perl webframework do you prefere" but "which perl
> > webframework is model-centric".
>
> IIUC you aren't just looking for something which puts the business logic
> in the model (which is simply good practice in an MVC system) but you
> more specifically want a system which will generate and update a
> database schema out of thin air given only a set of objects to store.

like you write, but "out of the class definition and related meta-
data" (and some version information about the database which the
framework keeps internally)

> If you just want a good MVC system, I'd recommend Catalyst. Cat supports
> lots of Model classes: the one usually used in the examples is based on
> DBIx::Class. DBIC is, I think, exactly what you *aren't* looking for:
> while it will generate DDL for you, and it gives you an OO interface to
> the database, it will only do so after you've set up a 'schema' which
> ends up mostly equivalent to an SQL schema.

Another person wrote: "You may want to look at DBIx::Class which is a
mature and feature-rich Perl ORM that lets you generate your model
classes automatically from your database schema or vice-versa."

So, DBIC need the "schema" section in addition to the class-
definition. I understand.

> Perhaps what you want is Catalyst::Model::KiokuDB? I've never used it,
> with or without Catalyst[0], but Florian (who appears to be the current
> maintainer) certainly knows what he's doing.

ok, will take a look.

Maybe I ask a different way: which existent framework (or ORM) come
nearest to "Model-Centric"?

> Ben
>
> [0] and probably wouldn't want to. IMHO if you're using an RDBMS just to
> serialise a handful of objects you're wasting it: the whole point of SQL
> is it lets you ask questions you weren't expecting when you put the data
> in the database. If all the important bits are stuffed into blobs you
> might as well have been using BDB or something simple like that from the
> start. (In fact, I see KiokuDB supports BDB as a backend...)

I want to use an sql db, in order to be able to switch to other
frameworks, languages etc.

--
http://lazaridis.com



------------------------------

Date: Tue, 08 Nov 2011 05:40:19 -0600
From: Ben Morrow <ben@morrow.me.uk>
Subject: Re: Model Centric Perl Web Framework
Message-Id: <OpudnRO9Fpm-iCTTnZ2dnUVZ8gudnZ2d@bt.com>


Quoth Ilias Lazaridis <ilias@lazaridis.com>:
> On 7 Νοέ, 03:22, Ben Morrow <b...@morrow.me.uk> wrote:
> 
> > Perhaps what you want is Catalyst::Model::KiokuDB? I've never used it,
> > with or without Catalyst[0], but Florian (who appears to be the current
> > maintainer) certainly knows what he's doing.
> 
> ok, will take a look.
> 
> Maybe I ask a different way: which existent framework (or ORM) come
> nearest to "Model-Centric"?

As I said, I don't know. It's not a property I would consider desirable,
so it's not something I've looked into.

> > [0] and probably wouldn't want to. IMHO if you're using an RDBMS just to
> > serialise a handful of objects you're wasting it: the whole point of SQL
> > is it lets you ask questions you weren't expecting when you put the data
> > in the database. If all the important bits are stuffed into blobs you
> > might as well have been using BDB or something simple like that from the
> > start. (In fact, I see KiokuDB supports BDB as a backend...)
> 
> I want to use an sql db, in order to be able to switch to other
> frameworks, languages etc.

Well, in that case, don't you want to put a bit more thought into
designing the DB schema properly? Kioku will give you a schema which
looks approximately like

    CREATE TABLE entries (
        id      varchar PRIMARY KEY,
        data    blob
    );

plus some additional bookkeeping, where the "data" field contains a
serialised object. While the default serialisation is JSON-based, and so
in principle portable between languages, it's not likely to be very easy
to pull a usable object out of the DB from some other language since the
database structure is not in any way related to the actual structure of
your data.

Ben



------------------------------

Date: Mon, 7 Nov 2011 13:42:38 +0000
From: Justin C <justin.1104@purestblue.com>
Subject: Re: Module install problem DBD::Unify
Message-Id: <er3lo8-nt1.ln1@zem.masonsmusic.co.uk>

On 2011-11-04, Ben Morrow <ben@morrow.me.uk> wrote:
>
> Quoth Justin C <justin.1104@purestblue.com>:
>> 
>> I'm trying to install the DBD::Unify module. My usual install method is
>> from within the cpan shell:
>> 
>> cpan> install DBD::Unify
>> 
>> This failed initially because I didn't have $DBPATH environment set.
>> Having fixed that I got a different failure, and the same failure if I,
>> in the build directory, run
>> 
>> [justin@server]$ perl Makefile.PL
>> [justin@server]$ make
>> 
>> I don't seem to see any errors until this one:
>> 
>> if [ -x /usr/sbin/selinuxenabled ] && /usr/sbin/selinuxenabled; then
>> chcon -t textrel_shlib_t blib/arch/auto/DBD/Unify/Unify.so; fi
>> chcon: failed to change context of blib/arch/auto/DBD/Unify/Unify.so to
>> root:object_r:textrel_shlib_t: Invalid argument
>> make: *** [linkext] Error 1
>> 
>> Until today I'd never even heard of chcon. Any suggestions on how I fix
>> this?
>
> I would start by editing the Makefile.PL and commenting out the six
> lines starting with 
>
>     'linkext::',

Great minds.... etc.  

I spent most of Saturday morning reading about SELinux and still not
understanding it. I also looked into how to disable it and couldn't find
anything concrete other than: "It could cause problems when you
re-enable it".

So the Makefile.PL needed to be looked at. All I did was comment the 'if
 ...' line following 'linkedt::', and the 'if ...' line following
'install::'. I then did a manual install.

What I can't figure out, though, is that I built it in
/root/.cpan/build/..., I was root (su -- root), but it still installed
the files under /home/justin/perl5/lib... Fortunately there were not
many of them, I just moved them to the same place as other locally
install modules and all it working as I'd expect. But why did it install
under my home dir? ... prolly another Linux Q rather than perl...


> in sub postamble. If that works then you should file a DBD::Unify bug
> with full details of your Linux setup, including anything you've changed
> wrt SELinux.

Seeing as it works submit the report this afternnon.


> Otherwise, I'm afraid I don't know: you'll need to ask someone who knows
> about SELinux. I have to say I don't really see why DBD::Unify needs
> special SELinux setup when other modules don't.

It's my first real contact with SELinux. I'm not sure I like it!


   Justin.

-- 
Justin C, by the sea.


------------------------------

Date: Mon, 07 Nov 2011 10:54:26 -0600
From: Ben Morrow <ben@morrow.me.uk>
Subject: Re: Module install problem DBD::Unify
Message-Id: <WaSdne8_oszfkCXTnZ2dnUVZ8sednZ2d@bt.com>


Quoth Justin C <justin.1104@purestblue.com>:
> 
> What I can't figure out, though, is that I built it in
> /root/.cpan/build/..., I was root (su -- root), but it still installed
> the files under /home/justin/perl5/lib... Fortunately there were not
> many of them, I just moved them to the same place as other locally
> install modules and all it working as I'd expect. But why did it install
> under my home dir? ... prolly another Linux Q rather than perl...

There will be one of three answers to that: either the wrong values have
got into the root-owned global config file, or your 'su' session is
picking up your user-owned config file, or you've set something like
PERL_MM_OPT in the environment and su didn't clear it.

To check the first, look through the files listed by

    perldoc -lm CPAN::Config
    perldoc -lm CPAN::MyConfig

and make sure the paths look right. IIRC CPAN will only load ::Config if
it can't find a ::MyConfig. If the wrong paths have snuck in, you can
either edit the file (as root) and fix them, or fix the configuration
with 'o conf' from the CPAN shell after making sure you've fixed your
environment.

To check the second and third, see what you've got in your environment
after you su. CPAN looks for $ENV{HOME}/.cpan/CPAN/MyConfig.pm before
looking for global versions, so if your su(1) doesn't reset $HOME it
might still be picking up your per-user config. When CPAN rewrites the
config file it always puts it back where it found it, so if you don't
fix this then attempting to 'o conf' as root will give you a root-owned
config under your user's home directory, which isn't really helpful.

MakeMaker will also respect $ENV{PERL_MM_OPT}, if it's set, so if you're
setting that in your profile you need to tell su to clear it. su(1)
usually has an option to start with a clean environment: mine uses a
single -, but I'm not on Linux so yours might be different.

(I find that CPAN has a rather nasty habit of picking up the wrong
config more often than I'd like. Since I've got several versions of perl
installed here, with their own CPAN configs in their own @INCs, I've
actually created ~mauzo/.cpan/CPAN as a read-only immutable directory,
so it can't write some nonsense in the wrong place by mistake...)

Ben



------------------------------

Date: Tue, 8 Nov 2011 10:22:35 +0000
From: Justin C <justin.1104@purestblue.com>
Subject: Re: Module install problem DBD::Unify
Message-Id: <bgcno8-hdg.ln1@zem.masonsmusic.co.uk>

On 2011-11-07, Ben Morrow <ben@morrow.me.uk> wrote:
>
> Quoth Justin C <justin.1104@purestblue.com>:
>> 
>> What I can't figure out, though, is that I built it in
>> /root/.cpan/build/..., I was root (su -- root), but it still installed
>> the files under /home/justin/perl5/lib... 


> There will be one of three answers to that: either the wrong values have
> got into the root-owned global config file, or your 'su' session is
> picking up your user-owned config file, or you've set something like
> PERL_MM_OPT in the environment and su didn't clear it.

[snip]

Thank you for the very detailed explanation, Ben. Turns out my making it
as myself set INSTALL_BASE which was not overwritten by when I tried to
make as root... I've not done much module building by hand, generally
they install just fine for me from within the cpan shell... I don't know
if 'make clean' is standard in these module packages, and, with
hindsight, I should have done it.

Still, no harm done, as I mentioned, there were very few files created
by the build and moving them into the correct location worked just fine.

With any luck cpan shell will not fail me again... which it didn't this
time, I just got bitten by ****ing SELinux.

   Justin.

-- 
Justin C, by the sea.


------------------------------

Date: Mon, 7 Nov 2011 22:48:26 -0800 (PST)
From: "dn.perl@gmail.com" <dn.perl@gmail.com>
Subject: time-lag after DBI->commit
Message-Id: <dab670bb-6015-4c53-b23e-2d328313bf47@u10g2000prm.googlegroups.com>


I run a script which inserts (say) 50,000 records in a Oracle table
which had 40,000 records to begin with, but the records show up
gradually over a period of 20-30 seconds.
select count(*) from my_table  ==> 40,000 records, before running the
script.
Run the script, within which I do  $dbh->insert-50k-rows, $dbh-
>commit, the script exits.

02 seconds after the script exits, select count(*) from my_table  ==>
40,000 records or 40,050 records
10 seconds after the script exits, select count(*) from my_table  ==>
approx 70,000 records
40 seconds after the script exits, select count(*) from my_table  ==>
90,000 records

What exactly is happening here? I would expect ($dbh->commit) to take
40-50 seconds if that is what it takes, but the moment the perl script
exits, in my oracle client, I should see 90,000 rows in the table; no?
Why the delay?



------------------------------

Date: Tue, 08 Nov 2011 09:10:01 +0100
From: "Dr.Ruud" <rvtol+usenet@xs4all.nl>
Subject: Re: time-lag after DBI->commit
Message-Id: <4eb8e3d9$0$6877$e4fe514c@news2.news.xs4all.nl>

On 2011-11-08 07:48, dn.perl@gmail.com wrote:

> I run a script which inserts (say) 50,000 records in a Oracle table
> which had 40,000 records to begin with, but the records show up
> gradually over a period of 20-30 seconds.
> select count(*) from my_table  ==>  40,000 records, before running the
> script.
> Run the script, within which I do  $dbh->insert-50k-rows, $dbh-
>> commit, the script exits.
>
> 02 seconds after the script exits, select count(*) from my_table  ==>
> 40,000 records or 40,050 records
> 10 seconds after the script exits, select count(*) from my_table  ==>
> approx 70,000 records
> 40 seconds after the script exits, select count(*) from my_table  ==>
> 90,000 records
>
> What exactly is happening here? I would expect ($dbh->commit) to take
> 40-50 seconds if that is what it takes, but the moment the perl script
> exits, in my oracle client, I should see 90,000 rows in the table; no?
> Why the delay?

Show the code. Where is your $dbh->begin_work() call?

-- 
Ruud


------------------------------

Date: Tue, 8 Nov 2011 01:28:03 -0800 (PST)
From: "dn.perl@gmail.com" <dn.perl@gmail.com>
Subject: Re: time-lag after DBI->commit
Message-Id: <6f8a2301-14ea-44e9-b5d6-7e1cbd0220c4@h30g2000pro.googlegroups.com>

One correction: The database in question is MySQL, not Oracle.

I run a script which inserts (say) 50,000 records in a MySQL table
which had 40,000 records to begin with, but the records show up
gradually over a period of 20-30 seconds.
select count(*) from my_table  ==> 40,000 records, before running the
script.
Run the script, within which I do
  $dbh->insert-50k-rows,
then, $dbh->commit,
then the script exits.

02 seconds after the script exits, select count(*) from my_table  ==>
40,000 records or 40,050 records
10 seconds after the script exits, select count(*) from my_table  ==>
approx 70,000 records
40 seconds after the script exits, select count(*) from my_table  ==>
90,000 records

What exactly is happening here? I would expect ($dbh->commit) to take
40-50 seconds if that is what it takes, but the moment the perl script
exits, in my MySQL client, I should see 90,000 rows in the table; no?
Why the delay?



------------------------------

Date: 6 Apr 2001 21:33:47 GMT (Last modified)
From: Perl-Users-Request@ruby.oce.orst.edu (Perl-Users-Digest Admin) 
Subject: Digest Administrivia (Last modified: 6 Apr 01)
Message-Id: <null>


Administrivia:

To submit articles to comp.lang.perl.announce, send your article to
clpa@perl.com.

Back issues are available via anonymous ftp from
ftp://cil-www.oce.orst.edu/pub/perl/old-digests. 

#For other requests pertaining to the digest, send mail to
#perl-users-request@ruby.oce.orst.edu. Do not waste your time or mine
#sending perl questions to the -request address, I don't have time to
#answer them even if I did know the answer.


------------------------------
End of Perl-Users Digest V11 Issue 3538
***************************************


home help back first fref pref prev next nref lref last post