[24057] in Perl-Users-Digest

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

Perl-Users Digest, Issue: 6254 Volume: 10

daemon@ATHENA.MIT.EDU (Perl-Users Digest)
Sat Mar 13 14:10:38 2004

Date: Sat, 13 Mar 2004 11:10:08 -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           Sat, 13 Mar 2004     Volume: 10 Number: 6254

Today's topics:
    Re: No more handles error with DBD::DB2 on Linux <bialek@sympatico.ca>
        oracle socket creation <PerlGuRu2b@bobotheclown.org>
    Re: oracle socket creation <vetro@online.no>
        Perl 5.8.3 "make test" fails the "wait" test (Tom Williams)
    Re: Regex to match simple line of XML (Bill)
    Re: Text editor implemented in Perl <Petri_member@newsguy.com>
    Re: Text editor implemented in Perl <theaney@cablespeed.com>
    Re: Text editor implemented in Perl (Randal L. Schwartz)
    Re: Text editor implemented in Perl <spam-block-@-SEE-MY-SIG.com>
    Re: Text editor implemented in Perl <spam-block-@-SEE-MY-SIG.com>
    Re: Text editor implemented in Perl <spam-block-@-SEE-MY-SIG.com>
        Digest Administrivia (Last modified: 6 Apr 01) (Perl-Users-Digest Admin)

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

Date: Sat, 13 Mar 2004 07:39:02 -0500
From: "bialek" <bialek@sympatico.ca>
Subject: Re: No more handles error with DBD::DB2 on Linux
Message-Id: <NhD4c.50958$6y1.1963371@news20.bellglobal.com>

RH7.3 is one of those antique Linux OS that need some parameter twitching in
the /proc filesystem... Normally the handles run out if the number of system
semaphores or else runs out... I think for RH7.3 you still need to manually
echo the parameters in...

echo 256000 > /proc/sys/kernel/shmmax
echo 1024 > /proc/sys/kernel/msgmni
echo "250 32000 32 1024" > /proc/sys/kernel/sem

not full sure about the correct paths above right now (on the road and no
LInux box in front of me) but you should be able to find them...

