[32195] in Perl-Users-Digest
Perl-Users Digest, Issue: 3460 Volume: 11
daemon@ATHENA.MIT.EDU (Perl-Users Digest)
Sun Jul 31 11:09:28 2011
Date: Sun, 31 Jul 2011 08:09:09 -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 Sun, 31 Jul 2011 Volume: 11 Number: 3460
Today's topics:
be <r@thevoid1.net>
Re: data to hash sln@netherlands.com
Re: Generating an anonymous reference to an OO method <mvdwege@mail.com>
Re: Generating an anonymous reference to an OO method <rweikusat@mssgmbh.com>
Re: Generating an anonymous reference to an OO method (Randal L. Schwartz)
Re: Generating an anonymous reference to an OO method <uri@StemSystems.com>
Re: Generating an anonymous reference to an OO method <rweikusat@mssgmbh.com>
Re: Generating an anonymous reference to an OO method <rweikusat@mssgmbh.com>
Re: Generating an anonymous reference to an OO method <tadmc@seesig.invalid>
perl + doxygen + dbi <lyttlec@removegmail.com>
Re: Search and replace question <jwkrahn@example.com>
Digest Administrivia (Last modified: 6 Apr 01) (Perl-Users-Digest Admin)
----------------------------------------------------------------------
Date: Sat, 30 Jul 2011 17:42:37 -0600
From: robin <r@thevoid1.net>
Subject: be
Message-Id: <j124tu$quq$2@speranza.aioe.org>
go here and do the final health walkthrough.
www.thevoid1.net/solutions
and thius
was in fact
int eh newspaper
d
------------------------------
Date: Sat, 30 Jul 2011 13:56:44 -0700
From: sln@netherlands.com
Subject: Re: data to hash
Message-Id: <ekr837dtr5djsvok8iubd0jjqcir3eaagr@4ax.com>
On Sat, 30 Jul 2011 00:27:48 +0300, George Mpouras <nospam.gravitalsun@hotmail.com.nospam> wrote:
>Here is something I think it is interesting.
>Converts data (e.g. sql queries) to trees for a user driven virtual file
>system
>
So, you invented something unique that has never been done before.
The only problem I see is that this:
[snip unknown complex crap]
> die "At second argument, the ".(1+$i)." element with value
>\"$Keys[$i]\" is bigger than the total number $#data (0 offset) of items
>of the 1st input list argument\n" if $Keys[$i] > $#data;
> $Ref->{ $data[$Keys[$i]] } = {} unless ref $Ref->{ $data[$Keys[$i]] };
> $Ref = $Ref->{ $data[$Keys[$i]] }
> }
>
>die "At second argument, the ".(1+$#Keys)." element with value
>\"$Keys[$#Keys]\" is bigger than the total number $#data (0 offset) of
>items of the 1st input list argument\n" if $Keys[$#Keys] > $#data;
>foreach (reverse sort @Keys) { exists $Del{$_} ? ( next ):( $Del{$_}=''
>, splice(@data, $_, 1) ) } # Exclude used keys from the values
>push @{$Ref->{$LastKey}}, [@data]
>}
Stopped me in my tracks from reading it.
Next time, make a point or ask a question that pertains to something
specific.
-sln
------------------------------
Date: Sat, 30 Jul 2011 12:04:43 +0200
From: Mart van de Wege <mvdwege@mail.com>
Subject: Re: Generating an anonymous reference to an OO method
Message-Id: <867h70axtw.fsf@gareth.avalon.lan>
Rainer Weikusat <rweikusat@mssgmbh.com> writes:
> merlyn@stonehenge.com (Randal L. Schwartz) writes:
>>>>>>> "Rainer" == Rainer Weikusat <rweikusat@mssgmbh.com> writes:
>
> [...]
>
>> Rainer> I really don't know why you think that running the Perl compiler from
>> Rainer> within Perl-code in order to create new compiled code should be
>> Rainer> avoided. I'll happily learn the reason for that, though.
>>
>> Keep reading. I'm not going to repeat things that have been said
>> repeatedly in the literature for at least a dozen years.
>
> Out of curiosity, I've now also done a very cursory 'literature
> search': The Camel-book, considering its usual 'no bullshit' approach
> to technology', contains nothing applicable to this particular way of
> using eval. Something which is easily available on the web,
>
> http://docstore.mik.ua/orelly/perl/advprog
>
> has a quite enthusiastic chapter on eval,
Yes, and also a chapter on direct manipulation of the symbol table.
Unless you think that is also a good practice to use regularly, I think
you're missing the point.
Using string eval to dynamically load a class is an obsolescent
trick. If you want to do this, you're better off using Class::MOP or
Moose.
Mart
--
"We will need a longer wall when the revolution comes."
--- AJS, quoting an uncertain source.
------------------------------
Date: Sat, 30 Jul 2011 15:18:12 +0100
From: Rainer Weikusat <rweikusat@mssgmbh.com>
Subject: Re: Generating an anonymous reference to an OO method
Message-Id: <878vrfc0nv.fsf@sapphire.mobileactivedefense.com>
Mart van de Wege <mvdwege@mail.com> writes:
> Rainer Weikusat <rweikusat@mssgmbh.com> writes:
>
>> merlyn@stonehenge.com (Randal L. Schwartz) writes:
>>>>>>>> "Rainer" == Rainer Weikusat <rweikusat@mssgmbh.com> writes:
>>
>> [...]
>>
>>> Rainer> I really don't know why you think that running the Perl compiler from
>>> Rainer> within Perl-code in order to create new compiled code should be
>>> Rainer> avoided. I'll happily learn the reason for that, though.
>>>
>>> Keep reading. I'm not going to repeat things that have been said
>>> repeatedly in the literature for at least a dozen years.
>>
>> Out of curiosity, I've now also done a very cursory 'literature
>> search': The Camel-book, considering its usual 'no bullshit' approach
>> to technology', contains nothing applicable to this particular way of
>> using eval. Something which is easily available on the web,
>>
>> http://docstore.mik.ua/orelly/perl/advprog
>>
>> has a quite enthusiastic chapter on eval,
>
> Yes, and also a chapter on direct manipulation of the symbol table.
Another very useful thing, since it enable construction of state
machines without explicit state interpretation logic (and various
other useful features).
[...]
> Using string eval to dynamically load a class is an obsolescent
> trick.
Since I was writing about running the Perl compiler in order to create
compiled subroutines at runtime, could you perhaps enlighthen me what
the heck you are referring to?
------------------------------
Date: Sat, 30 Jul 2011 11:57:48 -0700
From: merlyn@stonehenge.com (Randal L. Schwartz)
Subject: Re: Generating an anonymous reference to an OO method
Message-Id: <86tya3lhoz.fsf@red.stonehenge.com>
>>>>> "Rainer" == Rainer Weikusat <rweikusat@mssgmbh.com> writes:
Rainer> Out of curiosity, I've now also done a very cursory 'literature
Rainer> search': The Camel-book, considering its usual 'no bullshit' approach
Rainer> to technology', contains nothing applicable to this particular way of
Rainer> using eval. Something which is easily available on the web,
Rainer> [REDACTED]
I really, really, really don't appreciate people posting URLs to pirated
copies of O'Reilly books.
If that doesn't end you up in a bunch of killfiles, I'm not sure what
does.
{Hrmph.}
--
Randal L. Schwartz - Stonehenge Consulting Services, Inc. - +1 503 777 0095
<merlyn@stonehenge.com> <URL:http://www.stonehenge.com/merlyn/>
Smalltalk/Perl/Unix consulting, Technical writing, Comedy, etc. etc.
See http://methodsandmessages.posterous.com/ for Smalltalk discussion
------------------------------
Date: Sat, 30 Jul 2011 20:25:49 -0400
From: "Uri Guttman" <uri@StemSystems.com>
Subject: Re: Generating an anonymous reference to an OO method
Message-Id: <8739hncn3m.fsf@quad.sysarch.com>
>>>>> "RLS" == Randal L Schwartz <merlyn@stonehenge.com> writes:
>>>>> "Rainer" == Rainer Weikusat <rweikusat@mssgmbh.com> writes:
Rainer> Out of curiosity, I've now also done a very cursory 'literature
Rainer> search': The Camel-book, considering its usual 'no bullshit' approach
Rainer> to technology', contains nothing applicable to this particular way of
Rainer> using eval. Something which is easily available on the web,
Rainer> [REDACTED]
RLS> I really, really, really don't appreciate people posting URLs to pirated
RLS> copies of O'Reilly books.
RLS> If that doesn't end you up in a bunch of killfiles, I'm not sure what
RLS> does.
RLS> {Hrmph.}
on top of that he takes what he reads as gospel and doesn't think about
the consequences. or allow actual other views to penetrate. not someone
who engenders the idea of good coding practices. but of course he will
defend his views to the death without ever listening to anything else.
uri
--
Uri Guttman -- uri AT perlhunter DOT com --- http://www.perlhunter.com --
------------ Perl Developer Recruiting and Placement Services -------------
----- Perl Code Review, Architecture, Development, Training, Support -------
------------------------------
Date: Sun, 31 Jul 2011 14:52:53 +0100
From: Rainer Weikusat <rweikusat@mssgmbh.com>
Subject: Re: Generating an anonymous reference to an OO method
Message-Id: <87tya236bu.fsf@sapphire.mobileactivedefense.com>
merlyn@stonehenge.com (Randal L. Schwartz) writes:
>>>>>> "Rainer" == Rainer Weikusat <rweikusat@mssgmbh.com> writes:
>
> Rainer> Out of curiosity, I've now also done a very cursory 'literature
> Rainer> search': The Camel-book, considering its usual 'no bullshit' approach
> Rainer> to technology', contains nothing applicable to this particular way of
> Rainer> using eval. Something which is easily available on the web,
>
> Rainer> [REDACTED]
>
> I really, really, really don't appreciate people posting URLs to pirated
> copies of O'Reilly books.
I have no idea if this is 'a pirated copy' or a legal one (given the
age of the book, the latter is at least not completely
impossible). You referred to 'literature'. Consequently, I used Google
to search for 'perl eval string' and this is one of the results that
came back. It is pretty ridicolous to try to hold me personally
responsible that someone from Canada (AFAIK) but something on the web
which can be found by using a search engine.
> If that doesn't end you up in a bunch of killfiles, I'm not sure what
> does.
That someone completely unknown to me did something in some country
which you believe to be illegal? That's beyond pathetic. If you
consider this serious enough, get in touch with the aggrieved party
and tell them about the link so that they can take whatever action
they consider to be necessary or sensible.#
------------------------------
Date: Sun, 31 Jul 2011 15:01:40 +0100
From: Rainer Weikusat <rweikusat@mssgmbh.com>
Subject: Re: Generating an anonymous reference to an OO method
Message-Id: <87pqkq35x7.fsf@sapphire.mobileactivedefense.com>
"Uri Guttman" <uri@StemSystems.com> writes:
>>>>>> "RLS" == Randal L Schwartz <merlyn@stonehenge.com> writes:
>
>>>>>> "Rainer" == Rainer Weikusat <rweikusat@mssgmbh.com> writes:
> Rainer> Out of curiosity, I've now also done a very cursory 'literature
> Rainer> search': The Camel-book, considering its usual 'no bullshit' approach
> Rainer> to technology', contains nothing applicable to this particular way of> Rainer> using eval. Something which is easily available on the web,
>> Rainer> [REDACTED]
>> RLS> I really, really, really don't appreciate people posting URLs to pirated
> RLS> copies of O'Reilly books.
>
> RLS> If that doesn't end you up in a bunch of killfiles, I'm not sure what
> RLS> does.
>
> RLS> {Hrmph.}
>
> on top of that he takes what he reads as gospel and doesn't think about
> the consequences.
You posted an opinion. Without bothering to argue in favor of it. I
posted another opinion different from yours. This demonstrates that
there is no universal consensus on this topic, as opposed to what you
tried to suggest. I doesn't communicate anything about me.
> or allow actual other views to penetrate. not someone
> who engenders the idea of good coding practices.
For as long as you think that making derogatory summary statements
about others in public suits you more than trying to argue in favor of
your opinions, you cannot seriously expect to be taken seriously.
------------------------------
Date: Sun, 31 Jul 2011 10:01:42 -0500
From: Tad McClellan <tadmc@seesig.invalid>
Subject: Re: Generating an anonymous reference to an OO method
Message-Id: <slrnj3ar4g.h3i.tadmc@tadbox.sbcglobal.net>
Rainer Weikusat <rweikusat@mssgmbh.com> wrote:
> merlyn@stonehenge.com (Randal L. Schwartz) writes:
>>>>>>> "Rainer" == Rainer Weikusat <rweikusat@mssgmbh.com> writes:
>>
>> Rainer> Out of curiosity, I've now also done a very cursory 'literature
>> Rainer> search': The Camel-book, considering its usual 'no bullshit' approach
>> Rainer> to technology', contains nothing applicable to this particular way of
>> Rainer> using eval. Something which is easily available on the web,
>>
>> Rainer> [REDACTED]
>>
>> I really, really, really don't appreciate people posting URLs to pirated
>> copies of O'Reilly books.
>
> I have no idea if this is 'a pirated copy' or a legal one (given the
> age of the book, the latter is at least not completely
> impossible). You referred to 'literature'. Consequently, I used Google
> to search for 'perl eval string' and this is one of the results that
> came back. It is pretty ridicolous to try to hold me personally
> responsible that someone from Canada (AFAIK) but something on the web
> which can be found by using a search engine.
It is perfectly sensible to hold you responsible for
driving traffic to illegal content by linking to it.
--
Tad McClellan
email: perl -le "print scalar reverse qq/moc.liamg\100cm.j.dat/"
The above message is a Usenet post.
I don't recall having given anyone permission to use it on a Web site.
------------------------------
Date: Sat, 30 Jul 2011 17:11:04 -0400
From: lyttlec <lyttlec@removegmail.com>
Subject: perl + doxygen + dbi
Message-Id: <j11s1j$2tn$1@speranza.aioe.org>
I'm starting a new project that requires lots of documentation. All the
information needed to prepare the documents and dbi input is in the XML
files generated by doxygen. I would like to use perl scripts and/or
doxygen layout files to automate the process.
Can anyone give me some pointers? I've searched google and the only
results have been to hand-edit the latex files.
Thanks
------------------------------
Date: Sat, 30 Jul 2011 04:23:18 -0700
From: "John W. Krahn" <jwkrahn@example.com>
Subject: Re: Search and replace question
Message-Id: <HQRYp.44160$7K4.42231@newsfe14.iad>
laredotornado wrote:
> Hi,
>
> I'm using Perl 5.10.6 on Mac 10.6.6. I want to execute a simple
> search and replace against a file ...
>
> my $searchAndReplaceCmd = "perl -pi -e 's/\\Q${localTestDir}\\E//g' $
> {testSuiteFile}";
> system( $searchAndReplaceCmd );
>
> but the problem above is the variable $localTestDir contains directory
> separators, and this screws up the regular expression ...
Ooh, how to run perl code from inside perl? I think I know that one:
{ local ( $^I, @ARGV ) = ( '', $testSuiteFile );
while ( <> ) {
s/\Q$localTestDir\E//g;
print;
}
}
John
--
Any intelligent fool can make things bigger and
more complex... It takes a touch of genius -
and a lot of courage to move in the opposite
direction. -- Albert Einstein
------------------------------
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 3460
***************************************