[31501] in Perl-Users-Digest
Perl-Users Digest, Issue: 2760 Volume: 11
daemon@ATHENA.MIT.EDU (Perl-Users Digest)
Fri Jan 8 06:09:37 2010
Date: Fri, 8 Jan 2010 03:09:05 -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 Fri, 8 Jan 2010 Volume: 11 Number: 2760
Today's topics:
Re: converting from 'use' to 'require' <john1949@yahoo.com>
Re: FAQ 7.10 How do I adopt or take over a module alrea <spamtrap@shermpendley.com>
Re: FAQ 7.10 How do I adopt or take over a module alrea <spamtrap@shermpendley.com>
Re: FAQ 7.10 How do I adopt or take over a module alrea <sysadmin@example.com>
Re: FAQ 7.10 How do I adopt or take over a module alrea <sysadmin@example.com>
Re: LWP::UserAgent HTTP POST authentication problem <pshendley@gmail.com>
Re: LWP::UserAgent HTTP POST authentication problem <sysadmin@example.com>
Re: LWP::UserAgent HTTP POST authentication problem <pshendley@gmail.com>
Re: LWP::UserAgent HTTP POST authentication problem <jurgenex@hotmail.com>
Re: LWP::UserAgent HTTP POST authentication problem <sysadmin@example.com>
Re: LWP::UserAgent HTTP POST authentication problem <graham.stow@stowassocs.co.uk>
Re: Regex to extract email from .msg <bart@nijlen.com>
Digest Administrivia (Last modified: 6 Apr 01) (Perl-Users-Digest Admin)
----------------------------------------------------------------------
Date: Fri, 8 Jan 2010 09:02:03 -0000
From: "John" <john1949@yahoo.com>
Subject: Re: converting from 'use' to 'require'
Message-Id: <hi6sa9$b9q$1@news.albasani.net>
"John" <john1949@yahoo.com> wrote in message
news:hi4gnm$f2m$1@news.albasani.net...
> Just checking I'm doing the right thing.
>
> I have a main program (main.pl) and several libraries (LIB1.pm
> LIBmatrix.pm LIBgraph.pm) each containing about 50 routines.
>
> I begin:
>
> use warnings;
> use strict;
> use LIB1;
> use LIBmatrix;
> use LIBgraph;
>
> There are many options for the user, but no user ever uses all the
> routines. The problem is that 'use' will load all the routines when
> main.pl is invoked.
> As the program has grown I am aware that when main.pl is invoked it is
> taken quite a long time to load.
>
> My solution would be to use 'require'. Change LIB.pm to LIB.pl and access
> via:
>
> require 'LIB1.pl';
> my $x=LIB1::curve($z,$w);
>
> Am I right in thinking that memory usage will fall and loading will be
> faster as I only access the routines when requested by the user?
>
> Regards
> John
>
>
>
>
>
Thanks gentlemen. I will try
if ($ok) {require LibGraph;}
then
use Class::Autouse {LibGraph}
and see which is better.
I may have to split my three libraries into smaller ones.
Regards
John
------------------------------
Date: Thu, 07 Jan 2010 21:13:09 -0500
From: Sherm Pendley <spamtrap@shermpendley.com>
Subject: Re: FAQ 7.10 How do I adopt or take over a module already on CPAN?
Message-Id: <m27hrt2vka.fsf@shermpendley.com>
Wanna-Be Sys Admin <sysadmin@example.com> writes:
> While it's wrong, and annoying of them to do that, it's unlikely to be a
> crime, unless this is just part of their actions that are crimes that
> could add to proving harassment. I'm just saying, it's better to
> ignore them/not respond to the abuse, than it is to engage and start
> saying they're being reported and it's a crime.
In general, when dealing with run of the mill trolls, I agree 100%. But,
this has been going on for two weeks now. This guy has created seven
fake profiles on Facebook so far, and now he's actively searching me
out in other places too.
> I doubt their ISP will
> care what username they post as on usenet/who they pretend to be.
It's not just usenet though. The posts here are part of a larger pattern
of behavior that clearly spells "harassment."
sherm--
------------------------------
Date: Thu, 07 Jan 2010 21:23:40 -0500
From: Sherm Pendley <spamtrap@shermpendley.com>
Subject: Re: FAQ 7.10 How do I adopt or take over a module already on CPAN?
Message-Id: <m23a2h2v2r.fsf@shermpendley.com>
Wanna-Be Sys Admin <sysadmin@example.com> writes:
> I'm just saying, it's better to
> ignore them/not respond to the abuse, than it is to engage
Oh, also - I don't intend to keep engaging him here. My earlier post
was intended to put him on notice: His ISP's records can be subpoena'd
to find his real identity, should legal action prove necessary. He's
not as anonymous as he believes, and his online actions can and will
have real-world consequences.
sherm--
------------------------------
Date: Thu, 07 Jan 2010 21:36:15 -0800
From: Wanna-Be Sys Admin <sysadmin@example.com>
Subject: Re: FAQ 7.10 How do I adopt or take over a module already on CPAN?
Message-Id: <kvz1n.3673$rH7.1392@newsfe19.iad>
Sherm Pendley wrote:
> Wanna-Be Sys Admin <sysadmin@example.com> writes:
>
>> While it's wrong, and annoying of them to do that, it's unlikely to
>> be a crime, unless this is just part of their actions that are crimes
>> that
>> could add to proving harassment. I'm just saying, it's better to
>> ignore them/not respond to the abuse, than it is to engage and start
>> saying they're being reported and it's a crime.
>
> In general, when dealing with run of the mill trolls, I agree 100%.
> But, this has been going on for two weeks now. This guy has created
> seven fake profiles on Facebook so far, and now he's actively
> searching me out in other places too.
>
>> I doubt their ISP will
>> care what username they post as on usenet/who they pretend to be.
>
> It's not just usenet though. The posts here are part of a larger
> pattern of behavior that clearly spells "harassment."
>
> sherm--
Well, we've all seen assholes push the limits online, because they could
never get away with those things in real life, but if the guy is
legitimately harassing you, then good luck (it would be nice to see
someone not get away with it for once, I just don't have a lot of hope
about it, but I don't know your entire situation). Good luck.
--
Not really a wanna-be, but I don't know everything.
------------------------------
Date: Thu, 07 Jan 2010 21:37:34 -0800
From: Wanna-Be Sys Admin <sysadmin@example.com>
Subject: Re: FAQ 7.10 How do I adopt or take over a module already on CPAN?
Message-Id: <ywz1n.3674$rH7.672@newsfe19.iad>
Sherm Pendley wrote:
> Wanna-Be Sys Admin <sysadmin@example.com> writes:
>
>> I'm just saying, it's better to
>> ignore them/not respond to the abuse, than it is to engage
>
> Oh, also - I don't intend to keep engaging him here. My earlier post
> was intended to put him on notice: His ISP's records can be subpoena'd
> to find his real identity, should legal action prove necessary. He's
> not as anonymous as he believes, and his online actions can and will
> have real-world consequences.
>
> sherm--
I see, so it wasn't a legal threat due to the imposture postings, but to
let them know that everything they've done online that is a crime is
able to be tracked. Certainly, some online actions do have laws to
deal with them, so if he's done them, then I wish you the best in
dealing with it.
--
Not really a wanna-be, but I don't know everything.
------------------------------
Date: Thu, 7 Jan 2010 19:55:49 -0800 (PST)
From: Permostat <pshendley@gmail.com>
Subject: Re: LWP::UserAgent HTTP POST authentication problem
Message-Id: <6c5896dd-e8b4-40d7-b48a-849e0bace271@21g2000yqj.googlegroups.com>
On Jan 7, 6:37=A0pm, Wanna-Be Sys Admin <sysad...@example.com> wrote:
> Permostat wrote:
> > We don't like socialists in our newsgroup. We'll be seeing not again
> > commie.
>
> > PERMO
>
> If you're going to post nonsense, you could at least snip the text. =A0We
> all know you're know Shendley, so your efforts are in vain (it'll just
> win more support for the person you're attempting to harass).
> --
> Not really a wanna-be, but I don't know everything.
What efforts?? I've already proven my point & and he knows what it is.
Now it's just entertainment for me. I am above nearly every single
person I come in contact with in every conceivable way. Nearly
everybody on this planet is the nexus of my next laugh. Give me break.
PERMO
------------------------------
Date: Thu, 07 Jan 2010 21:33:18 -0800
From: Wanna-Be Sys Admin <sysadmin@example.com>
Subject: Re: LWP::UserAgent HTTP POST authentication problem
Message-Id: <ysz1n.3672$rH7.3632@newsfe19.iad>
Permostat wrote:
> On Jan 7, 6:37Â pm, Wanna-Be Sys Admin <sysad...@example.com> wrote:
>> Permostat wrote:
>> > We don't like socialists in our newsgroup. We'll be seeing not
>> > again commie.
>>
>> > PERMO
>>
>> If you're going to post nonsense, you could at least snip the text.
>> We all know you're know Shendley, so your efforts are in vain (it'll
>> just win more support for the person you're attempting to harass).
>> --
>> Not really a wanna-be, but I don't know everything.
It's improper to quote signatures.
> What efforts??
This, that, what you've done. It takes some effort to bother pretending
to be someone else.
> I've already proven my point & and he knows what it is.
You've made no point, you've only posted as someone else and shown you
don't know how to quote messages on usenet. How does that make him
look bad?
> Now it's just entertainment for me.
That's kind of sad.
> I am above nearly every single
> person I come in contact with in every conceivable way.
I suppose you are welcome to believe that so long as you make a claim,
that it makes it true in your own mind, but that sort of logic doesn't
work too well in real life, when it's more than just self esteem.
> Nearly
> everybody on this planet is the nexus of my next laugh.
Are you the guy that wrote the time travel watch spam?
> Give me break.
I'll be happy to break whatever.
--
Not really a wanna-be, but I don't know everything.
------------------------------
Date: Thu, 7 Jan 2010 21:52:23 -0800 (PST)
From: Permostat <pshendley@gmail.com>
Subject: Re: LWP::UserAgent HTTP POST authentication problem
Message-Id: <85c6fe38-be5a-4131-a32a-210a52737bee@d20g2000yqh.googlegroups.com>
On Jan 7, 11:33=A0pm, Wanna-Be Sys Admin <sysad...@example.com> wrote:
> Permostat wrote:
> > On Jan 7, 6:37=A0pm, Wanna-Be Sys Admin <sysad...@example.com> wrote:
> >> Permostat wrote:
> >> > We don't like socialists in our newsgroup. We'll be seeing not
> >> > again commie.
>
> >> > PERMO
>
> >> If you're going to post nonsense, you could at least snip the text.
> >> We all know you're know Shendley, so your efforts are in vain (it'll
> >> just win more support for the person you're attempting to harass).
> >> --
> >> Not really a wanna-be, but I don't know everything.
>
> It's improper to quote signatures.
>
> > What efforts??
>
> This, that, what you've done. =A0It takes some effort to bother pretendin=
g
> to be someone else.
When you know the internet well enough to do anything in under two
minutes, it is no effort. Which is where you cross dressers are wrong
about trolls spending way too much on here.
> > I've already proven my point & and he knows what it is.
>
> You've made no point, you've only posted as someone else and shown you
> don't know how to quote messages on usenet. =A0How does that make him
> look bad?
>
I'm not trying to make anyone look bad and I'll quote on Usenet
however I want to quote. Nobody has told me anything about my quoting
in 15 years. So I'm going to assume you are assuming I'm some hack who
has never walked into an alt. group before. You've lost the plot and
let yourself believe you are as smart as you think you are.
> > Now it's just entertainment for me.
>
> That's kind of sad.
It is sad to be so letdown by people in general that you let them
become little wind up things.
> > I am above nearly every single
> > person I come in contact with in every conceivable way.
>
> I suppose you are welcome to believe that so long as you make a claim,
> that it makes it true in your own mind, but that sort of logic doesn't
> work too well in real life, when it's more than just self esteem.
It is only confidence and self esteem. I have found a loving and
sweetly devoted girlfriend. I have super loyal friends who defend me.
And I have parents who fund my education and make sure to the final
degree that I am well taken care of. I don't fuck with bullshitters,
drama queens, or junkie/alcoholics. Why all of this?? Because I
understand how important a person like myself is and I accept NO less
than best in my life. It works.
> > Nearly
> > everybody on this planet is the nexus of my next laugh.
>
> Are you the guy that wrote the time travel watch spam?
I use the correct words for the proper intent. I didn't mean to
confuse you.
> > Give me break.
>
> I'll be happy to break whatever.
Stick a cattle prod set to max up your cunt.
> Not really a wanna-be, but I don't know everything.
PROTO
------------------------------
Date: Thu, 07 Jan 2010 22:51:15 -0800
From: Jürgen Exner <jurgenex@hotmail.com>
Subject: Re: LWP::UserAgent HTTP POST authentication problem
Message-Id: <8eldk5lnj2dq3fs4lmuiqopdmc8qhlp3d1@4ax.com>
Permostat <pshendley@gmail.com> wrote:
[nothing of any significance]
*PLONK*
jue
------------------------------
Date: Fri, 08 Jan 2010 00:41:48 -0800
From: Wanna-Be Sys Admin <sysadmin@example.com>
Subject: Re: LWP::UserAgent HTTP POST authentication problem
Message-Id: <hdC1n.18398$0U1.11196@newsfe16.iad>
Permostat wrote:
> On Jan 7, 11:33Â pm, Wanna-Be Sys Admin <sysad...@example.com> wrote:
>> Permostat wrote:
>> > On Jan 7, 6:37Â pm, Wanna-Be Sys Admin <sysad...@example.com> wrote:
>> >> Permostat wrote:
>> >> > We don't like socialists in our newsgroup. We'll be seeing not
>> >> > again commie.
>>
>> >> > PERMO
>>
>> >> If you're going to post nonsense, you could at least snip the
>> >> text. We all know you're know Shendley, so your efforts are in
>> >> vain (it'll just win more support for the person you're attempting
>> >> to harass). --
>> >> Not really a wanna-be, but I don't know everything.
>>
>> It's improper to quote signatures.
>>
>> > What efforts??
>>
>> This, that, what you've done. Â It takes some effort to bother
>> pretending to be someone else.
>
> When you know the internet well enough to do anything in under two
> minutes, it is no effort.
What does "knowing the Internet" have to do with how fast you type or
not? The point is, it takes time and effort, which shows you're the
one with the problem.
> Which is where you cross dressers are wrong
> about trolls spending way too much on here.
Well, at least you admit you're a troll. Anyway, shouldn't "cross
dressers" be hyphenated? You would seem to know, so I'm asking you.
>> > I've already proven my point & and he knows what it is.
>>
>> You've made no point, you've only posted as someone else and shown
>> you don't know how to quote messages on usenet. Â How does that make
>> him look bad?
>>
>
> I'm not trying to make anyone look bad and I'll quote on Usenet
> however I want to quote.
Not trying to make anyone look bad, by posting as their name pretending
to be them? Sure. And, as for quoting style... you want to look like
an idiot? Seems to me, if you spent so much time online (that much, I
can believe) that you'd know how to quote properly.
> Nobody has told me anything about my quoting
> in 15 years.
That's because you're either new to usenet, or you frequent groups that
aren't remotely educated.
> So I'm going to assume you are assuming I'm some hack who
> has never walked into an alt. group before.
I really don't care what you past in alt.test This is not an alt.*
group.
> You've lost the plot and
> let yourself believe you are as smart as you think you are.
Do you _own_ a mirror?
>> > Now it's just entertainment for me.
>>
>> That's kind of sad.
>
> It is sad to be so letdown by people in general that you let them
> become little wind up things.
You're not making any sense. I think it's sad that you think bugging
someone online is entertaining. I think it's sad you feel the need to
spend the time to post as them, pretending to be them, including
creating multiple profiles on popular social networking sites. I think
it's sad, that instead of dropping it, you chose to engage people here
that only makes you look like a fool.
>> > I am above nearly every single
>> > person I come in contact with in every conceivable way.
>>
>> I suppose you are welcome to believe that so long as you make a
>> claim, that it makes it true in your own mind, but that sort of logic
>> doesn't work too well in real life, when it's more than just self
>> esteem.
>
> It is only confidence and self esteem.
But, it is not "fact" and that's the problem. Furthermore, any day I'm
certain I'd out-wit you.
> I have found a loving and
> sweetly devoted girlfriend.
So? Honestly, I can't help but doubt anyone that will spout off such
irrelevant variables into their argument. The fact you feel the need,
says it's probably one of several traits of failure you have.
> I have super loyal friends who defend me.
Do your "super loyal friends" care not why they defend your defenseless
actions? You're telling me that your "friends" are so good, that you
can harass people for no reason and they'll stand by and defend you?
This is a good thing?
> And I have parents who fund my education
Because, without their "funding" you couldn't make it on your own like
an intelligent person could?
> and make sure to the final
> degree that I am well taken care of.
We care?
> I don't fuck with bullshitters,
So you don't talk to yourself?
> drama queens, or junkie/alcoholics.
You know, as trolly as you're being, what's your point? If you stay
away from those people, good, but *good luck* doing so online.
> Why all of this??
Yes, why? What's your point?
> Because I
> understand how important a person like myself is and I accept NO less
> than best in my life. It works.
Irrelevant. No one cares how special your mother tells you that you
are, people care that you're coming here posting as a long time member,
posting as their name and trying to create problems. Regardless of how
important you think you are, it shows you lack intellect and reason.
>> > Nearly
>> > everybody on this planet is the nexus of my next laugh.
>>
>> Are you the guy that wrote the time travel watch spam?
>
> I use the correct words for the proper intent. I didn't mean to
> confuse you.
The fact I don't buy into your bullshit, is hardly an indication you've
somehow confused me. Of course, we can only respond to what you say or
do. You act the act you act.
>> > Give me break.
>>
>> I'll be happy to break whatever.
>
> Stick a cattle prod set to max up your cunt.
Well, if I physically had a "cunt" on my person, I might be too busy to
give you the time I've given you. Are you lonely? This is the worst
sweet talk anyone's ever tried with me.
>> Not really a wanna-be, but I don't know everything.
>
> PROTO
Again, try and learn to not quot signatures, you genius.
--
Not really a wanna-be, but I don't know everything.
------------------------------
Date: Fri, 8 Jan 2010 09:49:53 -0000
From: "Graham" <graham.stow@stowassocs.co.uk>
Subject: Re: LWP::UserAgent HTTP POST authentication problem
Message-Id: <SfSdnRSyKZRZYtvWnZ2dnUVZ8n6dnZ2d@bt.com>
"C.DeRykus" <derykus@gmail.com> wrote in message
news:00278b64-a0f5-4042-8ae8-e1b1f3124adb@v25g2000yqk.googlegroups.com...
On Jan 7, 9:39 am, "Graham" <graham.s...@stowassocs.co.uk> wrote:
> ...
>
> A POST will require a valid content-length header IIRC.
>
> > $req->content($query);
> > $res = $ua->request($req);
>
> Where is your request $query above defined?
>
> $query is defined in the following line near the top of the script:-
> read (STDIN, $query, $ENV{'CONTENT_LENGTH'});
>
> You can check the actual request to ensure that the
> request has valid headers and the $query content is
> getting set and passed to the server correctly.
>
> print $req->as_string;
>
> adding the following lines:-
>
> $request_as_string = $req->as_string;
> print "request_as_string = $request_as_string\n";
>
> produced the following output:-
>
> 'request_as_string = POSThttps://www.nochex.com/nochex.dll/apc/apc
> User-Agent: libwww-perl/5.79
> Content-Type: application/x-www-form-urlencoded'Notably, there is no
> mention
> of any $query content, so I guess there isn't any! However, is that
> because
> none is being provided in the call-back, or am I just not finding it
> somehow?
There's a major problem then because you're sending no content
in the POST. The code you posted shows:
read (STDIN, $query, $ENV{'CONTENT_LENGTH'});
So the intent is to pick up the correct form pairs from the
user via STDIN to supply the POST content. Adding this check
would be a good idea:
my $len = read( STDIN, $query, $ENV{'CONTENT_LENGTH'})
or die "error: ", defined $len ? "no content" : $!;
As mentioned earlier, 'use LWP::Debug qw/+/' will providevoluminous
> details about the transaction too.Unfortunately, the CPAN write up on
> LWP::Debug doesn't give me enough information to figure out how to apply
> it.
It's applied automatically if added as is.
(This thread is probably better continued in the
libwww-perl mailing list. Check Google for details.)
--
Charles DeRykus
Checking the enironmental variables, $ENV{'REQUEST_METHOD'} = GET and there
is no query string, so that explains why $query is empty! Looks like the
problem wasn't with the script (although it wasn't perfect), but with
Nochex - what a lot of numpties! Still, I should have checked all these
issues before bothering folk, so apologies. I'll leave it here.
---
Graham
------------------------------
Date: Fri, 8 Jan 2010 01:58:25 -0800 (PST)
From: Bart Van der Donck <bart@nijlen.com>
Subject: Re: Regex to extract email from .msg
Message-Id: <49ac3e99-73ff-4b75-ac68-29bc1739e586@s3g2000yqs.googlegroups.com>
J=FCrgen Exner wrote:
> Bart Van der Donck <b...@nijlen.com> wrote:
>
>>The source file looks odd and displays differently in various
>>plaintext readers. It looks like some sort of half binary / half ascii
>>format (including the headers). The body of the file is more-or-less
>>consistent. The address to be extracted is in the following format:
>>
>> =A0 "- =A0 n a m e @ h o s t . c o m =A0 "
>>
>>All text in the source file is with such spaces between.
>>
>>Spaces can be displayed like EOL, space or nothing. Binary characters
>>seem to be inserted randomly; sometimes I can recognize a pattern of a
>>repeated string. Maybe someone is familiar with this format ? The
>>messages were saved from MS Outlook.
>
> This file is likely in UTF-16 or USC-2. Did you look at it in a
> hex/binary editor? Those spaces are probably 0x00 bytes and not really
> spaces at all.
>
> Use the proper encoding and Perl should be able to read the file just
> fine,
Yes - it appeared to be a UTF-16 issue indeed. I tried about all
possible byte order encoding schemes... and the following finally did
the trick:
use Encode;
open(my $in, '<:raw', $mypath) || die "Couldn't open file: $!";
my $txt =3D do { local $/; <$in> };
close $in;
my @lines =3D split /\n/, decode('UTF-16LE', $txt);
Thanks all for your help!
--
Bart
------------------------------
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 2760
***************************************