"Hemant Shah" <shah@typhoon.xnet.com> wrote in message
news:c2asif$hko$1@flood.xnet.com...
>
> Folks,
>
>   I have DB2 UDB 7.2 EE installed on AIX 5.2 system. I think I am at
>   latest fixpack, see output of lslpp below. I have also installed DB2
>   UDB 7.2 EE on RedHat Linux 7.3 I believe that is also at the latest
>   fix pack, see rpm output below.
>
>   The database is on AIX system and on the Linux system it is cataloged
>   as remote database.
>
>   I have perl/TK GUI that uses DBD::DB2 interface to access the database.
>   If I run the GUI from AIX system (server) I have no problems.  If I
>   run GUI from Linux system (client), then after using it for some time
>   I get following error:
>
>   CLI0129E  No more handles.
>
>   Last time I got this error I ran following commands on the Server:
>
>   db2 list applications
>   db2 get snapshot for applications on dbname
>
>   There was only one connection to the database and that was the GUI,
>   the application also had only one section.
>
>   I have checked my code and I always call finish() method on the
>   statement handle after I am done. All the access to the database is
>   done by calling various functions. When the GUI is started it connects
>   to the database. Each function creates and prepares the statement and
then
>   executes it and then calls finish() before returning.
>
>
>   I am not sure why I am getting this error from the Linix client.
>
>
>
> # lslpp -l "db2_07_01*"
>   Fileset                      Level  State      Description
>   ------------------------------------------------------------------------
----
> Path: /usr/lib/objrepos
>   db2_07_01.adt.rte         7.1.0.72  COMMITTED  Application Development
Tools
>                                                  (ADT)
>   db2_07_01.adt.samples     7.1.0.72  COMMITTED  ADT Sample Programs
>   db2_07_01.cdb             7.1.0.72  COMMITTED  Control Database
>   db2_07_01.cj              7.1.0.72  COMMITTED  Java Common files
>   db2_07_01.client          7.1.0.72  COMMITTED  Client Application
Enabler
>   db2_07_01.cnvucs          7.1.0.72  COMMITTED  Code Page Conversion
Tables -
>                                                  Uni Code Support
>   db2_07_01.conn            7.1.0.72  COMMITTED  Connect
>   db2_07_01.conv.jp         7.1.0.40  COMMITTED  Code Page Conversion
Tables -
>                                                  Japanese
>   db2_07_01.conv.kr         7.1.0.40  COMMITTED  Code Page Conversion
Tables -
>                                                  Korean
>   db2_07_01.conv.sch        7.1.0.40  COMMITTED  Code Page Conversion
Tables -
>                                                  Simplified Chinese
>   db2_07_01.conv.tch        7.1.0.40  COMMITTED  Code Page Conversion
Tables -
>                                                  Traditional Chinese
>   db2_07_01.cs.drda         7.1.0.72  COMMITTED  Communication Support -
DRDA
>                                                  Application Server
>   db2_07_01.cs.ipx          7.1.0.72  COMMITTED  Communication Support -
IPX
>   db2_07_01.cs.rte          7.1.0.72  COMMITTED  Communication Support -
TCP/IP
>   db2_07_01.cs.sna          7.1.0.72  COMMITTED  Communication Support -
SNA
>   db2_07_01.ctsr            7.1.0.72  COMMITTED  Control Server
>   db2_07_01.das             7.1.0.72  COMMITTED  Administration Server
>   db2_07_01.db2.engn        7.1.0.72  COMMITTED  Engine
>   db2_07_01.db2.rte         7.1.0.72  COMMITTED  Run-time Environment
>   db2_07_01.db2.samples     7.1.0.40  COMMITTED  Sample Database Source
>   db2_07_01.db2tie           7.2.0.2  COMMITTED  Text Information Extender
>   db2_07_01.elic            7.1.0.72  COMMITTED  Product Signature for UDB
>                                                  Enterprise Edition
>   db2_07_01.jdbc            7.1.0.72  COMMITTED  Java Support
>   db2_07_01.ldap            7.1.0.72  COMMITTED  DB2 LDAP Support
>   db2_07_01.spb             7.1.0.72  COMMITTED  Stored Procedure Builder
>   db2_07_01.tspf            7.1.0.72  COMMITTED  Transformer Stored
Procedure
>                                                  Files
>   db2_07_01.wcc             7.1.0.72  COMMITTED  Control Center
>
> ----------------------------------------------------------------------
> # rpm -qa | grep db2
> db2-2.4.14-10
> db2das71-7.1.0-68
> db2cnvc71-7.1.0-68
> db2-devel-2.4.14-10
> db2jdbc71-7.1.0-68
> db2cj71-7.1.0-68
> db2adt71-7.1.0-68
> db2crte71-7.1.0-68
> db2cnvj71-7.1.0-68
> db2cliv71-7.1.0-68
> db2engn71-7.1.0-68
> db2conn71-7.1.0-68
> db2smpl71-7.1.0-68
> db2cnvt71-7.1.0-68
> db2rte71-7.1.0-68
> db2wcc71-7.1.0-68
> db2adts71-7.1.0-68
> db2cdrd71-7.1.0-68
> db2cnvk71-7.1.0-68
> db2cucs71-7.1.0-68
> db2repl71-7.1.0-68
> db2elic71-7.1.0-68
>
> -- 
> Hemant Shah                           /"\  ASCII ribbon campaign
> E-mail: NoJunkMailshah@xnet.com       \ /  --------------------- 
>                                        X     against HTML mail
> TO REPLY, REMOVE NoJunkMail           / \      and postings
> FROM MY E-MAIL ADDRESS.
> -----------------[DO NOT SEND UNSOLICITED BULK E-MAIL]------------------
> I haven't lost my mind,                Above opinions are mine only.
> it's backed up on tape somewhere.      Others can have their own.




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

Date: Sat, 13 Mar 2004 16:38:28 GMT
From: Perl GuRu2b <PerlGuRu2b@bobotheclown.org>
Subject: oracle socket creation
Message-Id: <pan.2004.03.13.17.11.59.219461@bobotheclown.org>

anyone ever used perl to monitor an Oracle database?
Goal:
send select statement to oracle DB every 5 minutes or so to verify that it
is up and running.  Capture output and translate to pass/fail on web page

I am thinking 
NET::Telnet
but I don't know the connect string to pass to the DB.

