[12187] in Perl-Users-Digest
Perl-Users Digest, Issue: 5787 Volume: 8
daemon@ATHENA.MIT.EDU (Perl-Users Digest)
Wed May 26 11:03:57 1999
Date: Wed, 26 May 99 08:00:26 -0700
From: Perl-Users Digest <Perl-Users-Request@ruby.OCE.ORST.EDU>
To: Perl-Users@ruby.OCE.ORST.EDU (Perl-Users Digest)
Perl-Users Digest Wed, 26 May 1999 Volume: 8 Number: 5787
Today's topics:
Re: ...SOLVED, but questions (LONG) (Daniel Parish)
Re: ...SOLVED, but questions (LONG) <tchrist@mox.perl.com>
Re: [perlfunc][perldata] access to data structures <uri@sysarch.com>
Re: A basic question about passing parameters on the co <devans@radius-retail.kom>
Re: A basic question about passing parameters on the co <devans@radius-retail.kom>
Access and Perl <rhrh@hotmail.com>
ANNOUNCE: Bit::Vector 5.7 <sb@sdm.de>
ANNOUNCE: Crypt::Random (Vipul Ved Prakash)
ANNOUNCE: DBD::Sybase 0.15 <mpeppler@peppler.org>
ANNOUNCE: libxml-perl-0.02 <ken@bitsko.slc.ut.us>
ANNOUNCE: Math::MatrixBool 5.7 <sb@sdm.de>
ANNOUNCE: Net::PcapUtils 0.01 <Tim.Potter@anu.edu.au>
Re: ANNOUNCE: perl5.005_57 released! <jdf@pobox.com>
ANNOUNCE: Persistence::Object::Simple (Vipul Ved Prakash)
ANNOUNCE: Proc::Processtable 0.14 (Daniel J Urist)
ANNOUNCE: WWW::Babelfish 0.03 (Daniel J Urist)
ANNOUNCEMENT: NEW MODULE: HTML::Tempate 0.01 sam@tregar.com
Re: Creating a SSL socket connection? <ldbader@us.ibm.com>
Re: how do i get the lenght of a string <devans@radius-retail.kom>
How to read from STDIN in the perl debugger in emacs? dnp@ams.org
Special: Digest Administrivia (Last modified: 12 Dec 98 (Perl-Users-Digest Admin)
----------------------------------------------------------------------
Date: 26 May 1999 07:33:27 -0700
From: danielp@best.com (Daniel Parish)
Subject: Re: ...SOLVED, but questions (LONG)
Message-Id: <7ih0nn$k7o$1@shell13.ba.best.com>
Don,
Thanks for the pointer, this document illustrates the pitfalls very
clearly and is exactly what I was looking for! Also I can see your
point about program logic being easier to follow, but i think I will
need a little more experience before it really sinks in.
Daniel
<danielp@best.com>
In article <7igr46$mhu$1@nnrp1.deja.com>,
Don Roby <droby@copyright.com> wrote:
>In article <7ieqgu$1ni$1@shell13.ba.best.com>,
> danielp@best.com (Daniel Parish) wrote:
>
><snip>
>
>>
>> Question: What are the potential pitfalls of using symbolic references
>> to hashes?
>>
>
>For a really convincing argument to avoid symbolic references,
>see the article http://www.plover.com/~mjd/perl/varvarname.html by
>Mark-Jason Dominus.
>
>> In my opinion the original script is easier to read and does
>> what it is supposed to in a logical manner, while the 'corrected'
>> script
>> seems to add an unneccessary level of convolution just for the sake of
>> formalism. Am I missing something obvious here?
>>
>
>Actually, it's not adding any convolution. Soft references are just
>hash lookups in the symbol table. And it's not for formalism, it's for
>safety. And (IMHO), constructing and using your own hash instead of
>using soft references makes the logic of a program much easier to
>follow, rather than complicating it. Those double dollars are easy to
>miss in a quick visual scan of a program.
>
>--
>Don Roby
>
------------------------------
Date: 26 May 1999 08:37:15 -0700
From: Tom Christiansen <tchrist@mox.perl.com>
Subject: Re: ...SOLVED, but questions (LONG)
Message-Id: <374c071b@cs.colorado.edu>
[courtesy cc of this posting mailed to cited author]
In comp.lang.perl.misc,
danielp@best.com (Daniel Parish) writes:
:Thanks for the pointer, this document illustrates the pitfalls very
:clearly and is exactly what I was looking for! Also I can see your
:point about program logic being easier to follow, but i think I will
:need a little more experience before it really sinks in.
Did you miss the FAQ entry?
=head2 How can I use a variable as a variable name?
Beginners often think they want to have a variable contain the name
of a variable.
$fred = 23;
$varname = "fred";
++$$varname; # $fred now 24
This works I<sometimes>, but it is a very bad idea for two reasons.
The first reason is that they I<only work on global variables>.
That means above that if $fred is a lexical variable created with my(),
that the code won't work at all: you'll accidentally access the global
and skip right over the private lexical altogether. Global variables
are bad because they can easily collide accidentally and in general make
for non-scalable and confusing code.
Symbolic references are forbidden under the C<use strict> pragma.
They are not true references and consequently are not reference counted
or garbage collected.
The other reason why using a variable to hold the name of another
variable a bad idea is that the question often stems from a lack of
understanding of Perl data structures, particularly hashes. By using
symbolic references, you are just using the package's symbol-table hash
(like C<%main::>) instead of a user-defined hash. The solution is to
use your own hash or a real reference instead.
$fred = 23;
$varname = "fred";
$USER_VARS{$varname}++; # not $$varname++
There we're using the %USER_VARS hash instead of symbolic references.
Sometimes this comes up in reading strings from the user with variable
references and wanting to expand them to the values of your perl
program's variables. This is also a bad idea because it conflates the
program-addressable namespace and the user-addressable one. Instead of
reading a string and expanding it to the actual contents of your program's
own variables:
$str = 'this has a $fred and $barney in it';
$str =~ s/(\$\w+)/$1/eeg; # need double eval
Instead, it would be better to keep a hash around like %USER_VARS and have
variable references actually refer to entries in that hash:
$str =~ s/\$(\w+)/$USER_VARS{$1}/g; # no /e here at all
That's faster, cleaner, and safer than the previous approach. Of course,
you don't need to use a dollar sign. You could use your own scheme to
make it less confusing, like bracketed percent symbols, etc.
$str = 'this has a %fred% and %barney% in it';
$str =~ s/%(\w+)%/$USER_VARS{$1}/g; # no /e here at all
Another reason that folks sometimes think they want a variable to contain
the name of a variable is because they don't know how to build proper
data structures using hashes. For example, let's say they wanted two
hashes in their program: %fred and %barney, and to use another scalar
variable to refer to those by name.
$name = "fred";
$$name{WIFE} = "wilma"; # set %fred
$name = "barney";
$$name{WIFE} = "betty"; # set %barney
This is still a symbolic reference, and is still saddled with the
problems enumerated above. It would be far better to write:
$folks{"fred"}{WIFE} = "wilma";
$folks{"barney"}{WIFE} = "betty";
And just use a multilevel hash to start with.
The only times that you absolutely I<must> use symbolic references are
when you really must refer to the symbol table. This may be because it's
something that can't take a real reference to, such as a format name.
Doing so may also be important for method calls, since these always go
through the symbol table for resolution.
In those cases, you would turn off C<strict 'refs'> temporarily so you
can play around with the symbol table. For example:
@colors = qw(red blue green yellow orange purple violet);
for my $name (@colors) {
no strict 'refs'; # renege for the block
*$name = sub { "<FONT COLOR='$name'>@_</FONT>" };
}
All those functions (red(), blue(), green(), etc.) appear to be separate,
but the real code in the closure actually was compiled only once.
So, sometimes you might want to use symbolic references to directly
manipulate the symbol table. This doesn't matter for formats, handles, and
subroutines, because they are always global -- you can't use my() on them.
But for scalars, arrays, and hashes -- and usually for subroutines --
you probably want to use hard references only.
--
"If you can spend a perfectly useless afternoon in a perfectly useless manner,
you have learned how to live."
- Lin Yutang
------------------------------
Date: 26 May 1999 10:48:58 -0400
From: Uri Guttman <uri@sysarch.com>
Subject: Re: [perlfunc][perldata] access to data structures
Message-Id: <x7r9o3evj9.fsf@home.sysarch.com>
>>>>> "LR" == Larry Rosler <lr@hpl.hp.com> writes:
LR> In article <x7wvxwe111.fsf@home.sysarch.com> on 26 May 1999 03:35:38 -
LR> 0400, Uri Guttman <uri@sysarch.com> says...
>> >>>>> "DC" == Dave Cross <dave@dave.org.uk> writes:
DC> On Tue, 25 May 1999 22:48:20 PDT, teqqus@asdf.engr.sgi.com wrote:
>> >> so i have something like
>> >> $a = "a b c d e f";
>> >> and i want to access the start and end elements
>>
DC> my ($start, $end) = (split(/ /, $a))[0, -1];
>>
>> or why not use a different op:
>>
>> my ($start, $end) = ( substr($a, 0, 2), substr($a, -1) )
LR> ^
LR> my ($start, $end) = ( substr($a, 0, 1), substr($a, -1) )
it seems i must have felt like including a space. :-)
uri
--
Uri Guttman ----------------- SYStems ARCHitecture and Software Engineering
uri@sysarch.com --------------------------- Perl, Internet, UNIX Consulting
Have Perl, Will Travel ----------------------------- http://www.sysarch.com
The Best Search Engine on the Net ------------- http://www.northernlight.com
------------------------------
Date: Thu, 20 May 1999 16:13:50 +0100
From: "Dave Evans" <devans@radius-retail.kom>
Subject: Re: A basic question about passing parameters on the command line.
Message-Id: <7i1btf$5stq4@news.gomontana.com>
[mailed+posted]
This depends on your shell, i.e. whether you're using a DOS prompt on a
Win32 platform, ksh / sh / csh / bash on a UNIX-type system, DCL on VMS etc.
It is your shell that controls what happens to your quotes etc. on the
command line, not perl. To achieve the effect you want, try something like:
perl myscript.pl R E "\"This is a comment\"" Y "\"This is another comment\""
(that's for Win32 or ksh on UNIX)
perl myscript.pl R E '"This is a comment"' Y '"This is another comment"'
(ksh again, and probably many others for all I know).
(line above: that's R, E, single quote, double quote, This is a comment,
double quote, single quote, etc.
G. Scott Guillot wrote in message <7i169t$5qm$1@ffx2nh3.news.uu.net>...
>'lo everyone. Basic question about passing parameters to a perl script via
>the command line. Take the following example:
>
>perl myscript.pl R E "This is a comment" Y "This is another comment"
>
>There are five parameters being passed there; the letter R, the letter E, a
>string "This is a comment", the letter Y, and then finally another string
>"This is another comment".
>
>My question is how to get those strings passed into my perl script as
>strings and not individual words. Right now $ARGV[0] = R, $ARGV[1] = E,
>$ARGV[2] = This (Note the missing "), $ARGV[3] = is, etc.... and what I
want
>is
>
>$ARGV[0] = R
>$ARGV[1] = E
>$ARGV[2] = "This is a comment"
>$ARGV[3] = Y
>$ARGV[4] = "This is another comment"
>
>Thanks in advance for everyone's time and help !!
>
> -Scott.
>
>
>
------------------------------
Date: Thu, 20 May 1999 16:13:39 +0100
From: "Dave Evans" <devans@radius-retail.kom>
Subject: Re: A basic question about passing parameters on the command line.
Message-Id: <7i1bt6$650q2@news.gomontana.com>
[mailed+posted]
This depends on your shell, i.e. whether you're using a DOS prompt on a
Win32 platform, ksh / sh / csh / bash on a UNIX-type system, DCL on VMS etc.
It is your shell that controls what happens to your quotes etc. on the
command line, not perl. To achieve the effect you want, try something like:
perl myscript.pl R E "\"This is a comment\"" Y "\"This is another comment\""
(that's for Win32 or ksh on UNIX)
perl myscript.pl R E '"This is a comment"' Y '"This is another comment"'
(ksh again, and probably many others for all I know).
(line above: that's R, E, single quote, double quote, This is a comment,
double quote, single quote, etc.
G. Scott Guillot wrote in message <7i169t$5qm$1@ffx2nh3.news.uu.net>...
>'lo everyone. Basic question about passing parameters to a perl script via
>the command line. Take the following example:
>
>perl myscript.pl R E "This is a comment" Y "This is another comment"
>
>There are five parameters being passed there; the letter R, the letter E, a
>string "This is a comment", the letter Y, and then finally another string
>"This is another comment".
>
>My question is how to get those strings passed into my perl script as
>strings and not individual words. Right now $ARGV[0] = R, $ARGV[1] = E,
>$ARGV[2] = This (Note the missing "), $ARGV[3] = is, etc.... and what I
want
>is
>
>$ARGV[0] = R
>$ARGV[1] = E
>$ARGV[2] = "This is a comment"
>$ARGV[3] = Y
>$ARGV[4] = "This is another comment"
>
>Thanks in advance for everyone's time and help !!
>
> -Scott.
>
>
>
------------------------------
Date: Wed, 26 May 1999 15:13:09 +0100
From: Richard H <rhrh@hotmail.com>
Subject: Access and Perl
Message-Id: <374C0175.454B8B48@hotmail.com>
Hi,
People frequently post about using Access as a web DB through Perl and
there's often people who tell them this isnt a good idea.
Ive looked through recent back listings and cant find this post so
Could I be redirected off this group to wherever theyve been redirected
in the past to find out WHY access is baad.
Im looking in comp.databases and comp.db.ms-access
Believe me I dont <want> to use access.
Richard H.
------------------------------
Date: 26 May 1999 14:36:32 GMT
From: Steffen Beyer <sb@sdm.de>
Subject: ANNOUNCE: Bit::Vector 5.7
Message-Id: <7ih0tg$bcv$1@play.inetarena.com>
I am glad to announce version 5.7 of my module "Bit::Vector":
=====================================
Package "Bit::Vector" Version 5.7
=====================================
This package is available for download either from my web site at
http://www.engelschall.com/u/sb/download/
or from any CPAN (= "Comprehensive Perl Archive Network") mirror server:
http://www.perl.com/CPAN/authors/id/STBEY/
Prerequisites:
--------------
Perl version 5.000 or higher, and an ANSI C compiler (!).
^^^^^^^^^^^^^^^^^^
What's new in version 5.7:
--------------------------
+ Improved method "Div_Pos()": It now uses only one instead of the
former two (very costly) "shift" operations in its main loop, and
it now depends on the (variable) length of the numbers involved rather
than the (constant) length of their respective bit vectors, making
this method tremendously faster now. The methods "to_Dec()", "Divide()"
and "GCD()" also profit from this change in the same way since they
rely crucially on the "Div_Pos()" method, internally.
+ Added a matrix multiplication method (for "Math::MatrixBool") named
"Product()" which determines paths in matrices representing graphs.
+ Fixed the problems with anchored error messages in the regression
test suite under MacPerl.
Abstract:
---------
Bit::Vector is a stand-alone C library and a sophisticated
Perl module at the same time. It allows you to handle bit
vectors, sets (of integers), "big integers" and boolean
matrices of arbitrary size very efficiently. Over a 100
methods for bit manipulation, shift operations, "big
integer" arithmetic and matrix operations are available.
Moreover, overloaded operators provided by the Perl module
allow you to use this data type in expressions (almost)
like any other ordinary Perl scalar.
Legal issues:
-------------
This package with all its parts is
Copyright (c) 1995, 1996, 1997, 1998, 1999 by Steffen Beyer.
All rights reserved.
This package is free software; you can redistribute it and/or
modify it under the same terms as Perl itself, i.e., under the
terms of the "Artistic License" or the "GNU General Public License".
The C library at the core of this Perl module can additionally
be redistributed and/or modified under the terms of the
"GNU Library General Public License".
Please refer to the files "Artistic.txt", "GNU_GPL.txt" and
"GNU_LGPL.txt" in this distribution for details!
Author's note:
--------------
I would be very pleased over *ANY* kind of feedback, questions,
suggestions, donations ;-) and so on, since unfortunately none of
you lazy bums ;-) (for exceptions to this see the "CREDITS.txt"
file in this distribution!) hardly ever writes me.
This feedback is essential for me in order to know wether this
module is useful, to estimate how many people use it and for
what (essential to assess the potential impact an incompatible
change may have, for instance), where its problems and weak-
nesses lie, what should be improved, what additional features
would be useful, etc.
Even e-mail with an empty body and just a subject line such as
"I'm using Bit::Vector" would help!
Thank you very much in advance!
In any case, I hope you will find this module beneficial,
share and enjoy!
Yours sincerely,
--
Steffen Beyer <sb@engelschall.com>
http://www.engelschall.com/u/sb/whoami/
http://www.engelschall.com/u/sb/download/
http://www.perl.com/CPAN/authors/id/STBEY/
http://www.oreilly.de/catalog/perlmodger/bnp/
------------------------------
Date: 26 May 1999 14:34:43 GMT
From: vipul@shell2.ba.best.com (Vipul Ved Prakash)
Subject: ANNOUNCE: Crypt::Random
Message-Id: <7ih0q3$bcg$1@play.inetarena.com>
Crypt::Random is an interface module to the /dev/random device found on most
modern Unix systems. The /dev/random driver gathers environmental noise from
various non- deterministic sources including, but not limited to,
inter-keyboard timings and inter-interrupt timings that occur within the
operating system environment. The noise data is sampled and combined with a
CRC-like mixing function into a continuously updating "entropy-pool". Random
bit strings are obtained by taking a MD5 hash of the contents of this pool.
Methods:
makerandom() - generates a random number of specified bitsize.
makerandom_itv() - generates a random number in the specified interval.
Crypt::Random is available from CPAN.
best,
vipul.
--
"Everything is what it is because it got that way."
-- D'arcy Thompson.
VIPUL VED PRAKASH | Cryptography.
mail-@-vipul.net | Distributed Systems.
http://vipul.net/ | Network Agents.
91 11 2233328 | Perl Hacking.
198 Madhuban IP Extension | Linux.
Delhi, INDIA 110 092 | Networked Media.
------------------------------
Date: 26 May 1999 14:34:13 GMT
From: Michael Peppler <mpeppler@peppler.org>
Subject: ANNOUNCE: DBD::Sybase 0.15
Message-Id: <7ih0p5$bce$1@play.inetarena.com>
The uploaded file
DBD-Sybase-0.15.tar.gz
has entered CPAN as
file: $CPAN/authors/id/MEWP/DBD-Sybase-0.15.tar.gz
size: 46239 bytes
md5: aafbef50be96afe3daae375856ab9c4d
DBD::Sybase 0.15 is a semi-experimental release, so use with care.
I've changed the AutoCommit = 0 mode to set the CHAINED mode to on,
instead of explicitly generating a new transaction. This appears to work
fine, and reduces the traffic somewhat. This will however NOT work
with pre-System 10 servers, and will probably not work against
Microsoft servers.
I've added a new Sybase specific database handle attribute called
syb_err_handler. This takes a CODEREF, and lets you specify a callback
that gets called when Sybase notifies the client of an error (or warning)
condition. This allows the program to ignore certain classes of
errors, or two handle certain error messages in a specific way.
This is the way error handling is normally done when using
Sybase OpenClient, and it's quite useful as Sybase sends various
infomational messages to the error handler, such as backup server messages,
showplan and statistics messges, and DBCC messages, among others.
I've finally made LongReadLen and LongTruncOK work the way they're
supposed to (at least the way I think they're supposed to!)
I've modified Makefile.PL to try to figure out what libraries it needs
based on the value of the SYBASE environment variable. This works fine
on Solaris and linux, but I have not tried this on other systems, so please
take a look and let me know what needs to be modified for your OS.
You can still get the old behaviour (ie edit CONFIG to tell Makefile.PL
what to do) by running
perl Makefile.PL --file
I've tried to make this a solid release, but as usual you should test
your code thoroughly before moving this release into production.
>From the CHANGES file:
Release 0.15
Added an error handler callback which can intercept error messages
and provide ad-hoc handling of error situations.
In AutoCommit == 0 mode, use CS_OPT_CHAINXACTS mode on the
server instead of issuing explicit transactions.
$dbh->LongReadLen and LongTruncOK now work.
First cut at the type_info() and type_info_all() methods.
perl Makefile.PL now attempts to discover the libraries directly
based on what it finds in $SYBASE/lib.
Michael
--
Michael Peppler -||- Data Migrations Inc.
mpeppler@peppler.org -||- http://www.mbay.net/~mpeppler
Int. Sybase User Group -||- http://www.isug.com
Sybase on Linux mailing list: ase-linux-list@isug.com
------------------------------
Date: 26 May 1999 14:33:26 GMT
From: Ken MacLeod <ken@bitsko.slc.ut.us>
Subject: ANNOUNCE: libxml-perl-0.02
Message-Id: <7ih0nm$b9f$1@play.inetarena.com>
libxml-perl-0.02 is now available on CPAN. libxml-perl is a
collection of smaller Perl modules, scripts, and documents for working
with XML. libxml-perl software works in combination with XML::Parser,
PerlSAX, XML::DOM, XML::Grove and others.
<http://www.perl.org/CPAN/modules/by-module/XML/>
HTML-rendered PODs can be found on the home page,
<http://bitsko.slc.ut.us/libxml-perl/>
Changes since libxml-0.01beta:
- non-code changes
- new home page
- reverted to a single line of releases, no seperate stable and
development lines
- renamed package from `libxml' to `libxml-perl'
- added doc/modules.xml
- added doc/UsingPerlSAX.pod and example files
- moved PerlSAX.pod and interface-style.pod to `doc/'
- renamed Data::Grove::Tied to Data::Grove::Parent
libxml-perl contains the following:
Modules
XML::Parser::PerlSAX
XML::Handler::Sample
XML::ESISParser
Data::Grove
Data::Grove::Parent
Data::Grove::Visitor
XML::SAX2Perl
XML::Perl2SAX
Documents
PerlSAX
Using PerlSAX
List of Perl XML modules by category, in XML
--
Ken MacLeod
ken@bitsko.slc.ut.us
------------------------------
Date: 26 May 1999 14:36:43 GMT
From: Steffen Beyer <sb@sdm.de>
Subject: ANNOUNCE: Math::MatrixBool 5.7
Message-Id: <7ih0tr$bd0$1@play.inetarena.com>
I am glad to also announce
=========================================
Module "Math::MatrixBool" Version 5.7
=========================================
for Perl version 5.000 and higher
Copyright (c) 1995, 1996, 1997, 1998, 1999 by Steffen Beyer.
All rights reserved.
This package is free software; you can redistribute it and/or modify
it under the same terms as Perl itself.
Prerequisites:
--------------
Perl version 5.000 or higher, module "Bit::Vector" version 5.7 or higher.
What's new in version 5.7:
--------------------------
+ In version 5.7, the method "Product()" has been added. This is the same
as the method "Multiplication()", except that it uses the binary or ("|")
operation instead of the binary "xor" ("^") operation as the boolean
addition operator ("+").
+ Added tests to the test suite for this new method.
What does it do:
----------------
This module allows you to perform all sorts of operations on boolean
matrices (the elements of a Boolean Algebra); obvious ones like addition
and multiplication (among others), and less obvious ones like Kleene's
algorithm. Such matrices and operations are used a lot in many graph
algorithms.
Author's note:
--------------
I hope you will find this module beneficial!
Share and enjoy!
Yours,
--
Steffen Beyer <sb@sdm.de> http://www.engelschall.com/u/sb/
"There is enough for the need of everyone in this world,
but not for the greed of everyone." - Mahatma Gandhi
------------------------------
Date: 26 May 1999 14:34:33 GMT
From: Tim Potter <Tim.Potter@anu.edu.au>
Subject: ANNOUNCE: Net::PcapUtils 0.01
Message-Id: <7ih0pp$bcf$1@play.inetarena.com>
Announcing Net::PcapUtils 0.01 - a utility module for writing packet
capture scripts. From the README file:
Net::PcapUtils provides some code to abstract away some of the messier
parts of using the Net::Pcap library. The idea is to be able to
write "one-liner" type scripts for packet capture without getting
bogged down in the initialisation code. This makes it possible to
write very compact Perl scripts involving packet capture.
To use Net::PcapUtils, the latest version of the Net::Pcap module is
required (at the time of writing, this was version 0.03).
Tim.
--
Tim Potter, System Admin/Programmer, Head Bee Guy
Advanced Computational Systems CRC, RSISE Bldg Australian National University,
Canberra 0200, AUSTRALIA Ph: +61 2 62798813 Fax: +61 2 62798602
------------------------------
Date: 26 May 1999 10:26:20 -0400
From: Jonathan Feinberg <jdf@pobox.com>
To: tchrist@mox.perl.com (Tom Christiansen)
Subject: Re: ANNOUNCE: perl5.005_57 released!
Message-Id: <m3vhdfuctv.fsf@joshua.panix.com>
Tom Christiansen <tchrist@mox.perl.com> writes:
> Lexically scoped warning categories
/me emits a stifled "hmmm."
> Binary numbers supported
/me is impressed, for meaningless hackish reasons.
> Improved `qw//' operator
/me jumps up and down, yelling "Callo callay!"
> * GNU/Hurd is now supported.
I'm sure that both users will be grateful.
> * Rhapsody is now supported.
Ditto.
> perlopentut.pod
> perlreftut.pod
> perltootc.pod
Bravo.
--
Jonathan Feinberg jdf@pobox.com Sunny Brooklyn, NY
http://pobox.com/~jdf
------------------------------
Date: 26 May 1999 14:34:53 GMT
From: vipul@shell2.ba.best.com (Vipul Ved Prakash)
Subject: ANNOUNCE: Persistence::Object::Simple
Message-Id: <7ih0qd$bch$1@play.inetarena.com>
P::O::S provides simple persistence functionality to its objects. Object
definitions are stored as stringified perl data structures, generated with
Data::Dumper, that are amenable to manual editing and external processing
from outside the class interface.
Persistence is achieved with a blessed hash container that holds the object
data. The container can store objects that employ non-hash structures as
well.
Methods:
new() load() commit() uniqfile() expire() move() lock() unlock()
The module is available from CPAN.
best,
vipul
--
"Everything is what it is because it got that way."
-- D'arcy Thompson.
VIPUL VED PRAKASH | Cryptography.
mail-@-vipul.net | Distributed Systems.
http://vipul.net/ | Network Agents.
91 11 2233328 | Perl Hacking.
198 Madhuban IP Extension | Linux.
Delhi, INDIA 110 092 | Networked Media.
------------------------------
Date: 26 May 1999 14:32:55 GMT
From: durist@world.std.com (Daniel J Urist)
Subject: ANNOUNCE: Proc::Processtable 0.14
Message-Id: <7ih0mn$b97$1@play.inetarena.com>
The last version, 0.13, was incorrectly posted as version 0.07 and did
not contain the IRIX support as promised. It was late and I was tired.
I have uploaded a fixed version.
Proc::ProcessTable is a perl module to provide a consistent
object-oriented interface to the process table on different
Unices. Thanks to the efforts of W. Phillip Moore, IRIX is now
supported, in addition to Linux, Solaris, AIX, HPUX and FREEBSD.
--
Dan Urist
durist@world.std.com
http://www.world.std.com/~durist
------------------------------
Date: 26 May 1999 14:33:06 GMT
From: durist@world.std.com (Daniel J Urist)
Subject: ANNOUNCE: WWW::Babelfish 0.03
Message-Id: <7ih0n2$b9e$1@play.inetarena.com>
I've just uploaded a new version of WWW::Babelfish. This one actually
mostly works.
WWW::Babelfish is a simple perl interface to the Babelfish translation
engine.
>From the documentation:
SYNOPSIS
use WWW::Babelfish;
$obj = new WWW::Babelfish( 'agent' => 'Mozilla/8.0' );
die( "Babelfish server unavailable\n" ) unless defined($obj);
$french_text = $obj->translate( 'source' => 'English',
'destination' => 'French',
'text' => 'My hovercraft is
full of eels');
die("Could not translate: " . $obj->error) unless
defined($french_text);
@languages = $obj->languages;
--
Dan Urist
durist@world.std.com
http://www.world.std.com/~durist
------------------------------
Date: 26 May 1999 14:36:08 GMT
From: sam@tregar.com
Subject: ANNOUNCEMENT: NEW MODULE: HTML::Tempate 0.01
Message-Id: <7ih0so$bcu$1@play.inetarena.com>
ANNOUNCEMENT: NEW MODULE: HTML::Tempate 0.01
NAME
HTML::Template - a Perl module to use HTML Templates
DESCRIPTION
This module attempts to make using HTML templates simple and
natural. It extends standard HTML with a few new tags - <TMPL_VAR>
and <TMPL_LOOP>. The file written with HTML and these new tags is
called a template. It is usually saved separate from your script -
possibly even created by someone else! Using this module you fill
in the values for the variables and loops declared in the template.
This allows you to seperate design - the HTML - from the data,
which you generate in the Perl script.
This module is licenced under the GPL. See the LICENCE section
of the README.
AVAILABILITY
The module is available on CPAN. You can get it using CPAN.pm or
go to:
http://www.cpan.org/authors/id/S/SA/SAMTREGAR/HTML_Template-0.01.tar.gz
MOTIVATION
It is true that there are a number of packages out there to do HTML
templates. On the one hand you have things like HTML::Embperl
which allows you freely mix Perl with HTML. On the other hand lie
home-grown variable substitution solutions. Hopefully the module
can find a place between the two.
One advantage of this module over a full HTML::Embperl-esque
solution is that it enforces an important divide - design and
programming. By limiting the programmer to just using simple
variables and loops in the HTML, the template remains accessible to
designers and other non-perl people. The use of HTML-esque syntax
goes further to make the format understandable to others. In the
future this similarity could be used to extend existing HTML
editors/analyzers to support this syntax.
An advantage of this module over home-grown tag-replacement schemes
is the support for loops. In my work I am often called on to
produce tables of data in html. Producing them using simplistic
HTML templates results in CGIs containing lots of HTML since the
HTML itself could not represent loops. The introduction of loop
statements in the HTML simplifies this situation considerably. The
designer can layout a single row and the programmer can fill it in
as many times as necessary - all they must agree on is the
parameter names.
For all that, I think the best thing about this module is that it
does just one thing and it does it quickly and carefully. It
doesn't try to replace Perl and HTML, it just augments them to
interact a little better. And it's pretty fast.
DOCUMENTATION
The documentation is in Template.pm in the form of POD format
perldocs. Even the above text might be out of date, so be sure to
check the perldocs for the straight truth.
CONTACT INFO
This module was written by Sam Tregar (sam@tregar.com) for Vanguard
Media (http://www.vm.com).
--== Sent via Deja.com http://www.deja.com/ ==--
---Share what you know. Learn what you don't.---
------------------------------
Date: Wed, 26 May 1999 10:50:17 -0400
From: Lance D Bader <ldbader@us.ibm.com>
To: Andrew Smith <dawntec@home.com>
Subject: Re: Creating a SSL socket connection?
Message-Id: <374C0A29.A1357EAE@us.ibm.com>
Andrew Smith wrote:
> Does anyone know how to create an SSL socket connection?
> Are there any modules that allow certificates to be used in the
> creation of a client-side socket?
I'm a newbie who is just about to tackle this problem. I intend to use
the LWP module that comes with Perl 5.005 together with some extra
software.
Here is an example program:
use strict;
use LWP::UserAgent;
my $userAgent = LWP::UserAgent->new();
$userAgent->agent("$0/0.1 " . $userAgent->agent());
my $request = HTTP::Request->new('Get' => "https://m9089820/test.htm");
$request->header('Accept' => 'test/html');
my $response = $userAgent->request($request);
if ($response->is_success()) {
print STDOUT $response->content();
} else {
print STDOUT "Error: " . $response->status_line() . "\n";
}
In order for the Request class to reccognize the "https" protocol,
additional software must be installed. I have not run this program
successfully yet because I have not installed this additional software.
However I think I have located the software.
>From your favorite CPAN site, get this module:
Crypt-SSLeay-0.07.tar.gz
Then follow this link to get the SSLeay software:
http://www.psy.uq.oz.au/~ftp/Crypto/
In particular, the Crypt-SSLeay package requires this version of
SSLeay. (Newer SSLeay versions are not supported yet.)
SSLeay-0_6_6b_tar.gz
------------------------------
Date: Thu, 20 May 1999 15:38:48 +0100
From: "Dave Evans" <devans@radius-retail.kom>
Subject: Re: how do i get the lenght of a string
Message-Id: <7i19rp$60ip1@news.gomontana.com>
[mailed+posted]
Yes. Read:
perldoc perlfunc
I'll let you work out what the name of the function might be.
erik_lembke@my-dejanews.com wrote in message
<7i0f9o$g4q$1@nnrp1.deja.com>...
>Hi folks,
>
>Is the a simple method (build in function)
>to get the lenght of a string
>
>f.e.:
>$lenght = lot("Hallo");
>
>$lenght is now 5
>
>cheers Erik
>
>
>--== Sent via Deja.com http://www.deja.com/ ==--
>---Share what you know. Learn what you don't.---
------------------------------
Date: Wed, 26 May 1999 13:58:24 GMT
From: dnp@ams.org
Subject: How to read from STDIN in the perl debugger in emacs?
Message-Id: <7igulv$p8i$1@nnrp1.deja.com>
Can anyone tell me how do I can get the perl debugger
running from emacs 20.3.1 (perldb) to read from a file
that was directed to STDIN?
>From the shell I can succesfull run it like this
perl myscript.pl < input
In emacs I did M-x perldb <return>
Run perldb (like this): perl myscript.pl < input
Instead of reading from the file it takes the input from
the debugger window. The code looks like this.
while(<$IN>)
{
...
}
close($IN);
emacs version 20.3.1 running on a dec alpha.
perl version is 5.003
thanks,
Dan Pelton
dnp@ams.org
--== Sent via Deja.com http://www.deja.com/ ==--
---Share what you know. Learn what you don't.---
------------------------------
Date: 12 Dec 98 21:33:47 GMT (Last modified)
From: Perl-Request@ruby.oce.orst.edu (Perl-Users-Digest Admin)
Subject: Special: Digest Administrivia (Last modified: 12 Dec 98)
Message-Id: <null>
Administrivia:
Well, after 6 months, here's the answer to the quiz: what do we do about
comp.lang.perl.moderated. Answer: nothing.
]From: Russ Allbery <rra@stanford.edu>
]Date: 21 Sep 1998 19:53:43 -0700
]Subject: comp.lang.perl.moderated available via e-mail
]
]It is possible to subscribe to comp.lang.perl.moderated as a mailing list.
]To do so, send mail to majordomo@eyrie.org with "subscribe clpm" in the
]body. Majordomo will then send you instructions on how to confirm your
]subscription. This is provided as a general service for those people who
]cannot receive the newsgroup for whatever reason or who just prefer to
]receive messages via e-mail.
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.
To submit articles to comp.lang.perl.misc (and this Digest), send your
article to perl-users@ruby.oce.orst.edu.
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.
The Meta-FAQ, an article containing information about the FAQ, is
available by requesting "send perl-users meta-faq". The real FAQ, as it
appeared last in the newsgroup, can be retrieved with the request "send
perl-users FAQ". Due to their sizes, neither the Meta-FAQ nor the FAQ
are included in the digest.
The "mini-FAQ", which is an updated version of the Meta-FAQ, is
available by requesting "send perl-users mini-faq". It appears twice
weekly in the group, but is not distributed in the digest.
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 V8 Issue 5787
**************************************