[26161] in Perl-Users-Digest
Perl-Users Digest, Issue: 8351 Volume: 10
daemon@ATHENA.MIT.EDU (Perl-Users Digest)
Wed Aug 24 00:05:27 2005
Date: Tue, 23 Aug 2005 21:05:04 -0700 (PDT)
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, 23 Aug 2005 Volume: 10 Number: 8351
Today's topics:
ANNOUNCE: Iterator v0.02 and associated modules. <sdn.girths00869@zoemail.net>
Re: Net::SFTP from memory instead of file? <BLOCKSPAMFearlessFosdick@your-mailbox.com>
Re: Oraperl - terminates script on error. How to handle xhoster@gmail.com
Re: Use of uninitialized value in substitution (s///) <hlawson@triad.rr.com>
Digest Administrivia (Last modified: 6 Apr 01) (Perl-Users-Digest Admin)
----------------------------------------------------------------------
Date: Tue, 23 Aug 2005 17:45:28 -0500
From: "Eric J. Roode" <sdn.girths00869@zoemail.net>
Subject: ANNOUNCE: Iterator v0.02 and associated modules.
Message-Id: <Xns96BBBF22DEB7Dsdn.comcast@216.196.97.136>
-----BEGIN xxx SIGNED MESSAGE-----
Hash: SHA1
Version 0.02 of the following modules
Iterator
Iterator::Util
Iterator::IO
Iterator::DBI
Iterator::Misc
were released today and are available on CPAN.
Iterator is an object encapsulation of the iterator pattern
popularized by Mark Jason Dominus, in his lectures and recent book
Higher Order Perl.
An Iterator is a device for looping over data (generated, found, or
hardcoded) one value at a time, instead of pre-loading the data into
an array and processing it there. Iterators aren't perfect for every
task, but they can make some tasks significantly easier and more
efficient.
Iterator::Util contains many essential utility functions for creating
and operating on Iterators.
Iterator::IO contains iterator functions for walking through files
(streams) and directories.
Iterator::DBI contains iterator functions for looping over record
sets returned by the DBI module.
Iterator::Misc contains various miscellaneous Iterator functions,
that are perhaps not general enough to include in Iterator::Util.
I hope you enjoy these modules and find them useful.
- --
Eric
`$=`;$_=\%!;($_)=/(.)/;$==++$|;($.,$/,$,,$\,$",$;,$^,$#,$~,$*,$:,@%)=(
$!=~/(.)(.).(.)(.)(.)(.)..(.)(.)(.)..(.)......(.)/,$"),$=++;$.++;$.++;
$_++;$_++;($_,$\,$,)=($~.$"."$;$/$%[$?]$_$\$,$:$%[$?]",$"&$~,$#,);$,++
;$,++;$^|=$";`$_$\$,$/$:$;$~$*$%[$?]$.$~$*${#}$%[$?]$;$\$"$^$~$*.>&$=`
-----BEGIN xxx SIGNATURE-----
Version: GnuPG v1.2.5 (MingW32) - WinPT 0.7.96rc1
iD8DBQFDC6cxY96i4h5M0egRArxtAJ0d5fND2VyOXP9qQmGcNmBSrLbCmgCeJk9S
guJKlGeLJrD5zYxbiN/zl3k=
=hl4N
-----END PGP SIGNATURE-----
------------------------------
Date: Tue, 23 Aug 2005 18:43:12 -0700
From: Fearless Fosdick <BLOCKSPAMFearlessFosdick@your-mailbox.com>
Subject: Re: Net::SFTP from memory instead of file?
Message-Id: <BLOCKSPAMFearlessFosdick-F73AE7.18431123082005@comcast.dca.giganews.com>
In article <deetjk$9ei$3@mamenchi.zrz.TU-Berlin.DE>,
anno4000@lublin.zrz.tu-berlin.de (Anno Siegel) wrote:
> Fearless Fosdick <BLOCKSPAMFearlessFosdick@your-mailbox.com> wrote in
> comp.lang.perl.misc:
> > I have to sftp some data, but it's not allowed to live on the
> > filesystem. Short of implementing an sftp client, is there any other
> > solution I can use?
>
> From the documentation of Net::SFTP I gather that the method ->do_write
> accepts the data to be written from a string. Where's the problem?
Well, the documentation says that because the author of the module put
perldoc comments in front of internal methods. In fact do_write() does
not stand by itself and can't reasonably be called from outside the
module. I needed to subclass Net::SFTP and hack up the guts of the put()
routine to do what I wanted. I had been hoping to find a cleaner way.
------------------------------
Date: 24 Aug 2005 02:03:55 GMT
From: xhoster@gmail.com
Subject: Re: Oraperl - terminates script on error. How to handle??
Message-Id: <20050823220355.234$sY@newsreader.com>
"Edward" <egoduk@NOSPAM_hotmail.com> wrote:
> In the below code, I'm trying to run an SQL insert statement. I've
> deliberately arranged for the insert to fail by attempting to update a
> number field with '1A046011' (spot the letter A). When I run the script,
> it
> terminates when it reaches this error and returns me to the shell.
> How can I handle this error? I need to use ora_rollback() to undo an
> earlier
> truncate of the table being updated!
In Oracle, you can *NOT* rollback truncates!
> Error message:
>
> DBD::Oracle::st execute failed: ORA-01722: invalid number (DBD ERROR:
> OCIStmtExecute) [for statement ``insert into
> mask_day_bucket(sku,cfc,day,profile_id)values('1A046011','1','monday',
> '1') ''
> with params: ]) at
> /usr/local/perl-5.8.0/lib/site_perl/5.8.0/sun4-solaris-thread-multi/Orape
> r l.pm
> line 132, <IN> line 3.
I don't know what "oraperl" is, but it seems to use DBI. I'd try either
turning off DBI's RaiseError, or putting your function call in an eval
block and check $@ for errors.
Xho
--
-------------------- http://NewsReader.Com/ --------------------
Usenet Newsgroup Service $9.95/Month 30GB
------------------------------
Date: Tue, 23 Aug 2005 23:17:14 GMT
From: Hugh Lawson <hlawson@triad.rr.com>
Subject: Re: Use of uninitialized value in substitution (s///)
Message-Id: <87zmr8mefb.fsf@desktop.xx.yy>
Tad McClellan <tadmc@augustmail.com> writes:
> Hugh Lawson <hlawson@triad.rr.com> wrote:
[ snip ]
> > What is uninitialized in the substitution?
>
>
> $_
>
>
> > ######Error comes on next line******************
> > $db->filter_fetch_key ( sub { s/\0$// } ) ;
Change Error to warning.
> Where is the string that you are substituting against?
>
> What value have you put in that string?
The data contents of the gdbm data file "frenchwords".
The data consists of strings, the C-style strings with null
terminations. Below is a snip from the program.
$db_file="frenchwords";
$db = tie %fred, 'GDBM_File', $db_file, &GDBM_WRCREAT, 0640;
Since I typed the values of the data in the data files, I'm reasonably
confident, though not absolutely certain, there are no missing data
values. The program is meant to make sure that saved data strings
have null terminations to make them copacetic for C.
I can test for the null-terminations by opening the same gdbm data
file with a C program, which gets mixed up about the string
contents when there are no null-terminations.
Thanks for the reply.
--
Hugh Lawson
hlawson@triad.rr.com
------------------------------
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 8351
***************************************