I could open a socket and connect directly but once again I don't know
what to send.
Any help would be greatly appreciated.
Thanks 
Rocky
PerlGuRu2b


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

Date: Sat, 13 Mar 2004 18:28:32 +0100
From: Vetle Roeim <vetro@online.no>
Subject: Re: oracle socket creation
Message-Id: <m34qsslkqn.fsf@quimby.dirtyhack.org>

* Perl GuRu2b
> anyone ever used perl to monitor an Oracle database?
> Goal:
> send select statement to oracle DB every 5 minutes or so to verify that it
> is up and running.  Capture output and translate to pass/fail on web page
>
> I am thinking 
> NET::Telnet
> but I don't know the connect string to pass to the DB.
>
> I could open a socket and connect directly but once again I don't know
> what to send.
> Any help would be greatly appreciated.

  There are Perl modules you can use for connecting to an Oracle
  database. Check out DBI, <URL:http://dbi.perl.org>, which has a
  driver for Oracle.

-- 
#!/usr/bin/vr


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

Date: 13 Mar 2004 08:30:12 -0800
From: tomdkat@comcast.net (Tom Williams)
Subject: Perl 5.8.3 "make test" fails the "wait" test
Message-Id: <a8be67fb.0403130830.d50534e@posting.google.com>

I'm building Perl 5.8.3 on a RedHat 9 Linux system using gcc-3.3.3. 
The system has glibc-2.3.2 installed.  I've got Perl 5.8.2
(multi-threaded) installed and it works fine. I also use
mod_perl-1.99_13 with the Perl 5.8.2 installation (connected to Apache
2.0.48) and it all works fine (save some mod_perl quirks).

I'm trying to upgrade to Perl 5.8.3 and the build runs smoothly until
I run "make test" and only ONE test fails and that's the "wait" test:

t/pod/oneline_cmds...................ok
t/pod/plainer........................ok
t/pod/pod2usage......................ok
t/pod/poderrs........................ok
t/pod/podselect......................ok
t/pod/special_seqs...................ok
t/x2p/s2p............................ok
Failed 1 test script out of 825, 99.88% okay.
### Since not all tests were successful, you may want to run some of
### them individually and examine any diagnostic messages they
produce.
### See the INSTALL document's section on "make test".
### You have a good chance to get more information by running
###   ./perl harness
### in the 't' directory since most (>=80%) of the tests succeeded.
### You may have to set your dynamic library search path,
### LD_LIBRARY_PATH, to point to the build directory:
###   setenv LD_LIBRARY_PATH `pwd`; cd t; ./perl harness
###   LD_LIBRARY_PATH=`pwd`; export LD_LIBRARY_PATH; cd t; ./perl
harness
###   export LD_LIBRARY_PATH=`pwd`; cd t; ./perl harness
### for csh-style shells, like tcsh; or for traditional/modern
### Bourne-style shells, like bash, ksh, and zsh, respectively.
u=5.08  s=1.33  cu=333.31  cs=33.53  scripts=825  tests=79580
make[2]: *** [_test_tty] Error 1
make[2]: Leaving directory `/home/tom/perl-5.8.3'
make[1]: *** [_test] Error 2
make[1]: Leaving directory `/home/tom/perl-5.8.3'
make: *** [test] Error 2
[tom@mama perl-5.8.3]$ 

So, I go to the "t" directory and run "perl harness" and after the
tests run again, I get this report:

Failed Test                    Stat Wstat Total Fail  Failed  List of
Failed
-------------------------------------------------------------------------------
 ../ext/threads/shared/t/wait.t              102   30  29.41%  27-41
76-90
24 tests and 488 subtests skipped.
Failed 1/853 test scripts, 99.88% okay. 30/79591 subtests failed,
99.96% okay.
[tom@mama t]$ 

So, given I'm building a multi-threaded perl-5.8.3 does the failure of
the above test mean I really can't use the perl "bundle" I just built?
 My intent is to upgrade Perl on the system to 5.8.3 (from 5.8.2) and
then build mod_perl-1.99_13 using Perl 5.8.3 (multi-threaded) and then
use the new mod_perl in my Apache 2.0.48 (using the worker MPM)
server.

Is this Perl 5.8.3 "safe" to use, given the test failure above?

Thanks in advance for your time and assistance.

