From olaf at vilerichard.com Mon Mar 1 12:22:35 2010 From: olaf at vilerichard.com (Olaf Alders) Date: Mon, 1 Mar 2010 15:22:35 -0500 Subject: [tpm] Katrik's shooter.pl modified with ball seeking action [presented during the last meeting] In-Reply-To: <4B8756A8.6020607@softwareprocess.es> References: <4B8756A8.6020607@softwareprocess.es> Message-ID: <31DE4739-27F6-454D-875D-5E437B968DBD@vilerichard.com> On 2010-02-26, at 12:05 AM, Abram Hindle wrote: > So I modified Katrik's game by adding a little dude you control with the > mouse cursor. He doddles along trying to follow your mouse cursor and > eats all balls that bump into him. As he gets fatter he gets slower so > you'd better prioritize the order of balls before he gets too slow! This is a fun modification of the game. On a related note, it would be interesting to have a follow-up SDL meeting at some point where folks could show off their new games (ball seeking and otherwise). Olaf From linux at alteeve.com Mon Mar 1 12:42:53 2010 From: linux at alteeve.com (Digimer) Date: Mon, 01 Mar 2010 15:42:53 -0500 Subject: [tpm] CPAN is down? Message-ID: <4B8C26CD.5070503@alteeve.com> Or is it just me? From mfowle at navicominc.com Mon Mar 1 12:44:29 2010 From: mfowle at navicominc.com (Mark Fowle) Date: Mon, 1 Mar 2010 15:44:29 -0500 Subject: [tpm] CPAN is down? In-Reply-To: <4B8C26CD.5070503@alteeve.com> Message-ID: <759E3F14A23281479A85A082BBCFA5427CBF9C@sbsa.NavicomInc.local> Cpan is more than one computer. search.cpan.org is up for me. www.cpan.org is also up for me. -----Original Message----- From: toronto-pm-bounces+mfowle=navicominc.com at pm.org [mailto:toronto-pm-bounces+mfowle=navicominc.com at pm.org] On Behalf Of Digimer Sent: Monday, March 01, 2010 3:43 PM To: Toronto Perl Mongers Subject: [tpm] CPAN is down? Or is it just me? _______________________________________________ toronto-pm mailing list toronto-pm at pm.org http://mail.pm.org/mailman/listinfo/toronto-pm From linux at alteeve.com Mon Mar 1 12:47:47 2010 From: linux at alteeve.com (Digimer) Date: Mon, 01 Mar 2010 15:47:47 -0500 Subject: [tpm] CPAN is down? In-Reply-To: <4B8C26CD.5070503@alteeve.com> References: <4B8C26CD.5070503@alteeve.com> Message-ID: <4B8C27F3.7040403@alteeve.com> On 10-03-01 03:42 PM, Digimer wrote: > Or is it just me? Strike that, it's back. From adam.prime at utoronto.ca Mon Mar 1 12:47:48 2010 From: adam.prime at utoronto.ca (Adam Prime) Date: Mon, 01 Mar 2010 15:47:48 -0500 Subject: [tpm] CPAN is down? In-Reply-To: <4B8C26CD.5070503@alteeve.com> References: <4B8C26CD.5070503@alteeve.com> Message-ID: <4B8C27F4.8000202@utoronto.ca> search.cpan.org and www.cpan.org are both working fine for me. Digimer wrote: > Or is it just me? > _______________________________________________ > toronto-pm mailing list > toronto-pm at pm.org > http://mail.pm.org/mailman/listinfo/toronto-pm From thakore.kartik at gmail.com Mon Mar 1 13:57:55 2010 From: thakore.kartik at gmail.com (Kartik Thakore) Date: Mon, 1 Mar 2010 16:57:55 -0500 Subject: [tpm] Katrik's shooter.pl modified with ball seeking action [presented during the last meeting] In-Reply-To: <31DE4739-27F6-454D-875D-5E437B968DBD@vilerichard.com> References: <4B8756A8.6020607@softwareprocess.es> <31DE4739-27F6-454D-875D-5E437B968DBD@vilerichard.com> Message-ID: <3A80081E-8F04-4D01-9303-7F4D38CD7BD9@gmail.com> That would be nice! I am up for it! I will even post new games on sdl.perl.org . Kartik Thakore On 2010-03-01, at 3:22 PM, Olaf Alders wrote: > On 2010-02-26, at 12:05 AM, Abram Hindle wrote: > >> So I modified Katrik's game by adding a little dude you control >> with the >> mouse cursor. He doddles along trying to follow your mouse cursor and >> eats all balls that bump into him. As he gets fatter he gets slower >> so >> you'd better prioritize the order of balls before he gets too slow! > > This is a fun modification of the game. On a related note, it would > be interesting to have a follow-up SDL meeting at some point where > folks could show off their new games (ball seeking and otherwise). > > Olaf > > > _______________________________________________ > toronto-pm mailing list > toronto-pm at pm.org > http://mail.pm.org/mailman/listinfo/toronto-pm From mike at stok.ca Mon Mar 1 17:32:11 2010 From: mike at stok.ca (Mike Stok) Date: Mon, 1 Mar 2010 20:32:11 -0500 Subject: [tpm] Katrik's shooter.pl modified with ball seeking action [presented during the last meeting] In-Reply-To: <3A80081E-8F04-4D01-9303-7F4D38CD7BD9@gmail.com> References: <4B8756A8.6020607@softwareprocess.es> <31DE4739-27F6-454D-875D-5E437B968DBD@vilerichard.com> <3A80081E-8F04-4D01-9303-7F4D38CD7BD9@gmail.com> Message-ID: <5A7171C1-0701-47A1-BA53-A778608D2D71@stok.ca> On Mar 1, 2010, at 4:57 PM, Kartik Thakore wrote: > That would be nice! I am up for it! I will even post new games on sdl.perl.org. How long do you think is a reasonable gap? Maybe having half the April meeting for games would be soon enough for SDL to still be fresh in our minds? That would make a smaller slot for the other presenter(s) to fill. Mike > > Kartik Thakore > > On 2010-03-01, at 3:22 PM, Olaf Alders wrote: > >> On 2010-02-26, at 12:05 AM, Abram Hindle wrote: >> >>> So I modified Katrik's game by adding a little dude you control with the >>> mouse cursor. He doddles along trying to follow your mouse cursor and >>> eats all balls that bump into him. As he gets fatter he gets slower so >>> you'd better prioritize the order of balls before he gets too slow! >> >> This is a fun modification of the game. On a related note, it would be interesting to have a follow-up SDL meeting at some point where folks could show off their new games (ball seeking and otherwise). >> >> Olaf >> >> >> _______________________________________________ >> toronto-pm mailing list >> toronto-pm at pm.org >> http://mail.pm.org/mailman/listinfo/toronto-pm > _______________________________________________ > toronto-pm mailing list > toronto-pm at pm.org > http://mail.pm.org/mailman/listinfo/toronto-pm -- Mike Stok http://www.stok.ca/~mike/ The "`Stok' disclaimers" apply. From linux at alteeve.com Mon Mar 1 17:49:26 2010 From: linux at alteeve.com (Digimer) Date: Mon, 01 Mar 2010 20:49:26 -0500 Subject: [tpm] Implementing a 'less' like pager in perl Message-ID: <4B8C6EA6.7000500@alteeve.com> Hi all, I like to have built-in '--help' messages in some of my programs, but am always at a loss for how to allow the user to page through it. Usually I have a message at the bottom akin to; "Please call './foo --help |less' to make reading this help message easier". That screams of "cop-out" though. I know I could use perldoc, but I don't like assuming that my user knows anything about perl. I've already got code to handle line wrapping and indenting lines. I just need some way to stop my output after X number of lines, where X is the terminal's number of rows, and then take the up and down arrows to scoll up and down through the message, with ESC or Q exiting. Any tips/pointers? Thanks! From jkeen at verizon.net Mon Mar 1 18:58:41 2010 From: jkeen at verizon.net (James E Keenan) Date: Mon, 01 Mar 2010 21:58:41 -0500 Subject: [tpm] Implementing a 'less' like pager in perl In-Reply-To: <4B8C6EA6.7000500@alteeve.com> References: <4B8C6EA6.7000500@alteeve.com> Message-ID: <4DC24393-0CE2-452F-A2E9-D0E85455B33E@verizon.net> On Mar 1, 2010, at 8:49 PM, Digimer wrote: > Hi all, > > I like to have built-in '--help' messages in some of my programs, > but am always at a loss for how to allow the user to page through > it. Usually I have a message at the bottom akin to; "Please call './ > foo --help |less' to make reading this help message easier". ... > > I know I could use perldoc, but I don't like assuming that my > user knows anything about perl. > If you "usually" tell the user to call './foo -- help | less', then it stands to reason your user is familiar with the Unix command-line. In which case, instructing them to call 'perldoc ./foo' is not much of a stretch. Or, you could create 'man' pages for your programs. They, too, automatically include paging. If you wrote POD for your programs, you could use 'pod2man' to generate the man pages. (And I have a CPAN distribution, Pod-Multi, that will let you generate documentation from POD simultaneously to text, man and HTML format.) Jim Keenan From sfryer at sourcery.ca Mon Mar 1 19:16:23 2010 From: sfryer at sourcery.ca (Shaun Fryer) Date: Mon, 1 Mar 2010 22:16:23 -0500 Subject: [tpm] Implementing a 'less' like pager in perl In-Reply-To: <4DC24393-0CE2-452F-A2E9-D0E85455B33E@verizon.net> References: <4B8C6EA6.7000500@alteeve.com> <4DC24393-0CE2-452F-A2E9-D0E85455B33E@verizon.net> Message-ID: <982579711003011916g2153d326tb1700f3083707776@mail.gmail.com> The hackish way to do it would be to simply call the pager for them... my $pager = $ENV{PAGER} || 'most' || 'less' || 'more'; if ($argv0_is_help) { if ( the_pager_exists_on_their_system($pager) ) { system "perl $0 --helpless | $pager"; } else { print help() and exit; } } if ($argv0_is_helpless) { print help(); } Or something like that... You could probably write something up in curses, but (apart from legitimate security issue) ... why reinvent the wheel? -- Shaun Fryer On Mon, Mar 1, 2010 at 9:58 PM, James E Keenan wrote: > > On Mar 1, 2010, at 8:49 PM, Digimer wrote: > >> Hi all, >> >> ?I like to have built-in '--help' messages in some of my programs, but am >> always at a loss for how to allow the user to page through it. Usually I >> have a message at the bottom akin to; "Please call './foo --help |less' to >> make reading this help message easier". > > ... > >> >> ?I know I could use perldoc, but I don't like assuming that my user knows >> anything about perl. >> > > If you "usually" tell the user to call './foo -- help | less', then it > stands to reason your user is familiar with the Unix command-line. > > In which case, instructing them to call 'perldoc ./foo' is not much of a > stretch. > > Or, you could create 'man' pages for your programs. ?They, too, > automatically include paging. > > If you wrote POD for your programs, you could use 'pod2man' to generate the > man pages. ?(And I have a CPAN distribution, Pod-Multi, that will let you > generate documentation from POD simultaneously to text, man and HTML > format.) > > Jim Keenan > _______________________________________________ > toronto-pm mailing list > toronto-pm at pm.org > http://mail.pm.org/mailman/listinfo/toronto-pm > From thakore.kartik at gmail.com Tue Mar 2 07:02:40 2010 From: thakore.kartik at gmail.com (Kartik Thakore) Date: Tue, 2 Mar 2010 10:02:40 -0500 Subject: [tpm] Katrik's shooter.pl modified with ball seeking action [presented during the last meeting] In-Reply-To: <5A7171C1-0701-47A1-BA53-A778608D2D71@stok.ca> References: <4B8756A8.6020607@softwareprocess.es> <31DE4739-27F6-454D-875D-5E437B968DBD@vilerichard.com> <3A80081E-8F04-4D01-9303-7F4D38CD7BD9@gmail.com> <5A7171C1-0701-47A1-BA53-A778608D2D71@stok.ca> Message-ID: <10C16B3E-B094-4C12-8ABB-DA945145C433@gmail.com> Sure that is fine by me! Kartik Thakore On 2010-03-01, at 8:32 PM, Mike Stok wrote: > > On Mar 1, 2010, at 4:57 PM, Kartik Thakore wrote: > >> That would be nice! I am up for it! I will even post new games on sdl.perl.org >> . > > How long do you think is a reasonable gap? Maybe having half the > April meeting for games would be soon enough for SDL to still be > fresh in our minds? > > That would make a smaller slot for the other presenter(s) to fill. > > Mike > >> >> Kartik Thakore >> >> On 2010-03-01, at 3:22 PM, Olaf Alders wrote: >> >>> On 2010-02-26, at 12:05 AM, Abram Hindle wrote: >>> >>>> So I modified Katrik's game by adding a little dude you control >>>> with the >>>> mouse cursor. He doddles along trying to follow your mouse cursor >>>> and >>>> eats all balls that bump into him. As he gets fatter he gets >>>> slower so >>>> you'd better prioritize the order of balls before he gets too slow! >>> >>> This is a fun modification of the game. On a related note, it >>> would be interesting to have a follow-up SDL meeting at some point >>> where folks could show off their new games (ball seeking and >>> otherwise). >>> >>> Olaf >>> >>> >>> _______________________________________________ >>> toronto-pm mailing list >>> toronto-pm at pm.org >>> http://mail.pm.org/mailman/listinfo/toronto-pm >> _______________________________________________ >> toronto-pm mailing list >> toronto-pm at pm.org >> http://mail.pm.org/mailman/listinfo/toronto-pm > > -- > > Mike Stok > http://www.stok.ca/~mike/ > > The "`Stok' disclaimers" apply. > > > > From ejanev at gmail.com Tue Mar 2 08:10:09 2010 From: ejanev at gmail.com (Emil Janev) Date: Tue, 2 Mar 2010 11:10:09 -0500 Subject: [tpm] Fwd: Implementing a 'less' like pager in perl In-Reply-To: References: <4B8C6EA6.7000500@alteeve.com> Message-ID: ---------- Forwarded message ---------- From: Emil Janev Date: Tue, Mar 2, 2010 at 11:07 AM Subject: Re: [tpm] Implementing a 'less' like pager in perl To: Digimer You could check Pod::Usage module which is in the Perl core for some time. http://perldoc.perl.org/Pod/Usage.html The examples there are pretty much clear. To get the paging: pod2usage(-verbose => 2) will print what "perldoc program_name" will print, paging included with it. -- Emil On Mon, Mar 1, 2010 at 8:49 PM, Digimer wrote: > Hi all, > > I like to have built-in '--help' messages in some of my programs, but am > always at a loss for how to allow the user to page through it. Usually I > have a message at the bottom akin to; "Please call './foo --help |less' to > make reading this help message easier". That screams of "cop-out" though. > > I know I could use perldoc, but I don't like assuming that my user knows > anything about perl. > > I've already got code to handle line wrapping and indenting lines. I just > need some way to stop my output after X number of lines, where X is the > terminal's number of rows, and then take the up and down arrows to scoll up > and down through the message, with ESC or Q exiting. > > Any tips/pointers? > > Thanks! > > _______________________________________________ > toronto-pm mailing list > toronto-pm at pm.org > http://mail.pm.org/mailman/listinfo/toronto-pm > -- Emil Janev -- Emil Janev -------------- next part -------------- An HTML attachment was scrubbed... URL: From mike at stok.ca Thu Mar 4 10:38:47 2010 From: mike at stok.ca (Mike Stok) Date: Thu, 4 Mar 2010 13:38:47 -0500 Subject: [tpm] March meeting - soliciting speakers Message-ID: This month's meeting is in three weeks, and so far we have a short warm-up presentation lined up. Do any of you have any Perl related presentations, talks, observations, diatribes that you'd like to deliver? If so, let me know (on or off list.) Mike -- Mike Stok http://www.stok.ca/~mike/ The "`Stok' disclaimers" apply. -------------- next part -------------- An HTML attachment was scrubbed... URL: From mike at stok.ca Tue Mar 9 04:12:28 2010 From: mike at stok.ca (Mike Stok) Date: Tue, 9 Mar 2010 07:12:28 -0500 Subject: [tpm] Fwd: [pm_groups] Fwd: Calling All Google Summer of Code Mentors References: <201003090832.03503.Richard.Foley@rfi.net> Message-ID: <246AD1A2-969B-47BE-B092-7FCFB3FE1356@stok.ca> Begin forwarded message: > From: Richard Foley > Date: March 9, 2010 3:32:03 AM EST > To: "London.pm Perl M[ou]ngers" , Mongers Perl MUC > Subject: Fwd: [pm_groups] Fwd: Calling All Google Summer of Code Mentors > Reply-To: Richard.Foley at rfi.net, "London.pm Perl M\[ou\]ngers" > > > Please forward this to your local groups and help spread the word this > month about getting involved in Google Summer of Code. > > http://www.perlfoundation.org/perl5/index.cgi?gsoc_perlmongers > > -- > Richard Foley > Ciao - shorter than aufwiedersehen > > http://www.rfi.net/ > > ---------- Forwarded Message ---------- > > Subject: [pm_groups] Fwd: Calling All Google Summer of Code Mentors > Date: Tuesday 09 March 2010 > From: Eric Wilhelm > To: PM Groups > > Hi all, > > Please forward this to your local groups and help spread the word this > month about getting involved in Google Summer of Code. > > http://www.perlfoundation.org/perl5/index.cgi?gsoc_perlmongers > > Thanks, > Eric > ---------- Forwarded Message: ---------- > > Subject: Calling All Google Summer of Code Mentors > Date: Monday 08 March 2010 > From: Jonathan Leto > To: Portland Perl Mongers > > Howdy, > > I am working on the application for The Perl Foundation and Parrot > Foundation to participate in Google Summer of Code 2010 [0]. GSoC is a > program where Google funds eligible students to hack on open source > projects for a summer. It is a great opportunity for the students and > the communities that mentor them. You also may be interested in this > summary of our involvement last year [1]. Our application will be > submitted by the end of this week. > > Please join us in getting prepared for this year. There is a page for > possible mentors to volunteer [2]* as well as a page for project ideas > [3]. If you would like to help with the wiki, our main GSoC page [4] > is the best place to start. You are also invited to join our mailing > list [5] and come ask question in #soc-help on irc.perl.org . > > Thanks! > > Duke > > [0] http://socghop.appspot.com/ > [1] > http://google-opensource.blogspot.com/2009/10/perls-of-wisdom-perl-foundation-parrots.html > [2] http://www.perlfoundation.org/perl5/index.cgi?gsoc_mentors > [3] http://www.perlfoundation.org/perl5/index.cgi?gsoc_2010_projects > [4] http://www.perlfoundation.org/perl5/index.cgi?gsoc > [5] http://groups.google.com/group/tpf-gsoc > > * If you listed yourself as a mentor last year and you are not > interested this year, please remove yourself from the page. > > -- > Jonathan "Duke" Leto > jonathan at leto.net > http://leto.net > -- > Request pm.org Technical Support via support at pm.org > > pm_groups mailing list > pm_groups at pm.org > http://mail.pm.org/mailman/listinfo/pm_groups > > ------------------------------------------------------- -- Mike Stok http://www.stok.ca/~mike/ The "`Stok' disclaimers" apply. -------------- next part -------------- An HTML attachment was scrubbed... URL: From arocker at vex.net Tue Mar 9 05:55:32 2010 From: arocker at vex.net (arocker at vex.net) Date: Tue, 9 Mar 2010 08:55:32 -0500 Subject: [tpm] Fwd: [pm_groups] Fwd: Calling All Google Summer of Code Mentors Message-ID: Is there anybody involved with the Google Summer of Code project who could talk to us about it? If this month's meeting is too late for applications this year, would it be possible to talk about the projects chosen? Perhaps we should pencil in a talk in January or February next year, to prepare 2011's crop? From mike at stok.ca Tue Mar 9 10:18:54 2010 From: mike at stok.ca (Mike Stok) Date: Tue, 9 Mar 2010 13:18:54 -0500 Subject: [tpm] Fwd: [pm_groups] Fwd: Calling All Google Summer of Code Mentors In-Reply-To: References: Message-ID: <57ED2E18-2EAB-41A7-9A6D-2B9DDD9247FA@stok.ca> On Mar 9, 2010, at 8:55 AM, arocker at vex.net wrote: > > Is there anybody involved with the Google Summer of Code project who could > talk to us about it? > > If this month's meeting is too late for applications this year, would it > be possible to talk about the projects chosen? > > Perhaps we should pencil in a talk in January or February next year, to > prepare 2011's crop? I think that putting something for discussing GSoC in the January 2011 meeting slot is a great idea. I'll do that. Thanks, Mike -- Mike Stok http://www.stok.ca/~mike/ The "`Stok' disclaimers" apply. From bobby.lopez at gmail.com Wed Mar 10 12:42:04 2010 From: bobby.lopez at gmail.com (J. Bobby Lopez) Date: Wed, 10 Mar 2010 15:42:04 -0500 Subject: [tpm] Question on CPAN modules and eliminating multiple installs Message-ID: Hi All, I have several applications installed on multiple servers, and many of them are using many of the same modules (both CPAN modules and custom modules). I'm looking at ways of reducing or eliminating this duplication of code across systems - or failing that, implementing a way for the applications to rsync a central modules repository over to the local system on a regular basis. What I'm looking for is the ability to grab modules from a remote system which are currently not installed on the local system, and stuffing them away in some non-root directory (e.g: ~/perl/local_modules/CPAN/, ~/perl/local_modules/CUSTOM/). Basically only grabbing the modules I need for a given server, and not everything available on the remote central modules repository. Before I get ahead of myself and start designing this from scratch for my own purposes, I'm curious if there are any modules or tools that TPM's are currently using to do the same thing. I've looked at some modules like Mini CPAN, but they seem to be attempting to implement a CPAN mirror of some kind, whereas I'm trying to implement a local repository of modules which are already installed and ready for use. Thanks, Bobby -------------- next part -------------- An HTML attachment was scrubbed... URL: From olaf at vilerichard.com Wed Mar 10 12:48:02 2010 From: olaf at vilerichard.com (Olaf Alders) Date: Wed, 10 Mar 2010 15:48:02 -0500 Subject: [tpm] Question on CPAN modules and eliminating multiple installs In-Reply-To: References: Message-ID: <4816C18D-7E7F-42B3-B1FA-801D846E3BBA@vilerichard.com> On 2010-03-10, at 3:42 PM, J. Bobby Lopez wrote: > Hi All, > > I have several applications installed on multiple servers, and many of them are using many of the same modules (both CPAN modules and custom modules). > > I'm looking at ways of reducing or eliminating this duplication of code across systems - or failing that, implementing a way for the applications to rsync a central modules repository over to the local system on a regular basis. > > What I'm looking for is the ability to grab modules from a remote system which are currently not installed on the local system, and stuffing them away in some non-root directory (e.g: ~/perl/local_modules/CPAN/, ~/perl/local_modules/CUSTOM/). Basically only grabbing the modules I need for a given server, and not everything available on the remote central modules repository. > > Before I get ahead of myself and start designing this from scratch for my own purposes, I'm curious if there are any modules or tools that TPM's are currently using to do the same thing. > > I've looked at some modules like Mini CPAN, but they seem to be attempting to implement a CPAN mirror of some kind, whereas I'm trying to implement a local repository of modules which are already installed and ready for use. > > Thanks, > Bobby > _______________________________________________ I haven't actually used it myself, but ShipWright may suit your needs: http://search.cpan.org/perldoc?Shipwright Best, Olaf From jztam at yahoo.com Wed Mar 10 14:19:29 2010 From: jztam at yahoo.com (J Z Tam) Date: Wed, 10 Mar 2010 14:19:29 -0800 (PST) Subject: [tpm] Question on CPAN modules and eliminating multiple installs In-Reply-To: References: Message-ID: <668354.33530.qm@web57616.mail.re1.yahoo.com> Hey JBL, I've had good results disting a centralized perl server instance successfully using the docs in: http://www.penguin-inc.com/BMRCCUG/download/Interop4.htm This requires some intermediate SDLC disting theory and install permissions on various servers in your farm. The wins are: 1. centralized major/minor version control of the interpreter. Theoretically, since I've only installed the next higher Major version of the interpreter, thus testing 5.next with the existing module collection that we are currently running at 5.current. 2. centralized modules version-ing control. So in order to dist out multiple versions of the same [modules, packages, libs] from CPAN or localKeyboards, you will likely need to NAME the version of each module you 'require' or 'use' e.g. use Win32::Process-0.13; use TPM::getPerlServerInfo-0.13; versus use Win32::Process-0.14; use TPM::getPerlServerInfo-0.15; The calling sequence will also need some changing, depending how you spawn the script: e.g. from crontab or the shell: \\newPerlServer\pathto\Perl\bin\perl -w \\localServer\path\to\local\src\perl\myTestProgram.pl or \\newPerlServer\pathto\Perl586\bin\perl -w \\localServer\path\to\local\src\perl\myTestProgram.pl or \\newPerlServer\pathto\Perl511\bin\perl -w \\localServer\path\to\local\src\perl\myTestProgram.pl In a 'real' dev shop, you might dist and run everything from *nix and have afs,dfs,nfs in place so you could cron/schedule/autosys, symlink, log, etc. e.g. using ksh to fire it up using SheBang notation from within: #!/pathtobin/ksh -- # -*- perl -*- with the appropriate munging of the env var for this ksh user. hth, /jordan ________________________________ From: J. Bobby Lopez To: Toronto Perl Mongers Sent: Wed, March 10, 2010 3:42:04 PM Subject: [tpm] Question on CPAN modules and eliminating multiple installs Hi All, I have several applications installed on multiple servers, and many of them are using many of the same modules (both CPAN modules and custom modules). I'm looking at ways of reducing or eliminating this duplication of code across systems - or failing that, implementing a way for the applications to rsync a central modules repository over to the local system on a regular basis. What I'm looking for is the ability to grab modules from a remote system which are currently not installed on the local system, and stuffing them away in some non-root directory (e.g: ~/perl/local_modules/CPAN/, ~/perl/local_modules/CUSTOM/). Basically only grabbing the modules I need for a given server, and not everything available on the remote central modules repository. Before I get ahead of myself and start designing this from scratch for my own purposes, I'm curious if there are any modules or tools that TPM's are currently using to do the same thing. I've looked at some modules like Mini CPAN, but they seem to be attempting to implement a CPAN mirror of some kind, whereas I'm trying to implement a local repository of modules which are already installed and ready for use. Thanks, Bobby __________________________________________________________________ The new Internet Explorer? 8 - Faster, safer, easier. Optimized for Yahoo! Get it Now for Free! at http://downloads.yahoo.com/ca/internetexplorer/ -------------- next part -------------- An HTML attachment was scrubbed... URL: From mike at stok.ca Thu Mar 11 10:18:00 2010 From: mike at stok.ca (Mike Stok) Date: Thu, 11 Mar 2010 13:18:00 -0500 Subject: [tpm] March speaker(s) still wanted Message-ID: <0A0E1949-A31E-4231-83EF-858A715C8294@stok.ca> We have a couple of people lined up with short presentations, is there anyone out there who would feel inspired to do a "March Madness" talk? Mike -- Mike Stok http://www.stok.ca/~mike/ The "`Stok' disclaimers" apply. -------------- next part -------------- An HTML attachment was scrubbed... URL: From jbl at jbldata.com Thu Mar 11 10:44:49 2010 From: jbl at jbldata.com (J. Bobby Lopez) Date: Thu, 11 Mar 2010 13:44:49 -0500 Subject: [tpm] Question on CPAN modules and eliminating multiple installs In-Reply-To: <668354.33530.qm@web57616.mail.re1.yahoo.com> References: <668354.33530.qm@web57616.mail.re1.yahoo.com> Message-ID: Thanks for the responses, much appreciated. I'll take a look at both and see if either fits with what I'm looking for. On Wed, Mar 10, 2010 at 5:19 PM, J Z Tam wrote: > Hey JBL, > I've had good results disting a centralized perl server instance > successfully using the docs in: > http://www.penguin-inc.com/BMRCCUG/download/Interop4.htm > > This requires some intermediate SDLC disting theory and install permissions > on various servers in your farm. > The wins are: > 1. centralized major/minor version control of the interpreter. > Theoretically, since I've only installed the next higher Major version of > the interpreter, thus testing 5.next with the existing module collection > that we are currently running at 5.current. > 2. centralized modules version-ing control. So in order to dist out > multiple versions of the same [modules, packages, libs] from CPAN or > localKeyboards, you will likely need to NAME the version of each module you > 'require' or 'use' > e.g. use Win32::Process-0.13; > use TPM::getPerlServerInfo-0.13; > versus > use Win32::Process-0.14; > use TPM::getPerlServerInfo-0.15; > > The calling sequence will also need some changing, depending how you spawn > the script: > e.g. from crontab or the shell: > \\newPerlServer\pathto\Perl\bin\perl -w > \\localServer\path\to\local\src\perl\myTestProgram.pl > or > \\newPerlServer\pathto\Perl586\bin\perl -w > \\localServer\path\to\local\src\perl\myTestProgram.pl > or > \\newPerlServer\pathto\Perl511\bin\perl -w > \\localServer\path\to\local\src\perl\myTestProgram.pl > In a 'real' dev shop, you might dist and run everything from *nix and have > afs,dfs,nfs in place so you could cron/schedule/autosys, symlink, log, etc. > e.g. using ksh to fire it up using SheBang notation from within: > #!/pathtobin/ksh -- # -*- perl -*- > with the appropriate munging of the env var for this ksh user. > hth, /jordan > > > > ------------------------------ > *From:* J. Bobby Lopez > *To:* Toronto Perl Mongers > *Sent:* Wed, March 10, 2010 3:42:04 PM > *Subject:* [tpm] Question on CPAN modules and eliminating multiple > installs > > Hi All, > > I have several applications installed on multiple servers, and many of them > are using many of the same modules (both CPAN modules and custom modules). > > I'm looking at ways of reducing or eliminating this duplication of code > across systems - or failing that, implementing a way for the applications to > rsync a central modules repository over to the local system on a regular > basis. > > What I'm looking for is the ability to grab modules from a remote system > which are currently not installed on the local system, and stuffing them > away in some non-root directory (e.g: ~/perl/local_modules/CPAN/, > ~/perl/local_modules/CUSTOM/). Basically only grabbing the modules I need > for a given server, and not everything available on the remote central > modules repository. > > Before I get ahead of myself and start designing this from scratch for my > own purposes, I'm curious if there are any modules or tools that TPM's are > currently using to do the same thing. > > I've looked at some modules like Mini CPAN, but they seem to be attempting > to implement a CPAN mirror of some kind, whereas I'm trying to implement a > local repository of modules which are already installed and ready for use. > > Thanks, > Bobby > > ------------------------------ > The new Internet Explorer? 8 - Faster, safer, easier. Optimized for Yahoo! > *Get it Now for Free!* > -------------- next part -------------- An HTML attachment was scrubbed... URL: From fulko.hew at gmail.com Mon Mar 15 18:47:40 2010 From: fulko.hew at gmail.com (Fulko Hew) Date: Mon, 15 Mar 2010 21:47:40 -0400 Subject: [tpm] how to detect ICMP 'port unreachable'? Message-ID: <8204a4fe1003151847r1e4bd28fwd23b889c297a9845@mail.gmail.com> Does anyone know what I can do to detect an unreachable UDP port? The application uses UDP to talk to the remote system. Just a simple send/receive pair. But if the 'other end's application isn't there, ie, no listener, then the remote host returns an ICMP message saying the port is unreachable. Trouble is that I can't seem to see that as an error response to either the send, or receive or select (looking at the 'error' bit list). BTW. I'm not allowed to send or receive any other messages, only check the return values for the normal transactions, send(), receive(), select(), or possibly check some status that might be buried somewhere within the system. Does anyone have any ideas? Thanks Fulko -------------- next part -------------- An HTML attachment was scrubbed... URL: From hanker at ifdsgroup.com Mon Mar 15 20:24:16 2010 From: hanker at ifdsgroup.com (hanker at ifdsgroup.com) Date: Mon, 15 Mar 2010 23:24:16 -0400 Subject: [tpm] how to detect ICMP 'port unreachable'? Message-ID: AfaIk, No err checking is avail on that level. I suggest go one or two levels up in osi and negotiate protocol (I assume you have picked one already?), eg: hello, wait for hello in return, sending xxx bytes, wait for go ahead in return... So on. Herman ----- Original Message ----- From: Fulko Hew [fulko.hew at gmail.com] Sent: 03/15/2010 09:47 PM AST To: TPM Subject: [tpm] how to detect ICMP 'port unreachable'? Does anyone know what I can do to detect an unreachable UDP port? The application uses UDP to talk to the remote system. Just a simple send/receive pair. But if the 'other end's application isn't there, ie, no listener, then the remote host returns an ICMP message saying the port is unreachable. Trouble is that I can't seem to see that as an error response to either the send, or receive or select (looking at the 'error' bit list). BTW. I'm not allowed to send or receive any other messages, only check the return values for the normal transactions, send(), receive(), select(), or possibly check some status that might be buried somewhere within the system. Does anyone have any ideas? Thanks Fulko ----------------------------------------- Please consider the environment before printing this email and any attachments. This e-mail and any attachments are intended only for the individual or company to which it is addressed and may contain information which is privileged, confidential and prohibited from disclosure or unauthorized use under applicable law. If you are not the intended recipient of this e-mail, you are hereby notified that any use, dissemination, or copying of this e-mail or the information contained in this e-mail is strictly prohibited by the sender. If you have received this transmission in error, please return the material received to the sender and delete all copies from your system. -------------- next part -------------- An HTML attachment was scrubbed... URL: -------------- next part -------------- _______________________________________________ toronto-pm mailing list toronto-pm at pm.org http://mail.pm.org/mailman/listinfo/toronto-pm ----------------------------------------- Please consider the environment before printing this email and any attachments. This e-mail and any attachments are intended only for the individual or company to which it is addressed and may contain information which is privileged, confidential and prohibited from disclosure or unauthorized use under applicable law. If you are not the intended recipient of this e-mail, you are hereby notified that any use, dissemination, or copying of this e-mail or the information contained in this e-mail is strictly prohibited by the sender. If you have received this transmission in error, please return the material received to the sender and delete all copies from your system. From fulko.hew at gmail.com Mon Mar 15 21:47:56 2010 From: fulko.hew at gmail.com (Fulko Hew) Date: Tue, 16 Mar 2010 00:47:56 -0400 Subject: [tpm] how to detect ICMP 'port unreachable'? In-Reply-To: References: Message-ID: <8204a4fe1003152147i7689415cl5ce832201607f1cd@mail.gmail.com> On Mon, Mar 15, 2010 at 11:24 PM, wrote: > > AfaIk, > No err checking is avail on that level. I suggest go one or two levels up > in osi and negotiate protocol (I assume you have picked one already?), eg: > hello, wait for hello in return, sending xxx bytes, wait for go ahead in > return... So on > Nope... can't... Its SNMP and I'm querying a remote address. The address exists, but there is no SNMP daemon on the std port. so I query, and the remote end returns 'no port'. Since the ICMP isn't returned upstream, SNMP assumes a 'no response', times out, and retries. ... All this time wasted retrying when the system already told us there was no one there! There has to be a better way! Fulko -------------- next part -------------- An HTML attachment was scrubbed... URL: From thakore.kartik at gmail.com Tue Mar 16 05:28:57 2010 From: thakore.kartik at gmail.com (Kartik Thakore) Date: Tue, 16 Mar 2010 08:28:57 -0400 Subject: [tpm] how to detect ICMP 'port unreachable'? In-Reply-To: <8204a4fe1003152147i7689415cl5ce832201607f1cd@mail.gmail.com> References: <8204a4fe1003152147i7689415cl5ce832201607f1cd@mail.gmail.com> Message-ID: <17304965-0836-43B0-9E17-15C81C3A9A55@gmail.com> Hi Fulko, Have you tried NetPacket::ICMP? I have used this module before to decode ICMP packets and get data based on their ICMP code. ICMP_UNREACH is the code you want. Kartik Thakore On 2010-03-16, at 12:47 AM, Fulko Hew wrote: > > > On Mon, Mar 15, 2010 at 11:24 PM, wrote: > > AfaIk, > No err checking is avail on that level. I suggest go one or two > levels up in osi and negotiate protocol (I assume you have picked > one already?), eg: hello, wait for hello in return, sending xxx > bytes, wait for go ahead in return... So on > > > Nope... can't... Its SNMP and I'm querying a remote address. > The address exists, but there is no SNMP daemon on the std port. > so I query, and the remote end returns 'no port'. Since the ICMP > isn't returned > upstream, SNMP assumes a 'no response', times out, and retries. > > ... All this time wasted retrying when the system already told us > there was no one there! > > There has to be a better way! > > Fulko > > _______________________________________________ > toronto-pm mailing list > toronto-pm at pm.org > http://mail.pm.org/mailman/listinfo/toronto-pm -------------- next part -------------- An HTML attachment was scrubbed... URL: From thakore.kartik at gmail.com Tue Mar 16 06:53:12 2010 From: thakore.kartik at gmail.com (Kartik Thakore) Date: Tue, 16 Mar 2010 13:53:12 +0000 Subject: [tpm] how to detect ICMP 'port unreachable'? In-Reply-To: <17304965-0836-43B0-9E17-15C81C3A9A55@gmail.com> References: <8204a4fe1003152147i7689415cl5ce832201607f1cd@mail.gmail.com> <17304965-0836-43B0-9E17-15C81C3A9A55@gmail.com> Message-ID: <20100316135312.GA6026@kasdlperl.ath.cx> Hi Fulko, Something like this perhaps. Haven't tested it. Cheers! __PERL__ use strict; use Net::Pcap; use NetPacket::ICMP qw/ICMP_UNREACH/; my $err = ''; my $dev = Net::Pcap::pcap_lookupdev(\$err); die $err if $err; my $pcap = Net::Pcap::pcap_open_live($dev, 1024,1,0,\$err); die $err if $err; sub process_pkt { my( $user_data, $header, $packet) = @_; my $icmp_obj = NetPacket::ICMP->decode($packet); warn 'ICMP UNREACH CODE CAUGHT' if ($icmp_obj->type == ICMP_UNREACH); } Net::Pcap::pcap_loop($pcap, 10, \&process_pkt, "Demo"); Net::Pcap::pcap_close($pcap); __END_PERL__ From fulko.hew at gmail.com Tue Mar 16 07:19:42 2010 From: fulko.hew at gmail.com (Fulko Hew) Date: Tue, 16 Mar 2010 10:19:42 -0400 Subject: [tpm] how to detect ICMP 'port unreachable'? In-Reply-To: <20100316135312.GA6026@kasdlperl.ath.cx> References: <8204a4fe1003152147i7689415cl5ce832201607f1cd@mail.gmail.com> <17304965-0836-43B0-9E17-15C81C3A9A55@gmail.com> <20100316135312.GA6026@kasdlperl.ath.cx> Message-ID: <8204a4fe1003160719l8aeb501l37645a53a195da14@mail.gmail.com> On Tue, Mar 16, 2010 at 9:53 AM, Kartik Thakore wrote: > Hi Fulko, > > Have you tried NetPacket::ICMP? I have used this module before to decode > ICMP packets and get data based on their ICMP code. ICMP_UNREACH is the code > you want. > I looked at that last night. It provides a way to decode packets, but my confusion lies in, how would I (easily) get the packet to decode... while I was in the middle of actually attempting to receive the actual application data. (I will however, investigate further.) ... snip ... > use Net::Pcap; > ... snip ... Yes, I had thought of that, but running a packet sniffer is a 'hell of an overkill' to determine something (that in retrospect) should have been reported back to the application (somehow). So far, all I seem to have is an application level timeout. -------------- next part -------------- An HTML attachment was scrubbed... URL: From thakore.kartik at gmail.com Tue Mar 16 07:52:48 2010 From: thakore.kartik at gmail.com (Kartik Thakore) Date: Tue, 16 Mar 2010 10:52:48 -0400 Subject: [tpm] how to detect ICMP 'port unreachable'? In-Reply-To: <8204a4fe1003160719l8aeb501l37645a53a195da14@mail.gmail.com> References: <8204a4fe1003152147i7689415cl5ce832201607f1cd@mail.gmail.com> <17304965-0836-43B0-9E17-15C81C3A9A55@gmail.com> <20100316135312.GA6026@kasdlperl.ath.cx> <8204a4fe1003160719l8aeb501l37645a53a195da14@mail.gmail.com> Message-ID: <1D2721FB-43B3-47D5-8036-3DC4EC45B2C4@gmail.com> Or you can process the output of ping: http://inetdaemon.com/tutorials/troubleshooting/tools/ping/index.html see the link PING response type codes Kartik Thakore On 2010-03-16, at 10:19 AM, Fulko Hew wrote: > > > On Tue, Mar 16, 2010 at 9:53 AM, Kartik Thakore > wrote: > Hi Fulko, > > Have you tried NetPacket::ICMP? I have used this module before to > decode ICMP packets and get data based on their ICMP code. > ICMP_UNREACH is the code you want. > > I looked at that last night. It provides a way to decode packets, but > my confusion lies in, how would I (easily) get the packet to > decode... > while I was in the middle of actually attempting to receive the actual > application data. (I will however, investigate further.) > > ... snip ... > > use Net::Pcap; > > ... snip ... > > Yes, I had thought of that, but running a packet sniffer is a 'hell > of an overkill' > to determine something (that in retrospect) should have been > reported back > to the application (somehow). > > So far, all I seem to have is an application level timeout. > > > _______________________________________________ > toronto-pm mailing list > toronto-pm at pm.org > http://mail.pm.org/mailman/listinfo/toronto-pm -------------- next part -------------- An HTML attachment was scrubbed... URL: From fulko.hew at gmail.com Tue Mar 16 08:21:50 2010 From: fulko.hew at gmail.com (Fulko Hew) Date: Tue, 16 Mar 2010 11:21:50 -0400 Subject: [tpm] how to detect ICMP 'port unreachable'? In-Reply-To: <1D2721FB-43B3-47D5-8036-3DC4EC45B2C4@gmail.com> References: <8204a4fe1003152147i7689415cl5ce832201607f1cd@mail.gmail.com> <17304965-0836-43B0-9E17-15C81C3A9A55@gmail.com> <20100316135312.GA6026@kasdlperl.ath.cx> <8204a4fe1003160719l8aeb501l37645a53a195da14@mail.gmail.com> <1D2721FB-43B3-47D5-8036-3DC4EC45B2C4@gmail.com> Message-ID: <8204a4fe1003160821j20de0ce8p384e30e6aa5947ee@mail.gmail.com> On Tue, Mar 16, 2010 at 10:52 AM, Kartik Thakore wrote: > Or you can process the output of ping: > > http://inetdaemon.com/tutorials/troubleshooting/tools/ping/index.html > The problem with this approach is that it too is independent of the actual transactions that may exhibit the problem. Ie. If you ping the device first, that doesn't mean that you won't get an 'unreachable' moments later during the numerous subsequent transactions. And to perform a ping right in front of each of those transactions is mega-overkill. And then finally, why do an extra ping to tickle a response, when the actual transaction will generate the response itself! (Its just a matter of being able to retrieve/extract it from the system. Its just that doing with the ping approach proabably means that you have an 'raw' level path open, and you are doing the ICMP protocol (send) stuff all yourself, and that enables you to do the ICMP receive too. What I really need is a way that the application still does its high level stuff, but also 'register a listener' for potential ICMP (low) level messages. -------------- next part -------------- An HTML attachment was scrubbed... URL: From thakore.kartik at gmail.com Tue Mar 16 08:30:38 2010 From: thakore.kartik at gmail.com (Kartik Thakore) Date: Tue, 16 Mar 2010 11:30:38 -0400 Subject: [tpm] how to detect ICMP 'port unreachable'? In-Reply-To: <8204a4fe1003160821j20de0ce8p384e30e6aa5947ee@mail.gmail.com> References: <8204a4fe1003152147i7689415cl5ce832201607f1cd@mail.gmail.com> <17304965-0836-43B0-9E17-15C81C3A9A55@gmail.com> <20100316135312.GA6026@kasdlperl.ath.cx> <8204a4fe1003160719l8aeb501l37645a53a195da14@mail.gmail.com> <1D2721FB-43B3-47D5-8036-3DC4EC45B2C4@gmail.com> <8204a4fe1003160821j20de0ce8p384e30e6aa5947ee@mail.gmail.com> Message-ID: <378CA429-1E8C-464E-A174-66A7B04A3380@gmail.com> To get the low kevel ICMP messages short of a packet listener you will need to write some c level socket, then do XS to get it in perl. Kartik Thakore On 2010-03-16, at 11:21 AM, Fulko Hew wrote: > > > On Tue, Mar 16, 2010 at 10:52 AM, Kartik Thakore > wrote: > Or you can process the output of ping: > > http://inetdaemon.com/tutorials/troubleshooting/tools/ping/index.html > > The problem with this approach is that it too is independent of the > actual > transactions that may exhibit the problem. > > Ie. If you ping the device first, that doesn't mean that you won't > get > an 'unreachable' moments later during the numerous subsequent > transactions. And to perform a ping right in front of each of those > transactions is mega-overkill. And then finally, why do an extra > ping to > tickle a response, when the actual transaction will generate the > response itself! > (Its just a matter of being able to retrieve/extract it from the > system. > > Its just that doing with the ping approach proabably means that you > have > an 'raw' level path open, and you are doing the ICMP protocol (send) > stuff all yourself, and that enables you to do the ICMP receive too. > > What I really need is a way that the application still does its high > level stuff, but also 'register a listener' for potential ICMP (low) > level > messages. > > > > > _______________________________________________ > toronto-pm mailing list > toronto-pm at pm.org > http://mail.pm.org/mailman/listinfo/toronto-pm -------------- next part -------------- An HTML attachment was scrubbed... URL: From fulko.hew at gmail.com Tue Mar 16 09:17:27 2010 From: fulko.hew at gmail.com (Fulko Hew) Date: Tue, 16 Mar 2010 12:17:27 -0400 Subject: [tpm] how to detect ICMP 'port unreachable'? In-Reply-To: <378CA429-1E8C-464E-A174-66A7B04A3380@gmail.com> References: <8204a4fe1003152147i7689415cl5ce832201607f1cd@mail.gmail.com> <17304965-0836-43B0-9E17-15C81C3A9A55@gmail.com> <20100316135312.GA6026@kasdlperl.ath.cx> <8204a4fe1003160719l8aeb501l37645a53a195da14@mail.gmail.com> <1D2721FB-43B3-47D5-8036-3DC4EC45B2C4@gmail.com> <8204a4fe1003160821j20de0ce8p384e30e6aa5947ee@mail.gmail.com> <378CA429-1E8C-464E-A174-66A7B04A3380@gmail.com> Message-ID: <8204a4fe1003160917w6dcf7383of5de94ef357944bc@mail.gmail.com> On Tue, Mar 16, 2010 at 11:30 AM, Kartik Thakore wrote: > To get the low kevel ICMP messages short of a packet listener you will need > to write some c level socket, then do XS to get it in perl. > But the Perl/CPAN people keep saying... 'everything you can possible want has already (probably) been written, and is available as a CPAN module.' :-) I can probably open some kind of raw ICMP protocol socket and add it to the select() list the app already has. ... The devil is in the details. -------------- next part -------------- An HTML attachment was scrubbed... URL: From stuart at morungos.com Tue Mar 16 09:56:46 2010 From: stuart at morungos.com (Stuart Watt) Date: Tue, 16 Mar 2010 12:56:46 -0400 Subject: [tpm] how to detect ICMP 'port unreachable'? In-Reply-To: <8204a4fe1003160917w6dcf7383of5de94ef357944bc@mail.gmail.com> References: <8204a4fe1003152147i7689415cl5ce832201607f1cd@mail.gmail.com> <17304965-0836-43B0-9E17-15C81C3A9A55@gmail.com> <20100316135312.GA6026@kasdlperl.ath.cx> <8204a4fe1003160719l8aeb501l37645a53a195da14@mail.gmail.com> <1D2721FB-43B3-47D5-8036-3DC4EC45B2C4@gmail.com> <8204a4fe1003160821j20de0ce8p384e30e6aa5947ee@mail.gmail.com> <378CA429-1E8C-464E-A174-66A7B04A3380@gmail.com> <8204a4fe1003160917w6dcf7383of5de94ef357944bc@mail.gmail.com> Message-ID: <4B9FB84E.1060902@morungos.com> Fulko Hew wrote: > > I can probably open some kind of raw ICMP protocol socket and add > it to the select() list the app already has. ... The devil is in the > details. > I haven't done raw socket stuff for years, but the following URL looks like it might be a start. It's in C, but all the functions are the standard socket ones built into Perl, so it should be straightforward to adapt. http://www.planet-lab.org/raw_sockets/api_icmp.html All the best Stuart -------------- next part -------------- An HTML attachment was scrubbed... URL: From linux at alteeve.com Wed Mar 17 11:11:42 2010 From: linux at alteeve.com (Digimer) Date: Wed, 17 Mar 2010 14:11:42 -0400 Subject: [tpm] Question of the day Message-ID: <4BA11B5E.6070605@alteeve.com> 'Alo all, I need to "tail -f" a file, and I've accomplished that using this: my $log_file="/some/file.txt"; my $read=IO::Handle->new(); open ($read, "<$log_file") || die "Failed to open log file: [$log_file], error: $!\n"; # while (<$read>) for (;;) { my $curpos; for ($curpos = tell($read); <$read>; $curpos = tell($read)) { # search for some stuff and put it into files chomp; print "line: [$_]\n"; } # sleep for a while sleep 1; seek($read, $curpos, 0); # seek to where we had been } That's pretty much verbatim from the FAQ, but it's a resource hog, relatively speaking. Is there way to make the loop event driven by chance? Basically, I need to watch a log file and update a database when an entry is written. To complicate matters, the log file is cycled each night, so it would need to be able to handle the position being reset to 0. Thanks all! -- Digimer E-Mail: linux at alteeve.com AN!Whitepapers: http://alteeve.com Node Assassin: http://nodeassassin.org From fulko.hew at gmail.com Wed Mar 17 11:40:11 2010 From: fulko.hew at gmail.com (Fulko Hew) Date: Wed, 17 Mar 2010 14:40:11 -0400 Subject: [tpm] Question of the day In-Reply-To: <4BA11B5E.6070605@alteeve.com> References: <4BA11B5E.6070605@alteeve.com> Message-ID: <8204a4fe1003171140y87bc32fob80c1803c6e3917f@mail.gmail.com> On Wed, Mar 17, 2010 at 2:11 PM, Digimer wrote: > 'Alo all, > > I need to "tail -f" a file, and I've accomplished that using this: > ... snip ... Although I can't really help on the issue your asking, I can (possibly) throw in another monkey-wrench... Another thing to consider is: 'what happens when the logfile you're watching is rotated out from underneath you?' You sort of need to check that the inode hasn't changed and reopen, etc. it it has. Fulko -------------- next part -------------- An HTML attachment was scrubbed... URL: From stuart at morungos.com Wed Mar 17 11:48:54 2010 From: stuart at morungos.com (Stuart Watt) Date: Wed, 17 Mar 2010 14:48:54 -0400 Subject: [tpm] Question of the day In-Reply-To: <4BA11B5E.6070605@alteeve.com> References: <4BA11B5E.6070605@alteeve.com> Message-ID: <4BA12416.7050505@morungos.com> Digimer wrote: > 'Alo all, > > ... > > Basically, I need to watch a log file and update a database when an > entry is written. To complicate matters, the log file is cycled each > night, so it would need to be able to handle the position being reset > to 0. File::Tail is supposed to do all this. I never used it (tests failed on Windows) and there are some reports of it also being resource hungry, but it was designed to handle logs being rolled over, etc. All the best Stuart -- Stuart Watt ARM Product Developer Information Balance -------------- next part -------------- An HTML attachment was scrubbed... URL: From indy at indigostar.com Thu Mar 18 14:53:16 2010 From: indy at indigostar.com (Indy Singh) Date: Thu, 18 Mar 2010 17:53:16 -0400 Subject: [tpm] What does this line of Perl code mean? References: <4BA11B5E.6070605@alteeve.com> <4BA12416.7050505@morungos.com> Message-ID: <979EDCD43CC14E249C050B5FA33C7331@ROADKILL> Hi all, What does the following line of code mean and why is it needed? local $SIG{__WARN__} = \&dirty; It is part of Acme::Bleach which is below. For bonus points what is the purpose of $tie? package Acme::Bleach; $VERSION = '1.12'; my $tie = " \t"x8; sub whiten { local $_ = unpack "b*", pop; tr/01/ \t/; s/(.{9})/$1\n/g; $tie.$_ } sub brighten { local $_ = pop; s/^$tie|[^ \t]//g; tr/ \t/01/; pack "b*", $_ } sub dirty { $_[0] =~ /\S/ } sub dress { $_[0] =~ /^$tie/ } open 0 or print "Can't rebleach '$0'\n" and exit; (my $shirt = join "", <0>) =~ s/.*^\s*use\s+Acme::Bleach\s*;\n//sm; local $SIG{__WARN__} = \&dirty; do {eval brighten $shirt; exit} unless dirty $shirt && not dress $shirt; open 0, ">$0" or print "Cannot bleach '$0'\n" and exit; print {0} "use Acme::Bleach;\n", whiten $shirt and exit; __END__ Indy Singh IndigoSTAR Software -- www.indigostar.com From linux at alteeve.com Thu Mar 18 15:02:42 2010 From: linux at alteeve.com (Digimer) Date: Thu, 18 Mar 2010 18:02:42 -0400 Subject: [tpm] What does this line of Perl code mean? In-Reply-To: <979EDCD43CC14E249C050B5FA33C7331@ROADKILL> References: <4BA11B5E.6070605@alteeve.com> <4BA12416.7050505@morungos.com> <979EDCD43CC14E249C050B5FA33C7331@ROADKILL> Message-ID: <4BA2A302.50400@alteeve.com> On 10-03-18 05:53 PM, Indy Singh wrote: > Hi all, > > What does the following line of code mean and why is it needed? > local $SIG{__WARN__} = \&dirty; When the program catches a SIGWARN signal, it calls the 'dirty' function. -- Digimer E-Mail: linux at alteeve.com AN!Whitepapers: http://alteeve.com Node Assassin: http://nodeassassin.org From uri at StemSystems.com Thu Mar 18 15:12:04 2010 From: uri at StemSystems.com (Uri Guttman) Date: Thu, 18 Mar 2010 18:12:04 -0400 Subject: [tpm] What does this line of Perl code mean? In-Reply-To: <979EDCD43CC14E249C050B5FA33C7331@ROADKILL> (Indy Singh's message of "Thu\, 18 Mar 2010 17\:53\:16 -0400") References: <4BA11B5E.6070605@alteeve.com> <4BA12416.7050505@morungos.com> <979EDCD43CC14E249C050B5FA33C7331@ROADKILL> Message-ID: <87eijhl1or.fsf@quad.sysarch.com> >>>>> "IS" == Indy Singh writes: IS> What does the following line of code mean and why is it needed? IS> local $SIG{__WARN__} = \&dirty; dirty() is a boolean test so that does nothing other than to quiet warnings. they may be triggered in the eval or even elsewhere in this module. IS> It is part of Acme::Bleach which is below. IS> For bonus points what is the purpose of $tie? it is a whitespace marker that says whether this source file has been bleached or not. dress() tests for it and whiten() prepends it to the source. brighten (which unbleaches) removes the leading $tie. uri -- Uri Guttman ------ uri at stemsystems.com -------- http://www.sysarch.com -- ----- Perl Code Review , Architecture, Development, Training, Support ------ --------- Gourmet Hot Cocoa Mix ---- http://bestfriendscocoa.com --------- From mike at stok.ca Thu Mar 18 16:23:31 2010 From: mike at stok.ca (Mike Stok) Date: Thu, 18 Mar 2010 19:23:31 -0400 Subject: [tpm] Thursday 25 March meeting Message-ID: The Toronto Perl Mongers meeting is taking place next Thursday. http://to.pm.org/ will be updated when I know the room & floor. Mike Date: Thu 25 Mar 2010 18:45 EDT Venue: Nexient Topic: March Madness This month we have a few talks for your delight. The first is a quick introdcution to OPENapps, and then a dose of Perl mayhem, and then a look at some of the modules Richard Dice has been using lately. Kristan "Krispy" Uccello: An introduction to OPENapps Imagine you create a web application and had the ability to sell it to many web site owners on the internet. Now imagine you could sell it without giving up the source code. OPENapps makes this happen. OPENapps is a powerful language agnostic platform allowing you to offer up web applications to a wide audience of website owners. OPENapps takes care of the things that developers typically find boring or repetitious such as billing and tracking; while at the same time providing robust technology for integration of your applications with content publishers sites. OPENapps is offering a limited developer beta to web developers who demonstrate that they have a killer app idea and a desire to implement it. Mark Jubenville: Perl Mayhem A little delayed gratification from last year's Lightning Talks. Richard Dice: Show & Tell - Modules Richard is using A look at some of the things Richard is working with these days, including Coro, AnyEvent and the daemonization of Perl code. Meetings We normally hold meetings on the last Thursday of each month. These meetings range from a single Perl theme to code reviews to rambling free-for-all discussions of things Perlish. We occasionally have meetings with special guests lecturing on or teaching about their specialties. After the meeting we usually go out for food and drinks. Perl hackers of all skill levels are invited. Location: 2 Bloor Street West, (usually) 8th or 16th floor. The room number will be announced on the mailing list a few days before the meeting. It will also be left with the security desk in the building (main floor lobby) shortly before the meeting starts (i.e. around 6pm). Time: 6:45 p.m. Directions: This building is on the north-west corner of Bloor and Yonge, accessible by subway from Bloor station. Pay parking is also ample in this area. Security note: The elevators in the building are "locked down" after 5:30pm to people without building access cards. Leading up to the meeting someone will come down to the main floor lobby every few minutes to ferry people upstairs. There will be a number of scheduled trips: ? 17:30 ? 18:00 ? 18:30 ? 18:45 ? 19:00 After 19:00, you can reach the access-card-carrying guy via a cell phone number that we'll leave with security in the front lobby. The room and floor numbers will be left with security too. If any latecomers call up there will be a final group elevator run at 19:10. After that, access will be ad-hoc; call up from security and somebody will try to come down and let you up. -- Mike Stok http://www.stok.ca/~mike/ The "`Stok' disclaimers" apply. -------------- next part -------------- An HTML attachment was scrubbed... URL: From sergio at salvi.ca Thu Mar 18 17:50:43 2010 From: sergio at salvi.ca (Sergio Salvi) Date: Thu, 18 Mar 2010 20:50:43 -0400 Subject: [tpm] What does this line of Perl code mean? In-Reply-To: <87eijhl1or.fsf@quad.sysarch.com> References: <4BA11B5E.6070605@alteeve.com> <4BA12416.7050505@morungos.com> <979EDCD43CC14E249C050B5FA33C7331@ROADKILL> <87eijhl1or.fsf@quad.sysarch.com> Message-ID: <568473411003181750o1c74c5a6p83d918104470cf2d@mail.gmail.com> Talk about *clean* code :-P On Thu, Mar 18, 2010 at 6:12 PM, Uri Guttman wrote: >>>>>> "IS" == Indy Singh writes: > > ?IS> What does the following line of code mean and why is it needed? > ?IS> local $SIG{__WARN__} = \&dirty; > > dirty() is a boolean test so that does nothing other than to quiet > warnings. they may be triggered in the eval or even elsewhere in this > module. > ?IS> It is part of Acme::Bleach which is below. > > ?IS> For bonus points what is the purpose of $tie? > > it is a whitespace marker that says whether this source file has been > bleached or not. dress() tests for it and whiten() prepends it to the > source. brighten (which unbleaches) removes the leading $tie. > > uri > > -- > Uri Guttman ?------ ?uri at stemsystems.com ?-------- ?http://www.sysarch.com -- > ----- ?Perl Code Review , Architecture, Development, Training, Support ------ > --------- ?Gourmet Hot Cocoa Mix ?---- ?http://bestfriendscocoa.com --------- > _______________________________________________ > toronto-pm mailing list > toronto-pm at pm.org > http://mail.pm.org/mailman/listinfo/toronto-pm > From matt at sergeant.org Fri Mar 19 08:24:55 2010 From: matt at sergeant.org (Matt Sergeant) Date: Fri, 19 Mar 2010 11:24:55 -0400 Subject: [tpm] Question of the day In-Reply-To: <4BA11B5E.6070605@alteeve.com> References: <4BA11B5E.6070605@alteeve.com> Message-ID: <4BA39747.4090603@sergeant.org> What platform? There's a tail.pl example in the IO::KQueue distro. But it only works on platforms with kqueue. Digimer wrote: > That's pretty much verbatim from the FAQ, but it's a resource hog, > relatively speaking. Is there way to make the loop event driven by > chance? From mike at stok.ca Thu Mar 25 06:59:38 2010 From: mike at stok.ca (Mike Stok) Date: Thu, 25 Mar 2010 09:59:38 -0400 Subject: [tpm] March meeting tonight Message-ID: This month's meeting is tonight. See http://to.pm.org/ for details. Mike Date: Thu 25 Mar 2010 18:45 EDT Venue: Nexient; Room 2 on the 12th floor Topic: March Madness This month we have a few talks for your delight. The first is a quick introdcution to OPENapps, and then a dose of Perl mayhem, and then a look at some of the modules Richard Dice has been using lately. Kristan "Krispy" Uccello: An introduction to OPENapps Imagine you create a web application and had the ability to sell it to many web site owners on the internet. Now imagine you could sell it without giving up the source code. OPENapps makes this happen. OPENapps is a powerful language agnostic platform allowing you to offer up web applications to a wide audience of website owners. OPENapps takes care of the things that developers typically find boring or repetitious such as billing and tracking; while at the same time providing robust technology for integration of your applications with content publishers sites. OPENapps is offering a limited developer beta to web developers who demonstrate that they have a killer app idea and a desire to implement it. Mark Jubenville: Perl Mayhem A little delayed gratification from last year's Lightning Talks. Richard Dice: Show & Tell - Modules Richard is using A look at some of the things Richard is working with these days, including Coro, AnyEvent and the daemonization of Perl code. Meetings We normally hold meetings on the last Thursday of each month. These meetings range from a single Perl theme to code reviews to rambling free-for-all discussions of things Perlish. We occasionally have meetings with special guests lecturing on or teaching about their specialties. After the meeting we usually go out for food and drinks. Perl hackers of all skill levels are invited. Location: 2 Bloor Street West, (usually) 8th or 16th floor. The room number will be announced on the mailing list a few days before the meeting. It will also be left with the security desk in the building (main floor lobby) shortly before the meeting starts (i.e. around 6pm). Time: 6:45 p.m. Directions: This building is on the north-west corner of Bloor and Yonge, accessible by subway from Bloor station. Pay parking is also ample in this area. Security note: The elevators in the building are "locked down" after 5:30pm to people without building access cards. Leading up to the meeting someone will come down to the main floor lobby every few minutes to ferry people upstairs. There will be a number of scheduled trips: ? 17:30 ? 18:00 ? 18:30 ? 18:45 ? 19:00 After 19:00, you can reach the access-card-carrying guy via a cell phone number that we'll leave with security in the front lobby. The room and floor numbers will be left with security too. If any latecomers call up there will be a final group elevator run at 19:10. After that, access will be ad-hoc; call up from security and somebody will try to come down and let you up. -- Mike Stok http://www.stok.ca/~mike/ The "`Stok' disclaimers" apply. -------------- next part -------------- An HTML attachment was scrubbed... URL: From arocker at vex.net Wed Mar 31 13:17:40 2010 From: arocker at vex.net (arocker at vex.net) Date: Wed, 31 Mar 2010 16:17:40 -0400 Subject: [tpm] Inflated Job Definitions Message-ID: <9001c66b4c176b9c76331e3189bc07c0.squirrel@webmail.vex.net> "Software engineer" is a fancy term for "code monkey". "Software Designer" seems to mean "code monkey without a spec to follow". Courtesy of brian d. foy: http://www.perlmonks.org/?node_id=445845