[25287] in Perl-Users-Digest
Perl-Users Digest, Issue: 7532 Volume: 10
daemon@ATHENA.MIT.EDU (Perl-Users Digest)
Sat Dec 18 03:05:53 2004
Date: Sat, 18 Dec 2004 00:05:07 -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, 18 Dec 2004 Volume: 10 Number: 7532
Today's topics:
Re: $ftp->rget() does not work for MS Windows FTP Serve <wyzelli@yahoo.com>
Re: $ftp->rget() does not work for MS Windows FTP Serve <notvalid@cox.net.invalid>
Re: (quickie) (Aliasing) Possible to get this to work i <nospam-abuse@ilyaz.org>
[OT] Re: HTML Parser <1usa@llenroc.ude.invalid>
Re: [Q] $ARGV, <>, and command-line Perl <nobull@mail.com>
Re: Consecutive Numbers <perl@my-header.org>
Emacs modules for Perl programming (Jari Aalto+mail.perl)
Re: FAQ 4.36: How can I expand variables in text string <nobull@mail.com>
Re: go to a link, save the page and email it out? <perl@my-header.org>
inserting a line into the body of an eMail before forwa <dlr93612@yahoo.com>
Re: Need to spawn an FTP process thru PERL <t18_pilot@hotmail.spam.com>
Re: Need to spawn an FTP process thru PERL <1usa@llenroc.ude.invalid>
Re: Need to spawn an FTP process thru PERL <tony_curtis32@yahoo.com>
Page can not be displayed... (Piet L.)
Re: Regarding ISA and Inheritance <postmaster@castleamber.com>
Re: Relational databases and tied hashes? <perl@my-header.org>
Re: Static Code Analysis Tools? (Randal L. Schwartz)
Digest Administrivia (Last modified: 6 Apr 01) (Perl-Users-Digest Admin)
----------------------------------------------------------------------
Date: Sat, 18 Dec 2004 00:18:52 GMT
From: "Peter Wyzl" <wyzelli@yahoo.com>
Subject: Re: $ftp->rget() does not work for MS Windows FTP Server
Message-Id: <MHKwd.76626$K7.20247@news-server.bigpond.net.au>
<semovrs@concord.edu> wrote in message
news:1103305493.344203.293720@z14g2000cwz.googlegroups.com...
: Like who?
: Are you saying Billy The Kid? I would just shoot him if could "contact"
: him.
Welll that depends now doesn't it. Is it the native ftp server that comes
with IIS or is it some other third party program, of which there are many?
--
Wyzelli
------------------------------
Date: Sat, 18 Dec 2004 03:03:35 -0500
From: John Mason Jr <notvalid@cox.net.invalid>
Subject: Re: $ftp->rget() does not work for MS Windows FTP Server
Message-Id: <qvRwd.947$iH.51@fed1read02>
semovrs@concord.edu wrote:
> Hello, everyone,
> Has anyone tried to use Net::FTP::Recursive to connect to windows ftp
> service and used ftp->rget() with it? I tried it several times and it
> would return success for ftp->rget() but it wouldn't download my
> directory and subdirectories from the Winblows ftp server. I tried the
> same code to connect to a linux box and it worked just fine. So I am
> wondering - could it be the OS that's wasting my time?
> Thanks for any input in advance.
> Roumen.
>
On MS FTP server go into properties and set directory listing to Unix
<http://www.microsoft.com/windows2000/en/server/iis/default.asp?url=/windows2000/en/server/iis/htm/core/iiprsovr.htm>
Default is MS-DOS listing
John
------------------------------
Date: Fri, 17 Dec 2004 23:22:03 +0000 (UTC)
From: Ilya Zakharevich <nospam-abuse@ilyaz.org>
Subject: Re: (quickie) (Aliasing) Possible to get this to work in strict?
Message-Id: <cpvpmq$22ct$1@agate.berkeley.edu>
[A complimentary Cc of this posting was sent to
Tassilo v. Parseval
<tassilo.von.parseval@rwth-aachen.de>], who wrote in article <slrncs63aq.t1.tassilo.von.parseval@localhost.localdomain>:
> In a way it seems like a contradiction. But on closer inspection it is
> not, because you created an alias to a lexical variable. And as there is
> no way to distinguish between original and alias (as said above), the
> alias must behave just as the original variable. And that includes
> refcounting, therefore PADMY.
I do not see what PADMY has to do with refcounting. AFAIK, it is used
(after compilation) for one purpose only: optimization of $a = $b + $c
if $a is lexical; in this case op_add() (sp?) can write to $a directly
instead of writing to a temporary, then copying from a temporary to
$a.
And this is most probably done at compile time only...
Hope this helps,
Ilya
------------------------------
Date: 18 Dec 2004 04:27:10 GMT
From: "A. Sinan Unur" <1usa@llenroc.ude.invalid>
Subject: [OT] Re: HTML Parser
Message-Id: <Xns95C2EE930C038asu1cornelledu@132.236.56.8>
Gunnar Hjalmarsson <noreply@gunnar.cc> wrote in
news:32h6nvF3o8101U1@individual.net:
> Martien Verbruggen wrote:
>> I think that your newsreader is incorrectly removing something it
>> thinks is quoted-printable encoding or so.
>
> The original message *was* sent quoted-printable encoded, so Sinan's
> newsreader rather failed to decode it properly.
I am no expert on this, but it seems like XNews is getting confused by Rule
#5 at http://rfc.net/rfc1521.html#p19. Oh well, I like everything else
about it. I'll be more careful next time.
Sinan.
------------------------------
Date: Fri, 17 Dec 2004 23:31:00 +0000
From: Brian McCauley <nobull@mail.com>
Subject: Re: [Q] $ARGV, <>, and command-line Perl
Message-Id: <cpvpuq$8ci$1@sun3.bham.ac.uk>
bill wrote:
> In <cpv4ei$rhf$1@sun3.bham.ac.uk> Brian McCauley <nobull@mail.com> writes:
>
>
>>bill wrote:
>
>
>>>In <Xns95C294318E40Felhber1lidotechnet@62.89.127.66> "Bernard El-Hagin" <bernard.el-haginDODGE_THIS@lido-tech.net> writes:
>>>
>>>
>>>
>>>>bill <please_post@nomail.edu> wrote:
>>>
>>>
>>>>[...]
>>>
>>>
>>>>>Of course the catch could be in that last "non-magical" bit, which
>>>>>as far as I know is totally undefined crap (i.e. useless
>>>>>non-documentation). [...]
>>>
>>>
>>>
>>>>Documentation patches are a great way to contribute to the Perl
>>>>project. Thanks in advance for yours.
>>>
>>>
>>>I can't possibly produce this patch, since I have no idea what this
>>>magical/non-magical stuff means. Do you?
>
>
>>Yes, the magicical nature of the *ARGV special variable is explained in
>>the documentation decribing the *ARGV special varaible.
>
>
> Where exactly is that documentation? If I search for ARGV in
> perlvar, this is what comes up:
[ snip ]
Sorry, I was looking at the current version. I didn't realise it had
changed recently. I also followed the implied cross-reference and
looked up the <> operator. I didn't remeber doing this because it was
barely a concious act - I've been reading reference manuals for a couple
of decades.
Anyhow, there you have it - I was wrong, I should have not have criticised.
> ARGV
> [ALL] The special filehandle that iterates over command-line
> filenames in @ARGV. Usually written as the null filehandle
> in the angle operator: <>.
>
> No mention of magic here either. Also there's no mention of anything
> (whether magic or not) that explains the inconsistency I cited
> earlier, namely that a "last" statement in an -ne script doesn't
> exit just the inner loop.
There is only one loop.
As you yourself cited in earlier in this thread:
perl -ne 'WHATEVER'
is, as a matter of fact, a shorthand for
perl -ne 'LINE: while (<>) { WHATEVER }'
It then went on you try to explain the effect of this with some pseudo
code. But the pseudo code is an analogy. A parable. Where you are
given a literal explaination and an analogy you should not fall into the
trap of drawing false infererences by from a literal interpretation of
the analogy. (Or else you may end up knocking on people's doors trying
to persude them to accept free magazines :-) ).
In reality the <> or <ARGV> behaves as a iterator that iterates over all
ther records in all the files in @ARGV.
Anyhow you should submit a documention patch that inserts the phrase
"There are not really two nested loops" at the appropriate place in the
explaination of the pseudocode. As has been said a number of times in
this newsgroup (mostly by me it has to be admitted) that people who are
rading the documentation for the first time are actually most qualified
to find bits that are hard to follow.
------------------------------
Date: Fri, 17 Dec 2004 18:22:34 +0100
From: Matija Papec <perl@my-header.org>
Subject: Re: Consecutive Numbers
Message-Id: <u636s0d1lkk84k6njt1sgoj09lqk5mjpbs@4ax.com>
X-Ftn-To: Anno Siegel
anno4000@lublin.zrz.tu-berlin.de (Anno Siegel) wrote:
>> $_ + $delta == $_[ 0] or return 0 for shift;
>> }
>> return 1;
>> }
>
>I was entirely unconcerned with speed when I wrote that. The one-shot
Ofcourse, it's just that I find your example interesting in light of
"subroutine calls slow down the program". While such way of thinking is
true, it's probably overestimated as there are greater speed killers like
"foreach".
>> sub is_arithmetic_sequence2 {
>> my $delta = shift;
>> while ( @_ > 1 ) {
>> (shift) + $delta == $_[ 0] or return 0;
>
>This is arguably wrong. The Perl interpreter is free to evaluate
>subexpressions in any order, so there is no guarantee that shift()
>has happened before $_[ 0] is evaluated. The result of the expression
>is undefined, even though there was probably never a Perl interpreter
>that did it the other way 'round.
Ah, so I'm living on the edge? Are there some other common cases where it
comes to undefined results?
--
Matija
------------------------------
Date: 18 Dec 2004 05:15:22 GMT
From: <jari.aalto <AT> poboxes.com> (Jari Aalto+mail.perl)
Subject: Emacs modules for Perl programming
Message-Id: <perl-faq/emacs-lisp-modules_1103346893@rtfm.mit.edu>
Archive-name: perl-faq/emacs-lisp-modules
Posting-Frequency: 2 times a month
URL: http://tiny-tools.sourceforge.net/
Maintainer: Jari Aalto A T poboxes com
Announcement: "What Emacs lisp modules can help with programming Perl"
Preface
Emacs is your friend if you have to do anything comcerning software
development: It offers plug-in modules, written in Emacs lisp
(elisp) language, that makes all your programmings wishes come
true. Please introduce yourself to Emacs and your programming era
will get a new light.
Where to find Emacs/XEmacs
o Unix:
http://www.gnu.org/software/emacs/emacs.html
http://www.xemacs.org/
o Unix Windows port (for Unix die-hards):
install http://www.cygwin.com/ which includes native Emacs 21.x.
and XEmacs port
o Pure Native Windows port
http://www.gnu.org/software/emacs/windows/ntemacs.html
ftp://ftp.xemacs.org/pub/xemacs/windows/setup.exe
o More Emacs resources at
http://tiny-tools.sourceforge.net/ => Emacs resource page
Emacs Perl Modules
Cperl -- Perl programming mode
http://www.cpan.org/modules/by-authors/id/ILYAZ/cperl-mode/
http://math.berkeley.edu/~ilya/software/emacs/
by Ilya Zakharevich
CPerl is major mode for editing perl files. Forget the default
`perl-mode' that comes with Emacs, this is much better. Comes
standard in newest Emacs.
TinyPerl -- Perl related utilities
http://tiny-tools.sourceforge.net/
If you ever wonder how to deal with Perl POD pages or how to find
documentation from all perl manpages, this package is for you.
Couple of keystrokes and all the documentaion is in your hands.
o Instant function help: See documentation of `shift', `pop'...
o Show Perl manual pages in *pod* buffer
o Grep through all Perl manpages (.pod)
o Follow POD references e.g. [perlre] to next pod with RETURN
o Coloured pod pages with `font-lock'
o Separate `tiperl-pod-view-mode' for jumping topics and pages
forward and backward in *pod* buffer.
o Update `$VERSION' variable with YYYY.MMDD on save.
o Load source code into Emacs, like Devel::DProf.pm
o Prepare script (version numbering) and Upload it to PAUSE
o Generate autoload STUBS (Devel::SelfStubber) for you
Perl Module (.pm)
TinyIgrep -- Perl Code browsing and easy grepping
[TinyIgrep is included in Tiny Tools Kit]
To grep from all installed Perl modules, define database to
TinyIgrep. There is example file emacs-rc-tinyigrep.el that shows
how to set up dattabases for Perl5, Perl4 whatever you have
installed
TinyIgrep calls Igrep.el to to do the search, You can adjust
recursive grep options, set search case sensitivity, add user grep
options etc.
You can find latest `igrep.el' module at
<http://groups.google.com/groups?group=gnu.emacs.sources> The
maintainer is Jefin Rodgers <kevinr <AT> ihs.com>.
TinyCompile -- To Browse grep results in Emacs *compile* buffer
TinyCompile is a minor mode for *compile* buffer from where
you can collapse unwanted lines or shorten file URLs:
/asd/asd/asd/asd/ads/as/da/sd/as/as/asd/file1:NNN: MATCHED TEXT
/asd/asd/asd/asd/ads/as/da/sd/as/as/asd/file2:NNN: MATCHED TEXT
-->
cd /asd/asd/asd/asd/ads/as/da/sd/as/as/asd/
file1:NNN: MATCHED TEXT
file1:NNN: MATCHED TEXT
End
------------------------------
Date: Fri, 17 Dec 2004 23:45:51 +0000
From: Brian McCauley <nobull@mail.com>
Subject: Re: FAQ 4.36: How can I expand variables in text strings?
Message-Id: <cpvqql$8tr$1@sun3.bham.ac.uk>
brian d foy wrote:
> In article <1103310366.506802.24370@z14g2000cwz.googlegroups.com>,
> <nobull@mail.com> wrote:
>
>
>>brian d foy wrote:
>
>
>>>In article <cpnaof$6c0$1@sun3.bham.ac.uk>, Brian McCauley
>>><nobull@mail.com> wrote:
>
>
>>>>>That's what I thought too: the input string is beyond our
>>>>>control and we just get to deal with it.
>
>
>>>I must get all the rare cases then, because I run into a lot
>>>of situations where people don't have control over the whole
>>>problem.
>
>
>>In general yes. But in the specific case of this question? Are you
>>sure? Care to back up that assertion?
>
>
> I've run into it enough that I don't think it's rare. People like
> to write configuration formats that have variables that refer to other
> directives already seen in the config file. I think they get the
> idea from shell scripts or makefiles.
It is in my experience rare for the format to be set in stone before one
has given any consideration to how it might be parsed. Maybe I've just
been lucky.
------------------------------
Date: Fri, 17 Dec 2004 18:22:33 +0100
From: Matija Papec <perl@my-header.org>
Subject: Re: go to a link, save the page and email it out?
Message-Id: <4346s09c4oh7hrgk24o9drhjh339d0eu56@4ax.com>
X-Ftn-To: dale
"dale" <zhangd@tycoelectronics.com> wrote:
>HTML::Mail works for some web sites. But some web sites have
>protections for reading some files, which is expected. THe results are:
I'm not sure if protection is the case but you can convince other side that
you're using fancy browser,
$html_mail->lwp_ua->agent("Mozilla/5.0");
>C:\Perl\scripts>mailp.pl
>Error while making request [ GET
>http://www.macom.com/Images/darkblue_bgcolor.gi
>f]
>404 Object Not Found at C:/Perl/lib/HTML/Mail.pm line 167.
>
>C:\Perl\scripts>
>
>However, if I use IE to open www.macom.com, I can save the page with
>all images. Any suggestions?
Probably there is no image and IE doesn't bother about that.
--
Matija
------------------------------
Date: 17 Dec 2004 19:46:03 -0800
From: "Lisa" <dlr93612@yahoo.com>
Subject: inserting a line into the body of an eMail before forwarding
Message-Id: <1103341563.210323.219050@c13g2000cwb.googlegroups.com>
Does anyone know how to insert a line into the body of an eMail b4 your
forward it?
I wan to take the original recipient eMail address and add it as a
single line at the top of the body of the message, then send the
message to a different address.
this code all works, I just don't know how to insert the line into the
body.
use Mail::POP3Client;
use Mail::MboxParser::Mail;
my $pop = new Mail::POP3Client( USER => "foo.bar\@foobar.com",
PASSWORD => "FoOBaR",
HOST => "foobar.com",
DEBUG => 0 );
for my $i (1 .. $pop->Count) {
my %EmailHeader = get_header_hash($i);
#$EmailHeader{'Envelope-to'} <-now containes original addressee, and
this is what I want to insert into the TOP of the body prior to sending
it (below)
my $Msg =
Mail::MboxParser::Mail->new([$pop->Head($i)],[$pop->Body($i)]);
my $mail = $Msg->make_convertable;
$mail->replace_in_header('to', 'yada.yada@yippy-yahoo.com');
$mail->send('sendmail');
}
Thanks
------------------------------
Date: Sat, 18 Dec 2004 01:28:52 GMT
From: "William Hymen" <t18_pilot@hotmail.spam.com>
Subject: Re: Need to spawn an FTP process thru PERL
Message-Id: <oJLwd.2780$Z47.115@newsread2.news.atl.earthlink.net>
Tad,
I think the guy just wanted a snipit of perl code....
"Tad McClellan" <tadmc@augustmail.com> wrote in message
news:slrncs5ppk.6ft.tadmc@magna.augustmail.com...
> Bob Van Der Ploeg <bob@vdpcorp.com> wrote:
>
> > Subject: Need to spawn an FTP process thru PERL
>
>
> The name of the language is "Perl", not "PERL".
>
>
> > Does anyone know how to spawn an FTP process thru PERL?
>
>
> Yes, the same way you would spawn any other process.
>
> What is it that you really need to accomplish?
>
> You can do FTP from _within_ the perl process via a module from CPAN,
> do you *require* that it be in a separate process for some reason?
>
> You could launch it in the background via system() or open(), or
> if you really need it, you can fork() and exec() to create
> a new process that can be taken over by ftp.
>
>
> --
> Tad McClellan SGML consulting
> tadmc@augustmail.com Perl programming
> Fort Worth, Texas
------------------------------
Date: 18 Dec 2004 03:29:32 GMT
From: "A. Sinan Unur" <1usa@llenroc.ude.invalid>
Subject: Re: Need to spawn an FTP process thru PERL
Message-Id: <Xns95C2E4CDFC0C8asu1cornelledu@132.236.56.8>
"William Hymen" <t18_pilot@hotmail.spam.com> wrote in
news:oJLwd.2780$Z47.115@newsread2.news.atl.earthlink.net:
[ Top-posting fixed. Don't do that. ]
> "Tad McClellan" <tadmc@augustmail.com> wrote in message
> news:slrncs5ppk.6ft.tadmc@magna.augustmail.com...
>> Bob Van Der Ploeg <bob@vdpcorp.com> wrote:
>>
>> > Subject: Need to spawn an FTP process thru PERL
>>
>> The name of the language is "Perl", not "PERL".
>>
>> > Does anyone know how to spawn an FTP process thru PERL?
>>
>> Yes, the same way you would spawn any other process.
>>
>> What is it that you really need to accomplish?
>
> Tad,
> I think the guy just wanted a snipit of perl code....
What is your point?
Sinan.
------------------------------
Date: Fri, 17 Dec 2004 22:45:38 -0600
From: Tony Curtis <tony_curtis32@yahoo.com>
Subject: Re: Need to spawn an FTP process thru PERL
Message-Id: <874qik5i4t.fsf@limey.hpcc.uh.edu>
>> On Sat, 18 Dec 2004 01:28:52 GMT,
>> "William Hymen" <t18_pilot@hotmail.spam.com> said:
Oh, that's torn it...
> "Tad McClellan" <tadmc@augustmail.com> wrote in message
> news:slrncs5ppk.6ft.tadmc@magna.augustmail.com...
>> Bob Van Der Ploeg <bob@vdpcorp.com> wrote:
>>
>> > Subject: Need to spawn an FTP process thru PERL
>> The name of the language is "Perl", not "PERL".
>>
>> > Does anyone know how to spawn an FTP process thru PERL?
>>
>> Yes, the same way you would spawn any other process.
>>
>> What is it that you really need to accomplish?
>>
>> You can do FTP from _within_ the perl process via a module
>> from CPAN, do you *require* that it be in a separate
>> process for some reason?
>>
>> You could launch it in the background via system() or
>> open(), or if you really need it, you can fork() and exec()
>> to create a new process that can be taken over by ftp.
>>
> Tad, I think the guy just wanted a snipit of perl code....
Yeah, but *which* snippit would the OP want? The most
appropriate one, or one that merely achieves the goal in a
clumsy way?
Tad is looking for complete information so he can suggest (an)
appropriate solution(s). Tad has indicated he knows there are
different ways of performing this task, each with pros and
cons; now the OP needs to provide more context about the
problem he's trying to solve to help Tad zero in on the best
way to get there.
Just dumping a piece of code that may or may not provide a
suitable solution would be negligent; I think Tad is showing
he cares about the quality of the solution that arises from
this thread (although maybe a little brusquely sometimes, but
then I'm in no position to cast the first stone here :-).
------------------------------
Date: 17 Dec 2004 22:18:04 -0800
From: PietLaroy@hotmail.com (Piet L.)
Subject: Page can not be displayed...
Message-Id: <c47f81f6.0412172218.2bf420f4@posting.google.com>
Hey,
I'm working with IIS (Windows 2000).
I've create a virtual directory usr-cgi met link naar e:\cgi
It works all well when I run simple scripts, but with the following script
I get a "Page can not be displayed" error.
Here is the code:
--------->>>>orders.pm
package orders;
use strict;
use vars qw(@ISA);
use CGI::XMLApplication;
use XML::LibXML;
use DBI;
use XML::Generator::DBI;
use XML::Handler::YAWriter;
@ISA = qw(CGI::XMLApplication);
my $path = "e:/cgi/finaal/";
my $file_name = "orders";
my $xmlfile = "$file_name.xml";
my $xslfile = "$file_name.xsl";
my $xmlfile_path = "$path$xmlfile";
my $xslfile_path = "$path$xslfile";
sub selectStylesheet {
my $self = shift;
my $context
my $style = $context->{STYLE} || $xslfile;
return $path . $style;
}
sub requestDOM {
my $self = shift;
my $context;
fetch_record();
my $xml_file = $context->{REQUEST} || $xmlfile;
my $requested_doc = $path . $xml_file;
my $parser = XML::LibXML->new();
my $doc = $parser->parse_file($requested_doc);
my $root = $doc->getDocumentElement();
return $root;
}
sub fetch_record() {
my $self = shift;
# create a DBI connection
my $dbh = DBI->connect ("DBI:mysql:MyDB", "MYLOGIN", "MYPASSWORD",
{ RaiseError => 1,
PrintError => 0
});
# instantiate a new XML::Handler::YAWriter object
my $out = XML::Handler::YAWriter-> new(
AsFile => "$xmlfile_path",
Pretty => {PrettyWhiteNewline => 0,
PrettyWhiteIndent => 0,
CatchEmptyElement => 1,
CatchWhiteSpace => 0
},
Encoding => "ISO-8859-1",
);
# instantiate a new XML::Generator::DBI object
my $gen = XML::Generator::DBI->new(
Handler => $out,
dbh => $dbh
);
# define the SQL query
my $query1 = "SELECT *
FROM orders
";
warn "SQL $query1";
my $sth1 = $dbh->prepare($query1);
$gen->execute($sth1);
}
--------->>>>orders.cgi
#!/usr/bin/perl -w
use strict;
use CGI qw(:standard);
use lib 'e:/cgi/finaal';
use orders;
my $q = CGI->new();
my %context = ();
my $gateway_name = orders;
$context{STYLE} = $q->param('style') if $q->param('style');
$context{REQUEST} = $q->url(-relative=>1);
$context{REQUEST} =~ s/^$gateway_name\/?//;
$context{REQUEST} ||= 'orders.xml';
my $app = orders->new();
$app->run(%context);
I know the script is working, because when I try it in DOS
e:\cgi\finaal> perl orders.cgi
I get the right output
Problem is the http://localhost/usr-cgi/finaal/orders.cgi
Is there something wrong with my path definition?
------------------------------
Date: 17 Dec 2004 23:51:02 GMT
From: John Bokma <postmaster@castleamber.com>
Subject: Re: Regarding ISA and Inheritance
Message-Id: <Xns95C2B594BC12Fcastleamber@130.133.1.4>
Randal L. Schwartz wrote:
>>>>>> "Sherm" == Sherm Pendley <spamtrap@dot-app.org> writes:
>
> Sherm> In the simplest case, where the classes are named "base" and
> Sherm> "derived", @derived::ISA might be declared in "derived.pm" like
> this:
>
> Sherm> package derived;
> Sherm> our @ISA = qw(base);
>
> And keep in mind that lowercase package names are reserved, especially
> the one called "base", which already does most of what you're looking
> for:
>
> package Derived;
> use base qw(Base);
IIRC the documentation that comes with Perl (perltoot et al) still use the
@ISA way. Of course I prefer use base :-)
PS: Did you like Veracruz?
--
John Small Perl scripts: http://johnbokma.com/perl/
Perl programmer available: http://castleamber.com/
Happy Customers: http://castleamber.com/testimonials.html
------------------------------
Date: Fri, 17 Dec 2004 18:22:32 +0100
From: Matija Papec <perl@my-header.org>
Subject: Re: Relational databases and tied hashes?
Message-Id: <rl46s0l1948517h36pi5clc5ktv56c0nh7@4ax.com>
X-Ftn-To: Lee Goddard
leegee@gmail.com (Lee Goddard) wrote:
>>Check for Tie::DBI, it does even table updating for you
>
>It does, but I can't find any info there on using it on tables related
>by UID. I've been look at the author's Tie::RDBM too, but that rather
>seems a misnoma - it doesn't seem to be so much a Relational DataBase
>Manager, as a way of freezing and thawing perl data to a database.
Didn't try the Tie::RDBM but with first one you can tie hash with sql table
and retrieve $uid properties like,
my $name = $item{$uid}{name};
my $price = $item{$uid}{price};
my $image = $item{$uid}{image};
--
Matija
------------------------------
Date: 17 Dec 2004 19:42:08 -0800
From: merlyn@stonehenge.com (Randal L. Schwartz)
Subject: Re: Static Code Analysis Tools?
Message-Id: <1103341699.7fd5901376b88d7c51eb363c63386f9c@teranews>
>>>>> "Brian" == Brian McCauley <nobull@mail.com> writes:
Brian> Beacuse Perl is not strongly typed
Well, for some definitions of "strongly typed". Some would loudly
disagree with you, for example.
--
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: 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 7532
***************************************