Peace...

Tom


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

Date: 13 Mar 2004 10:06:15 -0800
From: wherrera@lynxview.com (Bill)
Subject: Re: Regex to match simple line of XML
Message-Id: <239ce42f.0403131006.2964a7df@posting.google.com>

aclarke@austin.rr.com (ac) wrote in message news:<ec432b9c.0403121512.3484b991@posting.google.com>...
> Tore Aursand <tore@aursand.no> wrote in message news:<pan.2004.03.12.18.17.26.789699@aursand.no>...
> > On Fri, 12 Mar 2004 09:47:36 -0800, ac wrote:
> > > I am trying to get a regex to match a simple line of XML.
> > 

> So this is really
> a subset of legal XML files and isn't really a problem because my application
> controls both the reading and writing of these.

If so, and you only have one or several matches to do, why not write a
unique comment tag to anchor your match? That would be fastest.


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

Date: 13 Mar 2004 05:19:33 -0800
From: Petri <Petri_member@newsguy.com>
Subject: Re: Text editor implemented in Perl
Message-Id: <c2v1p501j7p@drn.newsguy.com>

In article <7a63509i3dlp6l3tr3am18qchlvs0soooi@4ax.com>, zzapper says...
> I also love

> http://peter.verhas.com/progs/perl/prep/

That program is a perfect example of what can happen if you don't use strict;.

If the author had, he would have found his typos immediately:
  if( $VerbodeMode ){


Petri



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

Date: Sat, 13 Mar 2004 09:46:54 -0500
From: Tim Heaney <theaney@cablespeed.com>
Subject: Re: Text editor implemented in Perl
Message-Id: <87vfl8by8x.fsf@mrbun.watterson>

Petri <Petri_member@newsguy.com> writes:

> In article <7a63509i3dlp6l3tr3am18qchlvs0soooi@4ax.com>, zzapper says...
>> I also love
>
>> http://peter.verhas.com/progs/perl/prep/
>
> That program is a perfect example of what can happen if you don't
> use strict;.
>
> If the author had, he would have found his typos immediately:
>   if( $VerbodeMode ){

You don't need strictures for that; simply enabling warnings finds
that and two other problems

  Useless use of a variable in void context at ./prep.pl line 163.
  Name "main::atime" used only once: possible typo at ./prep.pl line 208.
  Name "main::VerbodeMode" used only once: possible typo at ./prep.pl line 161.


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

Date: Sat, 13 Mar 2004 16:27:05 GMT
From: merlyn@stonehenge.com (Randal L. Schwartz)
Subject: Re: Text editor implemented in Perl
Message-Id: <e0c63b7507d0d044465f62193967dfb2@news.teranews.com>

>>>>> "Jim" == Jim Gibson <jgibson@mail.arc.nasa.gov> writes:

Jim> I, too, dislike all of emacs ctrl key combinations. But for me the
Jim> fatal flaw of emacs is the jump scroll. You move your cursor
Jim> line-by-line down to the bottom of the screen and the display jumps up
Jim> half a screen's worth. I find that very disorienting. vi, on the other
Jim> hand, scroll's the display up a single line, enabling me to more easily
Jim> scan through a file.

Add to your .emacs:

  (setq scroll-step 1)

Really.  Everything in GNU Emacs is customizable.  It's only
fatal to the weak. :)

print "Just another Perl and GNU Emacs hacker,"

-- 
Randal L. Schwartz - Stonehenge Consulting Services, Inc. - +1 503 777 0095
<merlyn@stonehenge.com> <URL:http://www.stonehenge.com/merlyn/>
Perl/Unix/security consulting, Technical writing, Comedy, etc. etc.
See PerlTraining.Stonehenge.com for onsite and open-enrollment Perl training!


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

Date: Sat, 13 Mar 2004 18:58:24 +0000
From: James Taylor <spam-block-@-SEE-MY-SIG.com>
Subject: Re: Text editor implemented in Perl
Message-Id: <ant131824313fNdQ@nospam.demon.co.uk>

In article <3262543.eed3zGlcXm@GMT-hosting-and-pickle-farming>,
Gregory Toomey <nospam@bigpond.com> wrote:
> 
> Vi & emacs already support regular expressions in searches,
> and have done for 20 years.

Sure, but I'm after Perl regexes (maybe containing Perl code
assertions) and the ability to use Perl code in the
replacement string possibly also with side effects stored in
a set of user variables, or even on-the-fly defining and
calling of functions in a user namespace. I don't believe
vim and emacs are up to that, whereas Perl certainly is. In
fact, I already have a simple Perl shell I wrote for testing
code fragments which maintains a User:: namespace separate
from the shell code itself, and there are functions for
reading and writing files, and displaying chunks of data,
so "all" it needs is a visual text editor front end. ;-)

