[28926] in Perl-Users-Digest
Perl-Users Digest, Issue: 170 Volume: 11
daemon@ATHENA.MIT.EDU (Perl-Users Digest)
Tue Feb 27 00:10:28 2007
Date: Mon, 26 Feb 2007 21:09:25 -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 Mon, 26 Feb 2007 Volume: 11 Number: 170
Today's topics:
:ATTR(:default<> problem <mmccaws@comcast.net>
Accessing Files through http? <rthompson414@gmail.com>
Re: Accessing Files through http? <mritty@gmail.com>
Re: Accessing Files through http? <greg.ferguson@icrossing.com>
Re: Accessing Files through http? <rthompson414@gmail.com>
Alan J. Flavell RIP anno4000@radom.zrz.tu-berlin.de
Re: Alan J. Flavell RIP <wahab-mail@gmx.de>
Re: Alan J. Flavell RIP <1usa@llenroc.ude.invalid>
Re: Alan J. Flavell RIP <tadmc@augustmail.com>
Re: Any 3270 emulation for perl yet? <greg.ferguson@icrossing.com>
Re: Any 3270 emulation for perl yet? <jwkenne@attglobal.net>
Re: any perl tool to create a flow of perl scripts :-[ <bik.mido@tiscalinet.it>
Re: any perl tool to create a flow of perl scripts :-[ <john.swilting@wanadoo.fr>
Re: any perl tool to create a flow of perl scripts :-[ <bik.mido@tiscalinet.it>
Re: any perl tool to create a flow of perl scripts xhoster@gmail.com
Re: any perl tool to create a flow of perl scripts <mark.clementsREMOVETHIS@wanadoo.fr>
Re: any perl tool to create a flow of perl scripts <steven.stone4@btopenworld.com>
Re: any perl tool to create a flow of perl scripts <greg.ferguson@icrossing.com>
App::Options: doesn't option_file work? <filippo2991@virgilio.it>
Digest Administrivia (Last modified: 6 Apr 01) (Perl-Users-Digest Admin)
----------------------------------------------------------------------
Date: 26 Feb 2007 11:08:11 -0800
From: "mmccaws2" <mmccaws@comcast.net>
Subject: :ATTR(:default<> problem
Message-Id: <1172516889.965977.191350@z35g2000cwz.googlegroups.com>
Hi
I'm learning to use Class::Std and I am trying to figure out the
Attributes options. I've successfullly used function statements
in :default<int(rand(5))>. but I was trying to insert a phrase
in :default<'phrase'>; that was generated and saved in a variable.
However it doesn't seem to work
package Site::Text;
use strict:
use Class::Std;
my @phrase_choices = qw( "Top of the Morn" "Gid-ay" "Hang in there"
"Keep Trucking");
my $phrase = $phrase_choices[int(rand($phrase_choices))];
%greeting_of:
ATTR(:init_arg<phrase>, :get<phrase>, :set<phrase>, :default<"$phrase">);
am I going to have to use START or BUILD or am I missing something in
the coding?
Mike
------------------------------
Date: 26 Feb 2007 06:06:55 -0800
From: "Ron T." <rthompson414@gmail.com>
Subject: Accessing Files through http?
Message-Id: <1172498815.439064.255010@t69g2000cwt.googlegroups.com>
I would just like to ask if there's a way I could somehow read the
contents of a text file that is posted online using Perl code? If so,
is it also possible to open the file if it has a login verification
before access? I know it might possibly involve the use of HTTP
modules, but I'm not too sure how to approach the security login
information.
If you can help out or maybe give me some pointers on where to look to
get started, I'd greatly appreciate it!
Thanks,
Ron Thompson
------------------------------
Date: 26 Feb 2007 07:12:42 -0800
From: "Paul Lalli" <mritty@gmail.com>
Subject: Re: Accessing Files through http?
Message-Id: <1172502762.867606.106050@t69g2000cwt.googlegroups.com>
On Feb 26, 9:06 am, "Ron T." <rthompson...@gmail.com> wrote:
> I would just like to ask if there's a way I could somehow read the
> contents of a text file that is posted online using Perl code?
Yes.
perl -MLWP::Simple -le'getprint("http://example.com/foo.txt");'
> If so,
> is it also possible to open the file if it has a login verification
> before access?
Yes.
http://search.cpan.org/~gaas/libwww-perl-5.805/lwpcook.pod#ACCESS_TO_PROTECTED_DOCUMENTS
Paul Lalli
------------------------------
Date: 26 Feb 2007 07:21:17 -0800
From: "gf" <greg.ferguson@icrossing.com>
Subject: Re: Accessing Files through http?
Message-Id: <1172503277.897043.104910@s48g2000cws.googlegroups.com>
On Feb 26, 7:06 am, "Ron T." <rthompson...@gmail.com> wrote:
> I would just like to ask if there's a way I could somehow read the
> contents of a text file that is posted online using Perl code? If so,
> is it also possible to open the file if it has a login verification
> before access? I know it might possibly involve the use of HTTP
> modules, but I'm not too sure how to approach the security login
> information.
Check out the LWP Perl module on CPAN, and especially read the LWP
Cookbook.
After that, check out WWW::Mechanize as it's built on LWP and will
streamline a lot of what LWP does for you.
Greg
------------------------------
Date: 26 Feb 2007 07:21:22 -0800
From: "Ron T." <rthompson414@gmail.com>
Subject: Re: Accessing Files through http?
Message-Id: <1172503282.449264.175730@z35g2000cwz.googlegroups.com>
On Feb 26, 10:12 am, "Paul Lalli" <mri...@gmail.com> wrote:
> On Feb 26, 9:06 am, "Ron T." <rthompson...@gmail.com> wrote:
>
> > I would just like to ask if there's a way I could somehow read the
> > contents of a text file that is posted online using Perl code?
>
> Yes.
>
> perl -MLWP::Simple -le'getprint("http://example.com/foo.txt");'
>
> > If so,
> > is it also possible to open the file if it has a login verification
> > before access?
>
> Yes.http://search.cpan.org/~gaas/libwww-perl-5.805/lwpcook.pod#ACCESS_TO_...
>
> Paul Lalli
Thank you for the referrals, I really appreciate it! Seems like
exactly what I need
------------------------------
Date: 26 Feb 2007 12:50:06 GMT
From: anno4000@radom.zrz.tu-berlin.de
Subject: Alan J. Flavell RIP
Message-Id: <54g3buF20b8chU1@mid.dfncis.de>
Alan J. Flavell, an esteemed poster also on clpm, has died in late 2006.
See this thread:
http://groups.google.com/group/comp.infosystems.www.authoring.html/browse_frm/thread/4fcaf97108d1268a/e5955bb960ecc8a7?#e5955bb960ecc8a7
Anno
------------------------------
Date: Mon, 26 Feb 2007 14:44:45 +0100
From: Mirco Wahab <wahab-mail@gmx.de>
Subject: Re: Alan J. Flavell RIP
Message-Id: <eruoih$2iq$1@mlucom4.urz.uni-halle.de>
anno4000@radom.zrz.tu-berlin.de wrote:
> Alan J. Flavell, an esteemed poster also on clpm, has died in late 2006.
> See this thread:
> http://groups.google.com/group/comp.infosystems.www.authoring.html/browse_frm/thread/4fcaf97108d1268a/e5955bb960ecc8a7?#e5955bb960ecc8a7
The department already killed his
account (massive bit shortage at
glasgow as it seems) and his links,
so one has to use the 'wayback machine':
http://web.archive.org/web/*/http://ppewww.ph.gla.ac.uk/~flavell/
Regards & Thanks
M.
------------------------------
Date: Mon, 26 Feb 2007 13:55:29 GMT
From: "A. Sinan Unur" <1usa@llenroc.ude.invalid>
Subject: Re: Alan J. Flavell RIP
Message-Id: <Xns98E35AC9D50D8asu1cornelledu@127.0.0.1>
anno4000@radom.zrz.tu-berlin.de wrote in
news:54g3buF20b8chU1@mid.dfncis.de:
> Alan J. Flavell, an esteemed poster also on clpm, has died in late
> 2006.
...
That really saddens me. I learned a lot from him. May he rest in peace.
Sinan
------------------------------
Date: Mon, 26 Feb 2007 20:45:12 -0600
From: Tad McClellan <tadmc@augustmail.com>
Subject: Re: Alan J. Flavell RIP
Message-Id: <slrneu76po.1it.tadmc@tadmc30.august.net>
anno4000@radom.zrz.tu-berlin.de <anno4000@radom.zrz.tu-berlin.de> wrote:
> Alan J. Flavell, an esteemed poster also on clpm, has died in late 2006.
Alan was a wise and patient man.
I repect him greatly.
My chest is tight on hearing this news.
He will be missed.
--
Tad McClellan SGML consulting
tadmc@augustmail.com Perl programming
Fort Worth, Texas
------------------------------
Date: 26 Feb 2007 16:05:53 -0800
From: "gf" <greg.ferguson@icrossing.com>
Subject: Re: Any 3270 emulation for perl yet?
Message-Id: <1172534752.982748.102830@k78g2000cwa.googlegroups.com>
> a cluster of 3270s would share a single controller/modem which would
> connect over a phone line to the mainframe. so it used some form of
> serial line at that level. there might have been some form of coax
> between the terminals and the controller. i didn't ever get into
> physical use of 3270's so i may be wrong on the wiring but the protocol
> i did know some way back when.
The protocol was SNA over coax. The controllers were prone to locking
up, causing sessions to fail on the attached terminals and forcing
tired system admins to run around looking for the appropriate box that
wasn't clicking (as it read its 8" floppy) and hit the reset switch.
I was really glad to see them go because they were so much of a pain.
These days I'd imagine most sites would have migrated to TCP/IP on VM
and would be using some variation of tn3270 or a different terminal
emulator.
>From my experience scraping 3270 screens back in the days of yore, the
big problem would be a buffer would have to be built which would
contain the screen being sent by the mainframe. Then, when the
computer said the screen was finished being written it'd send a signal
and we could scrape.
Telnet could be used, because tn3270 is basically built on telnet with
additional positioning and color codes. If the host was sending a
screen update after a clear then it should send the screen from left
to right and top to bottom... if the screen was designed that way. Of
course it could also go in any other order because of the ability to
position and print at any screen position.
As for seeing one done in Perl? I don't see why anyone would. There
are libraries and APIs available to get there from Java and C/C++ so
I'd head that way first.
------------------------------
Date: Mon, 26 Feb 2007 23:22:03 -0500
From: "John W. Kennedy" <jwkenne@attglobal.net>
Subject: Re: Any 3270 emulation for perl yet?
Message-Id: <PlOEh.669$R32.252@newsfe12.lga>
gf wrote:
>> a cluster of 3270s would share a single controller/modem which would
>> connect over a phone line to the mainframe. so it used some form of
>> serial line at that level. there might have been some form of coax
>> between the terminals and the controller. i didn't ever get into
>> physical use of 3270's so i may be wrong on the wiring but the protocol
>> i did know some way back when.
>
> The protocol was SNA over coax.
No it wasn't, at least, not in the early days; early 3270's were
channel-attached or used bisync, and even when SNA was added as an
option, SNA stopped at the controller, with the coax protocol being
proprietary. (In fact, the first SNA 3270's (the 3271-11,-12 and
3275-11,-12) stopped being SNA at the 3705; beyond that point, it used a
half-assed semi-SNA.) I think later sophistications from the mid-80's
may have employed some kind of SNA all the way, but I'm not certain.
--
John W. Kennedy
"The blind rulers of Logres
Nourished the land on a fallacy of rational virtue."
-- Charles Williams. "Taliessin through Logres: Prelude"
------------------------------
Date: Sat, 24 Feb 2007 15:24:23 +0100
From: Michele Dondi <bik.mido@tiscalinet.it>
Subject: Re: any perl tool to create a flow of perl scripts :-[ (co)
Message-Id: <3gi0u2pnideihe6jkvvbp9eav4c8fhnqkj@4ax.com>
On Sat, 24 Feb 2007 12:03:02 +0100, "john.swilting"
<john.swilting@wanadoo.fr> wrote:
>> :-[
>me, I start to improve me. I do not post any more in France. it does not
>like me
Here, instead, I bet most people like you as much as to acknowledge
your contributions to the group along the lines of acknowledged people
in
http://www.scsh.net/docu/html/man.html
Michele
--
{$_=pack'B8'x25,unpack'A8'x32,$a^=sub{pop^pop}->(map substr
(($a||=join'',map--$|x$_,(unpack'w',unpack'u','G^<R<Y]*YB='
.'KYU;*EVH[.FHF2W+#"\Z*5TI/ER<Z`S(G.DZZ9OX0Z')=~/./g)x2,$_,
256),7,249);s/[^\w,]/ /g;$ \=/^J/?$/:"\r";print,redo}#JAPH,
------------------------------
Date: Sat, 24 Feb 2007 16:09:57 +0100
From: "john.swilting" <john.swilting@wanadoo.fr>
Subject: Re: any perl tool to create a flow of perl scripts :-[ (co)
Message-Id: <45e0554d$0$5077$ba4acef3@news.orange.fr>
Michele Dondi wrote:
> Here, instead, I bet most people like you as much as to acknowledge
> your contributions to the group along the lines of acknowledged people
> in
if I can help it, I would post a solution
------------------------------
Date: Sat, 24 Feb 2007 17:56:08 +0100
From: Michele Dondi <bik.mido@tiscalinet.it>
Subject: Re: any perl tool to create a flow of perl scripts :-[ (co)
Message-Id: <6gr0u2pt66luqebckkba0dmb3lcit36sag@4ax.com>
On Sat, 24 Feb 2007 16:09:57 +0100, "john.swilting"
<john.swilting@wanadoo.fr> wrote:
>> Here, instead, I bet most people like you as much as to acknowledge
>> your contributions to the group along the lines of acknowledged people
>> in
>if I can help it, I would post a solution
If you can't help it, then do so.
If you can, please DON'T!
Michele
--
{$_=pack'B8'x25,unpack'A8'x32,$a^=sub{pop^pop}->(map substr
(($a||=join'',map--$|x$_,(unpack'w',unpack'u','G^<R<Y]*YB='
.'KYU;*EVH[.FHF2W+#"\Z*5TI/ER<Z`S(G.DZZ9OX0Z')=~/./g)x2,$_,
256),7,249);s/[^\w,]/ /g;$ \=/^J/?$/:"\r";print,redo}#JAPH,
------------------------------
Date: 24 Feb 2007 19:16:37 GMT
From: xhoster@gmail.com
Subject: Re: any perl tool to create a flow of perl scripts
Message-Id: <20070224141822.499$1y@newsreader.com>
iarunkumar@gmail.com wrote:
> We have hundreds of perl scripts being used. It's hard to debug and
> don't know the flow like which one is calling which.
How is this calling taking place?
> Is there any tool
> that creates a flow chart like giving a visual view of multiple perl
> scripts.
I'd use the system's grep, find, etc.. Or maybe Perl.
Xho
--
-------------------- http://NewsReader.Com/ --------------------
Usenet Newsgroup Service $9.95/Month 30GB
------------------------------
Date: Sat, 24 Feb 2007 20:46:01 +0100
From: Mark Clements <mark.clementsREMOVETHIS@wanadoo.fr>
Subject: Re: any perl tool to create a flow of perl scripts
Message-Id: <45e09606$0$25946$ba4acef3@news.orange.fr>
iarunkumar@gmail.com wrote:
> We have hundreds of perl scripts being used. It's hard to debug and
> don't know the flow like which one is calling which. Is there any tool
> that creates a flow chart like giving a visual view of multiple perl
> scripts.
Autodia will help you to analyse individual scripts and the modules they
use. If your applications aren't modularized at all then this is going
to be of limited value.
Mark
------------------------------
Date: 25 Feb 2007 01:49:09 -0800
From: "steve" <steven.stone4@btopenworld.com>
Subject: Re: any perl tool to create a flow of perl scripts
Message-Id: <1172396949.536035.234010@z35g2000cwz.googlegroups.com>
On Feb 24, 7:46 pm, Mark Clements <mark.clementsREMOVET...@wanadoo.fr>
wrote:
> iarunku...@gmail.com wrote:
> > We have hundreds of perl scripts being used. It's hard to debug and
> > don't know the flow like which one is calling which. Is there any tool
> > that creates a flow chart like giving a visual view of multiple perl
> > scripts.
>
> Autodia will help you to analyse individual scripts and the modules they
> use. If your applications aren't modularized at all then this is going
> to be of limited value.
>
> Mark
Hi Arun,
I'm working on something similar for testcases that have
dependancies on other testcases, build a graphical representation of
these dependancies
steve
------------------------------
Date: 26 Feb 2007 09:53:04 -0800
From: "gf" <greg.ferguson@icrossing.com>
Subject: Re: any perl tool to create a flow of perl scripts
Message-Id: <1172512384.881490.194130@p10g2000cwp.googlegroups.com>
On Feb 23, 7:50 pm, iarunku...@gmail.com wrote:
> We have hundreds of perl scripts being used. It's hard to debug and
> don't know the flow like which one is calling which. Is there any tool
> that creates a flow chart like giving a visual view of multiple perl
> scripts.
This is a messy solution, but you've already got a messy problem so it
can only help...
Write a bit of code to add a line to each of the Perl scripts that are
in your execution paths. Since you don't know for sure what's called
by what you need the line in all scripts.
That line needs to append a trace message to a single file that you
define using a date/time stamp and the name of the running program,
plus its passed in arguments. You might even want to dump the
environment too if you suspect there's significant information being
used there too.
Something like this (untested line) should work...
1 and open (my $__LOG, '>>', '/absolute/path/to/writable/log'),
print $__LOG scalar(localtime),"\t","$0 @ARGV\n",
close($__LOG);
(I wrapped the line to help it survive formatting by news browsers so
unwrap it into a single line.)
You can insert that line into your scripts by running something like
this untested and simplistic code...
#!/usr/bin/perl
use warnings;
use strict;
my $code = q{
1 and open (my $__LOG, '>>', '/absolute/path/to/writable/log'),
print $__LOG scalar(localtime),"\t$0 @ARGV\n",
close($__LOG);
};
foreach (@ARGV)
{
if ( open( my $FI, '<', $_ ) && open( my $FO, '>', "$_.new" ) )
{
while (<$FI>)
{
print $FO $code, "\n" if ( $. == 2 );
print $FO $_;
}
}
close $FO;
close $FI;
rename $_, "$_.old";
rename "$_.new", $_;
}
Then, as the application runs each script will update the log file
showing when they were called and what their parameters were.
You'll have a starting point to track down the execution flow then.
As you get things figured out or don't want something writing to the
log, change the leading 1 to a 0 in the code files you understand and
that file will 'gnore the log statement.
Just be very aware that this can create a very large log file in a
very short time, depending on the activity and structure of the
overall application.
Greg
------------------------------
Date: 26 Feb 2007 05:11:11 -0800
From: "Filippo" <filippo2991@virgilio.it>
Subject: App::Options: doesn't option_file work?
Message-Id: <1172495470.936153.292370@k78g2000cwa.googlegroups.com>
I use App::Options to manage the configuratio of my program. The main
program name is main.pl and the cofiguration file main.conf.
Everything works fine for main.pl: if main.conf is present, its
content is used to configure main.pl.
Other than main.pl, I want another program to share the main.conf
configuration file: I want second.pl to use main.conf configurations.
I inserted this into second.pl
use App::Options (
option => {
option_file => "main.conf",
dbname => { default => 'campeggio', },
dbserver => { default => 'localhost', },
printer => { default => 'PDFCreator'},
debug => { default => 0, },
},
);
but, no way. second.pl doesn't use the main.conf information.
Everything works if I copy main.conf to second.conf file. I don't want
to have two separate but identical files for configurations so I'd
want second.pl to use main.conf.
What I have to do?
Thanks,
Filippo
------------------------------
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 V11 Issue 170
**************************************