-- 
James Taylor, Cheltenham, Gloucestershire, UK.       PGP key: 3FBE1BF9
To protect against spam, the address in the "From:" header is not valid.
In any case, you should reply to the group so that everyone can benefit.
If you must send me a private email, use james at oakseed demon co uk.



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

Date: Sat, 13 Mar 2004 18:47:20 +0000
From: James Taylor <spam-block-@-SEE-MY-SIG.com>
Subject: Re: Text editor implemented in Perl
Message-Id: <ant131820f7ffNdQ@nospam.demon.co.uk>

In article <c2qc77$n69$1@nets3.rz.RWTH-Aachen.DE>,
Tassilo v. Parseval <tassilo.parseval@rwth-aachen.de> wrote:
> 
> You can use vim with a Perl interpreter compiled in. This
> allows both writing vim scripts in Perl as well as using
> Perl commands to edit the buffer.

Sounds useful. Where might I be able to download a Linux
binary to play with?

-- 
James Taylor, Cheltenham, Gloucestershire, UK.       PGP key: 3FBE1BF9
To protect against spam, the address in the "From:" header is not valid.
In any case, you should reply to the group so that everyone can benefit.
If you must send me a private email, use james at oakseed demon co uk.



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

Date: Sat, 13 Mar 2004 18:45:58 +0000
From: James Taylor <spam-block-@-SEE-MY-SIG.com>
Subject: Re: Text editor implemented in Perl
Message-Id: <ant131858bc8fNdQ@nospam.demon.co.uk>

In article <c2qe0q$65f$1@wisteria.csv.warwick.ac.uk>,
Ben Morrow <usenet@morrow.me.uk> wrote:
> 
> James Taylor wrote:
> > 
> > I just wondered whether anyone has thought to write a programmers'
> > text/data editor in Perl and allow the full power of Perl's
> > s///eg operator for manipulating the file being edited.
> 
> Yes.

Excellent. :-)

> Then I learned to use vim... the project's been on hold ever since :).

Shame. :-(

Did you get far enough for the project to be worth continuing,
or would it be better for someone else to start from scratch?

My concern would be cross-platform portability. I'd like an
editor written in pure Perl so that I can run it on my Psion
and my RISC OS machine as well as on Linux and Windows. I
guess there would need to be a well defined set of platform
specific functions that can be overridden accordingly.

The editor's core functionality doesn't need to be particularly
fancy and I would be happy with an MS Notepad equivalent as
long as I can use Perl to enhance its functionality as required.
I suppose the only additional features I would look for would
be infinite undo, 2D block selection, and the ability to apply
any Perl command to that selection. If it were also possible
to attach preset Perl commands to the ctrl-keystrokes of my
choice, I could add to its functionality as I used it, and
thus potentially surpass things like vim and emacs without
really noticing the accumulated volume of work involved.

-- 
James Taylor, Cheltenham, Gloucestershire, UK.       PGP key: 3FBE1BF9
To protect against spam, the address in the "From:" header is not valid.
In any case, you should reply to the group so that everyone can benefit.
If you must send me a private email, use james at oakseed demon co uk.



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

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:

#The Perl-Users Digest is a retransmission of the USENET newsgroup
#comp.lang.perl.misc.  For subscription or unsubscription requests, send
#the single line:
#
#	subscribe perl-users
#or:
#	unsubscribe perl-users
#
#to almanac@ruby.oce.orst.edu.  

NOTE: due to the current flood of worm email banging on ruby, the smtp
server on ruby has been shut off until further notice. 

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

#To request back copies (available for a week or so), send your request
#to almanac@ruby.oce.orst.edu with the command "send perl-users x.y",
#where x is the volume number and y is the issue number.

#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 V10 Issue 6254
***************************************


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