From scott at illogics.org Tue Jul 13 22:52:21 2004 From: scott at illogics.org (Scott Walters) Date: Mon Aug 2 21:35:06 2004 Subject: [Phoenix-pm] Perl 5.8.5 presentation Message-ID: <20040714035221.GM21852@illogics.org> ----- Forwarded message from Paul Fenwick ----- ID: <40F4A890.6010604@perltraining.com.au> List: contact perl5-porters-help@perl.org; run by ezmlm Encoding: 7bit Status: No, hits=-4.9 required=8.0 post: By: la.mx.develooper.com Supports: pgp-inline, pgp-mime Type: text/plain; charset=us-ascii; format=flowed Spam-Index: 0 Filter-Rule: Archive: help: Organization: Perl Training Australia Agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-GB; rv:1.7) Gecko/20040616 Received: from onion.perl.org (onion.develooper.com [63.251.223.166]) (qmail 91963 invoked by uid 1005); 14 Jul 2004 03:29:20 -0000 (qmail 91944 invoked from network); 14 Jul 2004 03:29:20 -0000 Fog-Index: 8.884 Subject: Perl 5.8.5 presentation Language: en-us, en Rating: onion.develooper.com 1.6.2 0/1000/N unsubscribe: Date: Wed, 14 Jul 2004 13:29:20 +1000 Version: 1.0 0.84.1.0 Precedence: bulk To: "mailing list perl5-porters@perl.org perl5-porters@perl.org Perl 5 Porters" From: Paul Fenwick G'day everyone, I'm doing a brief presentation at Melbourne.PM tonight on what's new in Perl 5.8.5. It's roughly the same content as the perldelta, but made up into little slides and with splashes of colour here and there. It's not the most exciting talk talk in the world, but I figured that as Melb.PM won't be the only Perl Mongers group that tries to do a "What new in 5.8.x" each new release. As such, the presentation has been released under the GPL/Artistic license, and is available from: http://perltraining.com.au/talks/ Hopefully this will save other people a bit of work when it comes to doing their own presentations. It's available in OpenOffice and PDF format. Cheerio, Paul -- Paul Fenwick | http://perltraining.com.au/ Director of Training | Ph: +61 3 9354 6001 Perl Training Australia | Fax: +61 3 9354 2681 ----- End forwarded message ----- From friedman at highwire.stanford.edu Fri Jul 16 15:01:22 2004 From: friedman at highwire.stanford.edu (Michael Friedman) Date: Mon Aug 2 21:35:06 2004 Subject: [Phoenix-pm] Perl 5.8.5 presentation Message-ID: It's an interesting slideshow. I find it's always good to know the highlights of new versions, so I can see if it's worth the effort to upgrade. Word of warning, though: the author uses 'gay' as a pejorative. If that offends you as much as it does me, you should probably read another summary of the changes. -- Mike On Jul 13, 2004, at 8:52 PM, Scott Walters wrote: > ----- Forwarded message from Paul Fenwick > ----- > > > G'day everyone, > > I'm doing a brief presentation at Melbourne.PM tonight on what's new in > Perl 5.8.5. It's roughly the same content as the perldelta, but made > up > into little slides and with splashes of colour here and there. > > It's not the most exciting talk talk in the world, but I figured that > as > Melb.PM won't be the only Perl Mongers group that tries to do a "What > new in 5.8.x" each new release. As such, the presentation has been > released under the GPL/Artistic license, and is available from: > > http://perltraining.com.au/talks/ > > Hopefully this will save other people a bit of work when it comes to > doing their own presentations. > > It's available in OpenOffice and PDF format. > > Cheerio, > > Paul > > -- > Paul Fenwick | http://perltraining.com.au/ > Director of Training | Ph: +61 3 9354 6001 > Perl Training Australia | Fax: +61 3 9354 2681 > > > ----- End forwarded message ----- > _______________________________________________ > Phoenix-pm mailing list > Phoenix-pm@pm.org > http://www.pm.org/mailman/listinfo/phoenix-pm > --------------------------------------------------------------------- Michael Friedman HighWire Press, Stanford Southwest Phone: 480-456-0880 Tempe, Arizona FAX: 270-721-8034 --------------------------------------------------------------------- From scott at illogics.org Thu Jul 22 15:48:49 2004 From: scott at illogics.org (Scott Walters) Date: Mon Aug 2 21:35:06 2004 Subject: [Phoenix-pm] [perl #30778] localizing $foo, then glob-aliasing to an LVALUE segfaults when trying to restore. Message-ID: <20040722204849.GE21852@illogics.org> Oooh, another coredumper! -scott ----- Forwarded message from perl5-porters-return-93306-scott=slowass.net@perl.org perlbug-followup@perl.org Thu Jul 22 05: 21: 50 2004 James Mastros ----- ID: List: contact perl5-porters-help@perl.org; run by ezmlm CC: james@mastros.biz Checked: Checked Encoding: utf-8 NewTicket: yes Status: No, hits=-11.8 required=8.0 No, hits=-6.2 required=7.0 Originator: james@mastros.biz post: By: la.mx.develooper.com x1.develooper.com Type: text/plain; charset="utf-8" Spam-Index: -4.8 Filter-Rule: Archive: help: Received: from onion.perl.org (onion.develooper.com [63.251.223.166]) (qmail 14150 invoked by uid 1005); 22 Jul 2004 12:24:08 -0000 (qmail 13409 invoked from network); 22 Jul 2004 12:21:57 -0000 Fog-Index: 7.433 Ticket: perl #30778 Id: <200407221223.i6MCNjI01480@slowass.net> Subject: [perl #30778] localizing $foo, then glob-aliasing to an LVALUE segfaults when trying to restore. Rating: onion.develooper.com 1.6.2 0/1000/N unsubscribe: Date: Thu, 22 Jul 2004 05:23:45 -0700 (PDT) 22 Jul 2004 12:21:43 -0000 by: RT 3.0.11 (http://www.bestpractical.com/rt/) Version: 1.0 Prevention: perl Precedence: bulk To: "mailing list perl5-porters@perl.org moderator for perl5-porters@perl.org perl5-porters@perl.org rt-perl5-testers@x1.develooper.com bugs-perl5-testers@netlabs.develooper.com bugs-bitbucket@netlabs.develooper.com perl5-porters@perl.org perl5-porters@perl.or" , perl5-porters@perl.org From: perl5-porters-return-93306-scott=slowass.net@perl.org perlbug-followup@perl.org Thu Jul 22 05: 21: 50 2004 James Mastros # New Ticket Created by James Mastros # Please include the string: [perl #30778] # in the subject line of all future correspondence about this issue. # This is a bug report for perl from james@mastros.biz, generated with the help of perlbug 1.35 running under perl v5.8.4. ----------------------------------------------------------------- [Please enter your report here] Hello, everybody. I was recently playing with LVALUEs trying to get exercise 2 of http://perlmonks.org/?node=how's+your+perl?+(II), and managed to get perl to segfault. While I was doing strange things with it at the time, a segfault isn't a good response, ever. Code: #!/usr/bin/perl use warnings; use Devel::Peek; $|=1; { local $foo; # Local *foo instead, and it works. my $x; # Only to shut up warnings -- both lexical and global $x exhibit this behavior *foo=\pos($x); # Neccessary Dump *foo; print "Got here\n"; } print "Got here\n"; __DATA__ Output: SV = PVGV(0x8192ef8) at 0x8164ee0 REFCNT = 5 FLAGS = (GMG,SMG,MULTI,IN_PAD) IV = 0 NV = 0 MAGIC = 0x8190960 MG_VIRTUAL = &PL_vtbl_glob MG_TYPE = PERL_MAGIC_glob(*) MG_OBJ = 0x8164ee0 NAME = "foo" NAMELEN = 3 GvSTASH = 0x814cb48 "main" GP = 0x8192f30 SV = 0x8164f40 REFCNT = 1 IO = 0x0 FORM = 0x0 AV = 0x0 HV = 0x0 CV = 0x0 CVGEN = 0x0 GPFLAGS = 0x0 LINE = 7 FILE = "howsyourperl2.pl_segfault" FLAGS = 0xa EGV = 0x8164ee0 "foo" Got here Note the lack of the second "Got here" line. Backtrace: (gdb) bt #0 0x080b27ce in Perl_magic_setpos () #1 0x080af335 in Perl_mg_set () #2 0x080e76d0 in Perl_leave_scope () #3 0x080e5fac in Perl_pop_scope () #4 0x080ecfb4 in Perl_pp_leaveloop () #5 0x080bbbb9 in Perl_runops_standard () #6 0x080635e8 in perl_run () #7 0x080633f5 in perl_run () #8 0x0805fb9f in main () Sorry, I don't have a 5.8.5 or debugging perl handy -- let me know if either is neccessary. Thanks! -=- James Mastros, theorbtwo [Please do not change anything below this line] ----------------------------------------------------------------- --- Flags: category=core severity=low --- Site configuration information for perl v5.8.4: Configured by Debian Project at Wed May 12 00:32:16 EST 2004. Summary of my perl5 (revision 5 version 8 subversion 4) configuration: Platform: osname=linux, osvers=2.4.26-ti1211, archname=i386-linux-thread-multi uname='linux kosh 2.4.26-ti1211 #1 sat apr 24 14:46:58 est 2004 i686 gnulinux ' config_args='-Dusethreads -Duselargefiles -Dccflags=-DDEBIAN -Dcccdlflags=-fPIC -Darchname=i386-linux -Dprefix=/usr -Dprivlib=/usr/share/perl/5.8 -Darchlib=/usr/lib/perl/5.8 -Dvendorprefix=/usr -Dvendorlib=/usr/share/perl5 -Dvendorarch=/usr/lib/perl5 -Dsiteprefix=/usr/local -Dsitelib=/usr/local/share/perl/5.8.4 -Dsitearch=/usr/local/lib/perl/5.8.4 -Dman1dir=/usr/share/man/man1 -Dman3dir=/usr/share/man/man3 -Dsiteman1dir=/usr/local/man/man1 -Dsiteman3dir=/usr/local/man/man3 -Dman1ext=1 -Dman3ext=3perl -Dpager=/usr/bin/sensible-pager -Uafs -Ud_csh -Uusesfio -Uusenm -Duseshrplib -Dlibperl=libperl.so.5.8.4 -Dd_dosuid -des' hint=recommended, useposix=true, d_sigaction=define usethreads=define use5005threads=undef useithreads=define usemultiplicity=define useperlio=define d_sfio=undef uselargefiles=define usesocks=undef use64bitint=undef use64bitall=undef uselongdouble=undef usemymalloc=n, bincompat5005=undef Compiler: cc='cc', ccflags ='-D_REENTRANT -D_GNU_SOURCE -DTHREADS_HAVE_PIDS -DDEBIAN -fno-strict-aliasing -I/usr/local/include -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64', optimize='-O2', cppflags='-D_REENTRANT -D_GNU_SOURCE -DTHREADS_HAVE_PIDS -DDEBIAN -fno-strict-aliasing -I/usr/local/include' ccversion='', gccversion='3.3.3 (Debian 20040429)', gccosandvers='' intsize=4, longsize=4, ptrsize=4, doublesize=8, byteorder=1234 d_longlong=define, longlongsize=8, d_longdbl=define, longdblsize=12 ivtype='long', ivsize=4, nvtype='double', nvsize=8, Off_t='off_t', lseeksize=8 alignbytes=4, prototype=define Linker and Libraries: ld='cc', ldflags =' -L/usr/local/lib' libpth=/usr/local/lib /lib /usr/lib libs=-lgdbm -lgdbm_compat -ldb -ldl -lm -lpthread -lc -lcrypt perllibs=-ldl -lm -lpthread -lc -lcrypt libc=/lib/libc-2.3.2.so, so=so, useshrplib=true, libperl=libperl.so.5.8.4 gnulibc_version='2.3.2' Dynamic Linking: dlsrc=dl_dlopen.xs, dlext=so, d_dlsymun=undef, ccdlflags='-Wl,-E' cccdlflags='-fPIC', lddlflags='-shared -L/usr/local/lib' Locally applied patches: --- @INC for perl v5.8.4: /etc/perl /usr/local/lib/perl/5.8.4 /usr/local/share/perl/5.8.4 /usr/lib/perl5 /usr/share/perl5 /usr/lib/perl/5.8 /usr/share/perl/5.8 /usr/local/lib/site_perl /usr/local/lib/perl/5.8.3 /usr/local/share/perl/5.8.3 /usr/local/lib/perl/5.8.2 /usr/local/share/perl/5.8.2 /usr/local/lib/perl/5.8.1 /usr/local/share/perl/5.8.1 /usr/local/lib/perl/5.8.0 /usr/local/share/perl/5.8.0 . --- Environment for perl v5.8.4: HOME=/home/theorb LANG (unset) LANGUAGE (unset) LD_LIBRARY_PATH (unset) LOGDIR (unset) PATH=/home/theorb/bin:/usr/X11R6/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:. PERL_BADLANG (unset) SHELL=/bin/bash ----- End forwarded message ----- From awwaiid at thelackthereof.org Sun Jul 25 02:30:48 2004 From: awwaiid at thelackthereof.org (Brock) Date: Mon Aug 2 21:35:06 2004 Subject: [Phoenix-pm] greetings Message-ID: <20040725073048.GB1705@thelackthereof.org> Hi phoenix perlmongers, I may not be in phoenix (Tempe, actually) much longer, but I figure as long as I'm here I should take the opprotunity to hang out with some other perlers. So I thought I'd drop a line and lurk for the next meeting. Look forward to meeting you'all --Brock From scott at illogics.org Sun Jul 25 03:11:08 2004 From: scott at illogics.org (Scott Walters) Date: Mon Aug 2 21:35:06 2004 Subject: [Phoenix-pm] greetings Message-ID: <20040725081108.GX21852@illogics.org> Welcome! Mike is constantly threatening to leave us, too, and I think Tim Ayers left a long time ago without saying "goodbye" ;) So, Doug, when's the next meeting? Hey, we've got online message archives - check this out: http://www.pm.org/pipermail/phoenix-pm/ -scott On 0, Brock wrote: > > > Hi phoenix perlmongers, > > I may not be in phoenix (Tempe, actually) much longer, but I figure as > long as I'm here I should take the opprotunity to hang out with some > other perlers. So I thought I'd drop a line and lurk for the next > meeting. > > Look forward to meeting you'all > > --Brock > > _______________________________________________ > Phoenix-pm mailing list > Phoenix-pm@pm.org > http://www.pm.org/mailman/listinfo/phoenix-pm From tayers at quaday.com Sun Jul 25 22:14:50 2004 From: tayers at quaday.com (Tim Ayers) Date: Mon Aug 2 21:35:06 2004 Subject: [Phoenix-pm] greetings In-Reply-To: <20040725081108.GX21852@illogics.org> References: <20040725081108.GX21852@illogics.org> Message-ID: <4104772A.8030308@quaday.com> I did? I wonder where I moved to. Hope you have a very nice day, :-) tim Scott Walters wrote: > Welcome! > > Mike is constantly threatening to leave us, too, and I think Tim Ayers > left a long time ago without saying "goodbye" ;) > > So, Doug, when's the next meeting? > > Hey, we've got online message archives - check this out: > > http://www.pm.org/pipermail/phoenix-pm/ > > -scott > > > On 0, Brock wrote: > >> >>Hi phoenix perlmongers, >> >>I may not be in phoenix (Tempe, actually) much longer, but I figure as >>long as I'm here I should take the opprotunity to hang out with some >>other perlers. So I thought I'd drop a line and lurk for the next >>meeting. >> >>Look forward to meeting you'all >> >>--Brock >> >>_______________________________________________ >>Phoenix-pm mailing list >>Phoenix-pm@pm.org >>http://www.pm.org/mailman/listinfo/phoenix-pm > > _______________________________________________ > Phoenix-pm mailing list > Phoenix-pm@pm.org > http://www.pm.org/mailman/listinfo/phoenix-pm ----------------------------------------------------------------- Visit our Internet site at http://www.reuters.com Get closer to the financial markets with Reuters Messaging - for more information and to register, visit http://www.reuters.com/messaging Any views expressed in this message are those of the individual sender, except where the sender specifically states them to be the views of Reuters Ltd. From friedman at highwire.stanford.edu Sun Jul 25 22:33:46 2004 From: friedman at highwire.stanford.edu (Michael Friedman) Date: Mon Aug 2 21:35:06 2004 Subject: [Phoenix-pm] greetings In-Reply-To: <4104772A.8030308@quaday.com> References: <20040725081108.GX21852@illogics.org> <4104772A.8030308@quaday.com> Message-ID: <9A0B50A4-DEB4-11D8-89DA-000A956CAA2C@highwire.stanford.edu> And I hope you didn't mean me threatening to leave... I've just been in the Bay Area and having a baby any day now. I'll be back for the Sept. meeting if at all possible! -- Mike On Jul 25, 2004, at 8:14 PM, Tim Ayers wrote: > I did? I wonder where I moved to. > > Hope you have a very nice day, :-) > tim > > Scott Walters wrote: >> Welcome! Mike is constantly threatening to leave us, too, and I think >> Tim Ayers >> left a long time ago without saying "goodbye" ;) >> So, Doug, when's the next meeting? Hey, we've got online message >> archives - check this out: >> http://www.pm.org/pipermail/phoenix-pm/ >> -scott >> On 0, Brock wrote: >>> >>> Hi phoenix perlmongers, >>> >>> I may not be in phoenix (Tempe, actually) much longer, but I figure >>> as >>> long as I'm here I should take the opprotunity to hang out with some >>> other perlers. So I thought I'd drop a line and lurk for the next >>> meeting. >>> >>> Look forward to meeting you'all >>> >>> --Brock >>> >>> _______________________________________________ >>> Phoenix-pm mailing list >>> Phoenix-pm@pm.org >>> http://www.pm.org/mailman/listinfo/phoenix-pm >> _______________________________________________ >> Phoenix-pm mailing list >> Phoenix-pm@pm.org >> http://www.pm.org/mailman/listinfo/phoenix-pm > > > ----------------------------------------------------------------- > Visit our Internet site at http://www.reuters.com > > Get closer to the financial markets with Reuters Messaging - for more > information and to register, visit http://www.reuters.com/messaging > > Any views expressed in this message are those of the individual > sender, except where the sender specifically states them to be > the views of Reuters Ltd. > > _______________________________________________ > Phoenix-pm mailing list > Phoenix-pm@pm.org > http://www.pm.org/mailman/listinfo/phoenix-pm > --------------------------------------------------------------------- Michael Friedman HighWire Press, Stanford Southwest Phone: 480-456-0880 Tempe, Arizona FAX: 270-721-8034 --------------------------------------------------------------------- From scott at illogics.org Mon Jul 26 00:26:14 2004 From: scott at illogics.org (Scott Walters) Date: Mon Aug 2 21:35:06 2004 Subject: [Phoenix-pm] greetings Message-ID: <20040726052613.GY21852@illogics.org> > Recieved: 206.229.120.131 (straylight.slowass.net) from 64.49.222.22 (mail.pm.org) from 128.101.220.1 (~unknown@mail.anonymous-shells.ky) from localhost (warning: name may have been set with -U) The Caymen Islands, apparently. Don't worry, we won't tell anyone. Tim is in Fountain Hills. That's right. Yup. -scott On 0, Tim Ayers wrote: > > I did? I wonder where I moved to. > > Hope you have a very nice day, :-) > tim > > Scott Walters wrote: > > Welcome! > > > > Mike is constantly threatening to leave us, too, and I think Tim Ayers > > left a long time ago without saying "goodbye" ;) > > > > So, Doug, when's the next meeting? > > > > Hey, we've got online message archives - check this out: > > > > http://www.pm.org/pipermail/phoenix-pm/ > > > > -scott > > > > > > On 0, Brock wrote: > > > >> > >>Hi phoenix perlmongers, > >> > >>I may not be in phoenix (Tempe, actually) much longer, but I figure as > >>long as I'm here I should take the opprotunity to hang out with some > >>other perlers. So I thought I'd drop a line and lurk for the next > >>meeting. > >> > >>Look forward to meeting you'all > >> > >>--Brock > >> > >>_______________________________________________ > >>Phoenix-pm mailing list > >>Phoenix-pm@pm.org > >>http://www.pm.org/mailman/listinfo/phoenix-pm > > > > _______________________________________________ > > Phoenix-pm mailing list > > Phoenix-pm@pm.org > > http://www.pm.org/mailman/listinfo/phoenix-pm > > > ----------------------------------------------------------------- > Visit our Internet site at http://www.reuters.com > > Get closer to the financial markets with Reuters Messaging - for more > information and to register, visit http://www.reuters.com/messaging > > Any views expressed in this message are those of the individual > sender, except where the sender specifically states them to be > the views of Reuters Ltd. > > _______________________________________________ > Phoenix-pm mailing list > Phoenix-pm@pm.org > http://www.pm.org/mailman/listinfo/phoenix-pm From perlguy at earthlink.net Mon Jul 26 17:15:03 2004 From: perlguy at earthlink.net (Douglas E. Miles) Date: Mon Aug 2 21:35:06 2004 Subject: [Phoenix-pm] greetings In-Reply-To: <20040725081108.GX21852@illogics.org> References: <20040725081108.GX21852@illogics.org> Message-ID: <41058267.6020708@earthlink.net> Scott Walters wrote: > Welcome! > > Mike is constantly threatening to leave us, too, and I think Tim Ayers > left a long time ago without saying "goodbye" ;) > > So, Doug, when's the next meeting? Next Thursday. I was planning on putting out an RFP (Request For Presentation) anyway. Anyone want to volunteer? If not, I'll come up with something. If someone already volunteered, refresh my memory. :) From bwmetz at att.com Mon Jul 26 19:09:36 2004 From: bwmetz at att.com (Metz, Bobby W, WCS) Date: Mon Aug 2 21:35:06 2004 Subject: [Phoenix-pm] greetings Message-ID: <456FD0E7B215B24ABBAD711614E4A7A20931B88C@OCCLUST03EVS1.ugd.att.com> Anyone into multi-threaded perl programming? It's something I have no experience in and would love to see an overview if anyone is willing. Just a thought. Bobby -----Original Message----- From: phoenix-pm-bounces@pm.org [mailto:phoenix-pm-bounces@pm.org]On Behalf Of Douglas E. Miles Sent: Monday, July 26, 2004 3:15 PM To: phoenix-pm@pm.org Subject: Re: [Phoenix-pm] greetings Scott Walters wrote: > Welcome! > > Mike is constantly threatening to leave us, too, and I think Tim Ayers > left a long time ago without saying "goodbye" ;) > > So, Doug, when's the next meeting? Next Thursday. I was planning on putting out an RFP (Request For Presentation) anyway. Anyone want to volunteer? If not, I'll come up with something. If someone already volunteered, refresh my memory. :) _______________________________________________ Phoenix-pm mailing list Phoenix-pm@pm.org http://www.pm.org/mailman/listinfo/phoenix-pm From scott at illogics.org Tue Jul 27 03:28:45 2004 From: scott at illogics.org (Scott Walters) Date: Mon Aug 2 21:35:06 2004 Subject: [Phoenix-pm] greetings Message-ID: <20040727082844.GD21852@illogics.org> I tried a few times but I reeled, licking my wounds, each time. Threads in Perl are extremely heavy - most things wind up in thread-local-store so you get copy-on-write semantics like fork() but the setup for a new thread is far worse than for fork(). When variables are shared, it's extremely difficult to pass a data structure through it and neigh on impossible to pass a reference to an object that refers to other objects. Unless each array and hash in the datastructure - even anonymous ones - has been created :shared or run through share(), it vanishes without coming out the other side. The other thread never sees it. Objects have the same problem but they also come unblessed. So threads aren't much better than using fork()ed processes with SysV shared memory and semahores and such. I've been fiending on Coro, though (as some of you know). Coro is non-preemptive, and for variable and datastructure sharing, uses the regular lexical scope rules and reference rules. None of the above problems exist. They're extremely light to create. Doing I/O concurrently takes a little more work as coroutines don't automatically go to sleep, yield the CPU, and wait for data to arrive. Instead you must use special classes to wrap IO:: classes or the Event class. I touched on this briefly in my Perl 6-isms part II presentation but I'd be happy to round it out >=) -scott On 0, "Metz, Bobby W, WCS" wrote: > > Anyone into multi-threaded perl programming? It's something I have no > experience in and would love to see an overview if anyone is willing. > Just a thought. > > Bobby > > -----Original Message----- > From: phoenix-pm-bounces@pm.org [mailto:phoenix-pm-bounces@pm.org]On > Behalf Of Douglas E. Miles > Sent: Monday, July 26, 2004 3:15 PM > To: phoenix-pm@pm.org > Subject: Re: [Phoenix-pm] greetings > > > Scott Walters wrote: > > Welcome! > > > > Mike is constantly threatening to leave us, too, and I think Tim Ayers > > left a long time ago without saying "goodbye" ;) > > > > So, Doug, when's the next meeting? > > Next Thursday. I was planning on putting out an RFP (Request For > Presentation) anyway. Anyone want to volunteer? If not, I'll come up > with something. If someone already volunteered, refresh my memory. :) > _______________________________________________ > Phoenix-pm mailing list > Phoenix-pm@pm.org > http://www.pm.org/mailman/listinfo/phoenix-pm > > _______________________________________________ > Phoenix-pm mailing list > Phoenix-pm@pm.org > http://www.pm.org/mailman/listinfo/phoenix-pm From awwaiid at thelackthereof.org Tue Jul 27 03:42:59 2004 From: awwaiid at thelackthereof.org (Brock) Date: Mon Aug 2 21:35:06 2004 Subject: [Phoenix-pm] greetings Message-ID: <20040727084258.GH1705@thelackthereof.org> On 2004.07.26.15.15, Douglas E. Miles wrote: | Next Thursday. I was planning on putting out an RFP (Request For | Presentation) anyway. Anyone want to volunteer? If not, I'll come up | with something. If someone already volunteered, refresh my memory. :) Next Thursday as in Aug 5th? I've been working on a really neat technique for doing CGI programming and recently submitted the core module for it to CPAN (its called Contize). I'd be very happy to talk about this technique, and for more immediate information you can google for "Continuation-based Web Programming" or "Synchronous Web Programming". You can also check out some of the rough information (and links) on my website, * http://thelackthereof.org/wiki.pl/Contize * http://thelackthereof.org/wiki.pl/Web_Programming_With_Contize * http://thelackthereof.org/wiki.pl/Continuation-based_Web_Programming If you're interested, let me know. --Brock PS -- I saw a mention of Coro, and this stuff roughly relates to Coro::Cont From scott at illogics.org Tue Jul 27 04:39:21 2004 From: scott at illogics.org (Scott Walters) Date: Mon Aug 2 21:35:06 2004 Subject: [Phoenix-pm] greetings Message-ID: <20040727093921.GE21852@illogics.org> Wow. $self->suspend(); Very interesting. Kind of like the old dump()/undump() mechanism. Congraduations on distracting me from work for an hour. Thanks a lot =P -scott On 0, Brock wrote: > > On 2004.07.26.15.15, Douglas E. Miles wrote: > | Next Thursday. I was planning on putting out an RFP (Request For > | Presentation) anyway. Anyone want to volunteer? If not, I'll come up > | with something. If someone already volunteered, refresh my memory. :) > > Next Thursday as in Aug 5th? > > I've been working on a really neat technique for doing CGI programming > and recently submitted the core module for it to CPAN (its called > Contize). I'd be very happy to talk about this technique, and for more > immediate information you can google for "Continuation-based Web > Programming" or "Synchronous Web Programming". You can also check out > some of the rough information (and links) on my website, > > * http://thelackthereof.org/wiki.pl/Contize > * http://thelackthereof.org/wiki.pl/Web_Programming_With_Contize > * http://thelackthereof.org/wiki.pl/Continuation-based_Web_Programming > > If you're interested, let me know. > > --Brock > > PS -- I saw a mention of Coro, and this stuff roughly relates to > Coro::Cont > _______________________________________________ > Phoenix-pm mailing list > Phoenix-pm@pm.org > http://www.pm.org/mailman/listinfo/phoenix-pm From awwaiid at thelackthereof.org Tue Jul 27 04:43:30 2004 From: awwaiid at thelackthereof.org (Brock) Date: Mon Aug 2 21:35:06 2004 Subject: [Phoenix-pm] greetings In-Reply-To: <20040727093921.GE21852@illogics.org> References: <20040727093921.GE21852@illogics.org> Message-ID: <20040727094330.GL1705@thelackthereof.org> On 2004.07.27.02.39, Scott Walters wrote: | Wow. | | $self->suspend(); | | Very interesting. Kind of like the old dump()/undump() mechanism. | | Congraduations on distracting me from work for an hour. Thanks a lot =P hehe. I'm evil. --Brock From ahenry-pm at artful2099.com Tue Jul 27 16:05:50 2004 From: ahenry-pm at artful2099.com (Artful) Date: Mon Aug 2 21:35:06 2004 Subject: [Phoenix-pm] greetings In-Reply-To: <456FD0E7B215B24ABBAD711614E4A7A20931B88C@OCCLUST03EVS1.ugd.att.com> References: <456FD0E7B215B24ABBAD711614E4A7A20931B88C@OCCLUST03EVS1.ugd.att.com> Message-ID: <44561.171.161.160.10.1090962350.squirrel@empiresquare.com> > Anyone into multi-threaded perl programming? It's something I have no > experience in and would love to see an overview if anyone is willing. > Just a thought. > > Bobby Threading in perl is cumbersome at best. I am falling in love with POE. http://poe.perl.org/ At first glance, it can seem complex, but the concept is pretty simple and it is easy to pick up. There are a couple of recent articles at perl.com covering it: http://www.perl.com/pub/a/2004/07/02/poeintro.html and http://www.perl.com/pub/a/2004/07/22/poe.html -Art- From scott at illogics.org Tue Jul 27 16:17:06 2004 From: scott at illogics.org (Scott Walters) Date: Mon Aug 2 21:35:06 2004 Subject: [Phoenix-pm] greetings Message-ID: <20040727211706.GG21852@illogics.org> Gimmie September! Sides, depending on which Thursday you mean, I might not be in town, and a lot of people are breathing down my neck right now. I wouldn't do a god job. -scott On 0, "Douglas E. Miles" wrote: > > Scott Walters wrote: > > I tried a few times but I reeled, licking my wounds, each time. > > Threads in Perl are extremely heavy - most things wind up in thread-local-store > > so you get copy-on-write semantics like fork() but the setup for a new thread is > > far worse than for fork(). When variables are shared, it's extremely difficult to > > pass a data structure through it and neigh on impossible to pass a reference to > > an object that refers to other objects. Unless each array and hash in the datastructure - > > even anonymous ones - has been created :shared or run through share(), it vanishes > > without coming out the other side. The other thread never sees it. Objects have > > the same problem but they also come unblessed. So threads aren't much better than > > using fork()ed processes with SysV shared memory and semahores and such. > > > > I've been fiending on Coro, though (as some of you know). Coro is > > non-preemptive, and for variable and datastructure sharing, uses the regular > > lexical scope rules and reference rules. None of the above problems exist. > > They're extremely light to create. Doing I/O concurrently takes a little more > > work as coroutines don't automatically go to sleep, yield the CPU, and wait for > > data to arrive. Instead you must use special classes to wrap IO:: classes > > or the Event class. > > > > I touched on this briefly in my Perl 6-isms part II presentation but I'd > > be happy to round it out >=) > > > > > If Brock doesn't take the whole 2 hours, you are welcome to the > remainder. If you need the whole 2 hours, your can have Sept. :) From scott at illogics.org Tue Jul 27 16:34:22 2004 From: scott at illogics.org (Scott Walters) Date: Mon Aug 2 21:35:06 2004 Subject: [Phoenix-pm] greetings Message-ID: <20040727213422.GH21852@illogics.org> Well, coroutines are a lot like POE (or Event, or Stem), except when the event happens, rather than another routine being called, the current is allowed to continue. This means that you don't have to tuck all of your variables into an object to preserve them, and you don't have to return out of for() loops, if() statements, deeply nested function calls, and so on... but the POE stuff about not shooting yourself in the foot with threads still applies. And no special version of modules are required, as with threads. Here's a little script tht demonstrates continuations: use Coro; use Coro::Cont; use File::Find; use Perl6::Variables; sub get_next_perl :Cont { find(sub { return unless m/\.pl$/; open my $pl, '<', $_ or return; (my $shebang) = <$pl> =~ m/^#!(\S+)/ or return; yield $shebang; }, '/'); return undef; } while(my $_ = get_next_perl()) { last unless defined $_; print $_, "\n"; } This tries to find all of the Perl itnerpreters on your system that are in use. Coroutines are used to create detached processes and continuations are used to create closely coupled processes. In this case, control flops back and forth between get_next_perl() and the while(). Even as control flops back, the lexical variables inside get_next_perl() keep their value. More importantly, the call to File::Find::find() isn't exected out of. It would suck if that had to be restarted each time we wanted to know what interpreter the next file used. Likewise with a network application, this would be responsive, whereas storing everything in an array and returning a reference would wait a really long time and then suddenly have a whole bunch of data. Hrm. I should write some examples of gluing POE to Coro. Event handler stubs could execute a ->transfer() to transfer control to a specific coroutine. I wonder how Coro::Event does it... -scott On 0, Artful wrote: > > > Anyone into multi-threaded perl programming? It's something I have no > > experience in and would love to see an overview if anyone is willing. > > Just a thought. > > > > Bobby > > Threading in perl is cumbersome at best. I am falling in love with POE. > http://poe.perl.org/ > > At first glance, it can seem complex, but the concept is pretty simple and > it is easy to pick up. There are a couple of recent articles at perl.com > covering it: http://www.perl.com/pub/a/2004/07/02/poeintro.html and > http://www.perl.com/pub/a/2004/07/22/poe.html > > -Art- > _______________________________________________ > Phoenix-pm mailing list > Phoenix-pm@pm.org > http://www.pm.org/mailman/listinfo/phoenix-pm From intertwingled at qwest.net Tue Jul 27 09:44:12 2004 From: intertwingled at qwest.net (Anthony Nemmer) Date: Mon Aug 2 21:35:06 2004 Subject: [Phoenix-pm] greetings In-Reply-To: <20040727213422.GH21852@illogics.org> References: <20040727213422.GH21852@illogics.org> Message-ID: <41066A3C.5050006@qwest.net> Unix pipes implement a kind of coroutine chain of unix commands. Scott Walters wrote: >Well, coroutines are a lot like POE (or Event, or Stem), except >when the event happens, rather than another routine being called, the >current is allowed to continue. This means that you don't have to >tuck all of your variables into an object to preserve them, >and you don't have to return out of for() loops, if() statements, >deeply nested function calls, and so on... but the POE stuff >about not shooting yourself in the foot with threads still >applies. And no special version of modules are required, >as with threads. > >Here's a little script tht demonstrates continuations: > > use Coro; > use Coro::Cont; > > use File::Find; > use Perl6::Variables; > > sub get_next_perl :Cont { > find(sub { > return unless m/\.pl$/; > open my $pl, '<', $_ or return; > (my $shebang) = <$pl> =~ m/^#!(\S+)/ or return; > yield $shebang; > }, '/'); > return undef; > } > > while(my $_ = get_next_perl()) { > last unless defined $_; > print $_, "\n"; > } > >This tries to find all of the Perl itnerpreters on your system that are >in use. Coroutines are used to create detached processes and continuations >are used to create closely coupled processes. In this case, control >flops back and forth between get_next_perl() and the while(). Even >as control flops back, the lexical variables inside get_next_perl() >keep their value. More importantly, the call to File::Find::find() isn't >exected out of. It would suck if that had to be restarted each time >we wanted to know what interpreter the next file used. Likewise with a >network application, this would be responsive, whereas storing everything >in an array and returning a reference would wait a really long time and then >suddenly have a whole bunch of data. > >Hrm. I should write some examples of gluing POE to Coro. Event handler stubs >could execute a ->transfer() to transfer control to a specific coroutine. >I wonder how Coro::Event does it... > >-scott > >On 0, Artful wrote: > > >>>Anyone into multi-threaded perl programming? It's something I have no >>>experience in and would love to see an overview if anyone is willing. >>>Just a thought. >>> >>>Bobby >>> >>> >>Threading in perl is cumbersome at best. I am falling in love with POE. >>http://poe.perl.org/ >> >>At first glance, it can seem complex, but the concept is pretty simple and >>it is easy to pick up. There are a couple of recent articles at perl.com >>covering it: http://www.perl.com/pub/a/2004/07/02/poeintro.html and >>http://www.perl.com/pub/a/2004/07/22/poe.html >> >>-Art- >>_______________________________________________ >>Phoenix-pm mailing list >>Phoenix-pm@pm.org >>http://www.pm.org/mailman/listinfo/phoenix-pm >> >> >_______________________________________________ >Phoenix-pm mailing list >Phoenix-pm@pm.org >http://www.pm.org/mailman/listinfo/phoenix-pm > > > > -- SKYKING, SKYKING, DO NOT ANSWER. From bwmetz at att.com Tue Jul 27 18:59:52 2004 From: bwmetz at att.com (Metz, Bobby W, WCS) Date: Mon Aug 2 21:35:06 2004 Subject: [Phoenix-pm] greetings Message-ID: <456FD0E7B215B24ABBAD711614E4A7A20938C4E4@OCCLUST03EVS1.ugd.att.com> Hmmm...these all sound interesting so maybe I should ask a pointed question now. I do a lot of net admin stuff involving SNMP polling and currently most of my tools are "single-threaded", i.e. I poll one device at a time. Based on the options presented, what would be the easiest means of changing to a setup of polling say 10 devices at the same time with the main script retaining control and reporting responsibilities? Thanks, Bobby -----Original Message----- From: phoenix-pm-bounces@pm.org [mailto:phoenix-pm-bounces@pm.org]On Behalf Of Anthony Nemmer Sent: Tuesday, July 27, 2004 7:44 AM To: Scott Walters Cc: phoenix-pm@pm.org Subject: Re: [Phoenix-pm] greetings Unix pipes implement a kind of coroutine chain of unix commands. Scott Walters wrote: >Well, coroutines are a lot like POE (or Event, or Stem), except >when the event happens, rather than another routine being called, the >current is allowed to continue. This means that you don't have to >tuck all of your variables into an object to preserve them, >and you don't have to return out of for() loops, if() statements, >deeply nested function calls, and so on... but the POE stuff >about not shooting yourself in the foot with threads still >applies. And no special version of modules are required, >as with threads. > >Here's a little script tht demonstrates continuations: > > use Coro; > use Coro::Cont; > > use File::Find; > use Perl6::Variables; > > sub get_next_perl :Cont { > find(sub { > return unless m/\.pl$/; > open my $pl, '<', $_ or return; > (my $shebang) = <$pl> =~ m/^#!(\S+)/ or return; > yield $shebang; > }, '/'); > return undef; > } > > while(my $_ = get_next_perl()) { > last unless defined $_; > print $_, "\n"; > } > >This tries to find all of the Perl itnerpreters on your system that are >in use. Coroutines are used to create detached processes and continuations >are used to create closely coupled processes. In this case, control >flops back and forth between get_next_perl() and the while(). Even >as control flops back, the lexical variables inside get_next_perl() >keep their value. More importantly, the call to File::Find::find() isn't >exected out of. It would suck if that had to be restarted each time >we wanted to know what interpreter the next file used. Likewise with a >network application, this would be responsive, whereas storing everything >in an array and returning a reference would wait a really long time and then >suddenly have a whole bunch of data. > >Hrm. I should write some examples of gluing POE to Coro. Event handler stubs >could execute a ->transfer() to transfer control to a specific coroutine. >I wonder how Coro::Event does it... > >-scott > >On 0, Artful wrote: > > >>>Anyone into multi-threaded perl programming? It's something I have no >>>experience in and would love to see an overview if anyone is willing. >>>Just a thought. >>> >>>Bobby >>> >>> >>Threading in perl is cumbersome at best. I am falling in love with POE. >>http://poe.perl.org/ >> >>At first glance, it can seem complex, but the concept is pretty simple and >>it is easy to pick up. There are a couple of recent articles at perl.com >>covering it: http://www.perl.com/pub/a/2004/07/02/poeintro.html and >>http://www.perl.com/pub/a/2004/07/22/poe.html >> >>-Art- >>_______________________________________________ >>Phoenix-pm mailing list >>Phoenix-pm@pm.org >>http://www.pm.org/mailman/listinfo/phoenix-pm >> >> >_______________________________________________ >Phoenix-pm mailing list >Phoenix-pm@pm.org >http://www.pm.org/mailman/listinfo/phoenix-pm > > > > -- SKYKING, SKYKING, DO NOT ANSWER. _______________________________________________ Phoenix-pm mailing list Phoenix-pm@pm.org http://www.pm.org/mailman/listinfo/phoenix-pm From scott at illogics.org Tue Jul 27 19:15:38 2004 From: scott at illogics.org (Scott Walters) Date: Mon Aug 2 21:35:06 2004 Subject: [Phoenix-pm] greetings Message-ID: <20040728001538.GI21852@illogics.org> What module exactly are you using? Things that lend themselves well to threads usually lend themselves well to coroutines as well, with one exception - if you're trying to use two modules, each of which has their own event loop, coroutines don't directly work - you have to break the event loop down. (If a module supports the Event module for a communal event loop, Coro has glue into Event, so this works). For example, if you're using Net::IRC with Tk, and Net::IRC wants you to call Net::IRC::start to hand over control of the program and Tk wants you to call Tk::MainLoop to give up the CPU, you have a delimma. Threads solve this by creating additional "virtual CPUs", wheres coroutines only help you juggle your one CPU. You'd have to extract the relavent filehandles, build your own Event loop using Coro::Handle::unblock or Coro::Event::io, and then call the do_one_loop() loop in Net::IRC and the equivilent in Tk to do a single pass through their private event loops without giving up control of the CPU. Modules that don't have an event loop at all work great - they don't try to hold onto the CPU indefinately. So, it depends on the exact module you're using =) -soctt On 0, "Metz, Bobby W, WCS" wrote: > > Hmmm...these all sound interesting so maybe I should ask a pointed > question now. I do a lot of net admin stuff involving SNMP polling and > currently most of my tools are "single-threaded", i.e. I poll one device > at a time. Based on the options presented, what would be the easiest > means of changing to a setup of polling say 10 devices at the same time > with the main script retaining control and reporting responsibilities? > > Thanks, > > Bobby > > -----Original Message----- > From: phoenix-pm-bounces@pm.org [mailto:phoenix-pm-bounces@pm.org]On > Behalf Of Anthony Nemmer > Sent: Tuesday, July 27, 2004 7:44 AM > To: Scott Walters > Cc: phoenix-pm@pm.org > Subject: Re: [Phoenix-pm] greetings > > > Unix pipes implement a kind of coroutine chain of unix commands. > > Scott Walters wrote: > > >Well, coroutines are a lot like POE (or Event, or Stem), except > >when the event happens, rather than another routine being called, the > >current is allowed to continue. This means that you don't have to > >tuck all of your variables into an object to preserve them, > >and you don't have to return out of for() loops, if() statements, > >deeply nested function calls, and so on... but the POE stuff > >about not shooting yourself in the foot with threads still > >applies. And no special version of modules are required, > >as with threads. > > > >Here's a little script tht demonstrates continuations: > > > > use Coro; > > use Coro::Cont; > > > > use File::Find; > > use Perl6::Variables; > > > > sub get_next_perl :Cont { > > find(sub { > > return unless m/\.pl$/; > > open my $pl, '<', $_ or return; > > (my $shebang) = <$pl> =~ m/^#!(\S+)/ or return; > > yield $shebang; > > }, '/'); > > return undef; > > } > > > > while(my $_ = get_next_perl()) { > > last unless defined $_; > > print $_, "\n"; > > } > > > >This tries to find all of the Perl itnerpreters on your system that are > >in use. Coroutines are used to create detached processes and > continuations > >are used to create closely coupled processes. In this case, control > >flops back and forth between get_next_perl() and the while(). Even > >as control flops back, the lexical variables inside get_next_perl() > >keep their value. More importantly, the call to File::Find::find() > isn't > >exected out of. It would suck if that had to be restarted each time > >we wanted to know what interpreter the next file used. Likewise with a > >network application, this would be responsive, whereas storing > everything > >in an array and returning a reference would wait a really long time and > then > >suddenly have a whole bunch of data. > > > >Hrm. I should write some examples of gluing POE to Coro. Event handler > stubs > >could execute a ->transfer() to transfer control to a specific > coroutine. > >I wonder how Coro::Event does it... > > > >-scott > > > >On 0, Artful wrote: > > > > > >>>Anyone into multi-threaded perl programming? It's something I have > no > >>>experience in and would love to see an overview if anyone is willing. > >>>Just a thought. > >>> > >>>Bobby > >>> > >>> > >>Threading in perl is cumbersome at best. I am falling in love with > POE. > >>http://poe.perl.org/ > >> > >>At first glance, it can seem complex, but the concept is pretty simple > and > >>it is easy to pick up. There are a couple of recent articles at > perl.com > >>covering it: http://www.perl.com/pub/a/2004/07/02/poeintro.html and > >>http://www.perl.com/pub/a/2004/07/22/poe.html > >> > >>-Art- > >>_______________________________________________ > >>Phoenix-pm mailing list > >>Phoenix-pm@pm.org > >>http://www.pm.org/mailman/listinfo/phoenix-pm > >> > >> > >_______________________________________________ > >Phoenix-pm mailing list > >Phoenix-pm@pm.org > >http://www.pm.org/mailman/listinfo/phoenix-pm > > > > > > > > > > > -- > > SKYKING, SKYKING, DO NOT ANSWER. > > > _______________________________________________ > Phoenix-pm mailing list > Phoenix-pm@pm.org > http://www.pm.org/mailman/listinfo/phoenix-pm > > _______________________________________________ > Phoenix-pm mailing list > Phoenix-pm@pm.org > http://www.pm.org/mailman/listinfo/phoenix-pm From bwmetz at att.com Tue Jul 27 23:05:26 2004 From: bwmetz at att.com (Metz, Bobby W, WCS) Date: Mon Aug 2 21:35:06 2004 Subject: [Phoenix-pm] greetings Message-ID: <456FD0E7B215B24ABBAD711614E4A7A20938C559@OCCLUST03EVS1.ugd.att.com> As neither I nor my colleagues have root access to compile modules and the sysadmins are really freakish about keeping their Perl dist unchanged as many "accepted" tools might break, we've developed all of ours using our own modules, relying on system utilities to make the SNMP calls instead of an established SNMP module from CPAN. Until recently we were even lead to believe that there were no compilers loaded on the box. I recently found one so we could compile our own library for use but we've ran into some problems with the compiler on some CPAN modules and really weren't looking forward to rewriting everything anyway. So, is there anyway to accomplish what I'm looking to do without using Coro or some other module? If the "action" code is modularized, could I simply fork these instances to run concurrently while either passing back output to the calling routine or all writing to the same set of error files? I just wasn't sure how Perl would handle such a situation. Thanks for the feedback. Bobby -----Original Message----- From: Scott Walters [mailto:scott@illogics.org] Sent: Tuesday, July 27, 2004 5:16 PM To: Metz, Bobby W, WCS Cc: phoenix-pm@pm.org Subject: Re: [Phoenix-pm] greetings What module exactly are you using? Things that lend themselves well to threads usually lend themselves well to coroutines as well, with one exception - if you're trying to use two modules, each of which has their own event loop, coroutines don't directly work - you have to break the event loop down. (If a module supports the Event module for a communal event loop, Coro has glue into Event, so this works). For example, if you're using Net::IRC with Tk, and Net::IRC wants you to call Net::IRC::start to hand over control of the program and Tk wants you to call Tk::MainLoop to give up the CPU, you have a delimma. Threads solve this by creating additional "virtual CPUs", wheres coroutines only help you juggle your one CPU. You'd have to extract the relavent filehandles, build your own Event loop using Coro::Handle::unblock or Coro::Event::io, and then call the do_one_loop() loop in Net::IRC and the equivilent in Tk to do a single pass through their private event loops without giving up control of the CPU. Modules that don't have an event loop at all work great - they don't try to hold onto the CPU indefinately. So, it depends on the exact module you're using =) -soctt On 0, "Metz, Bobby W, WCS" wrote: > > Hmmm...these all sound interesting so maybe I should ask a pointed > question now. I do a lot of net admin stuff involving SNMP polling and > currently most of my tools are "single-threaded", i.e. I poll one device > at a time. Based on the options presented, what would be the easiest > means of changing to a setup of polling say 10 devices at the same time > with the main script retaining control and reporting responsibilities? > > Thanks, > > Bobby > > -----Original Message----- > From: phoenix-pm-bounces@pm.org [mailto:phoenix-pm-bounces@pm.org]On > Behalf Of Anthony Nemmer > Sent: Tuesday, July 27, 2004 7:44 AM > To: Scott Walters > Cc: phoenix-pm@pm.org > Subject: Re: [Phoenix-pm] greetings > > > Unix pipes implement a kind of coroutine chain of unix commands. > > Scott Walters wrote: > > >Well, coroutines are a lot like POE (or Event, or Stem), except > >when the event happens, rather than another routine being called, the > >current is allowed to continue. This means that you don't have to > >tuck all of your variables into an object to preserve them, > >and you don't have to return out of for() loops, if() statements, > >deeply nested function calls, and so on... but the POE stuff > >about not shooting yourself in the foot with threads still > >applies. And no special version of modules are required, > >as with threads. > > > >Here's a little script tht demonstrates continuations: > > > > use Coro; > > use Coro::Cont; > > > > use File::Find; > > use Perl6::Variables; > > > > sub get_next_perl :Cont { > > find(sub { > > return unless m/\.pl$/; > > open my $pl, '<', $_ or return; > > (my $shebang) = <$pl> =~ m/^#!(\S+)/ or return; > > yield $shebang; > > }, '/'); > > return undef; > > } > > > > while(my $_ = get_next_perl()) { > > last unless defined $_; > > print $_, "\n"; > > } > > > >This tries to find all of the Perl itnerpreters on your system that are > >in use. Coroutines are used to create detached processes and > continuations > >are used to create closely coupled processes. In this case, control > >flops back and forth between get_next_perl() and the while(). Even > >as control flops back, the lexical variables inside get_next_perl() > >keep their value. More importantly, the call to File::Find::find() > isn't > >exected out of. It would suck if that had to be restarted each time > >we wanted to know what interpreter the next file used. Likewise with a > >network application, this would be responsive, whereas storing > everything > >in an array and returning a reference would wait a really long time and > then > >suddenly have a whole bunch of data. > > > >Hrm. I should write some examples of gluing POE to Coro. Event handler > stubs > >could execute a ->transfer() to transfer control to a specific > coroutine. > >I wonder how Coro::Event does it... > > > >-scott > > > >On 0, Artful wrote: > > > > > >>>Anyone into multi-threaded perl programming? It's something I have > no > >>>experience in and would love to see an overview if anyone is willing. > >>>Just a thought. > >>> > >>>Bobby > >>> > >>> > >>Threading in perl is cumbersome at best. I am falling in love with > POE. > >>http://poe.perl.org/ > >> > >>At first glance, it can seem complex, but the concept is pretty simple > and > >>it is easy to pick up. There are a couple of recent articles at > perl.com > >>covering it: http://www.perl.com/pub/a/2004/07/02/poeintro.html and > >>http://www.perl.com/pub/a/2004/07/22/poe.html > >> > >>-Art- > >>_______________________________________________ > >>Phoenix-pm mailing list > >>Phoenix-pm@pm.org > >>http://www.pm.org/mailman/listinfo/phoenix-pm > >> > >> > >_______________________________________________ > >Phoenix-pm mailing list > >Phoenix-pm@pm.org > >http://www.pm.org/mailman/listinfo/phoenix-pm > > > > > > > > > > > -- > > SKYKING, SKYKING, DO NOT ANSWER. > > > _______________________________________________ > Phoenix-pm mailing list > Phoenix-pm@pm.org > http://www.pm.org/mailman/listinfo/phoenix-pm > > _______________________________________________ > Phoenix-pm mailing list > Phoenix-pm@pm.org > http://www.pm.org/mailman/listinfo/phoenix-pm From scott at illogics.org Wed Jul 28 06:31:05 2004 From: scott at illogics.org (Scott Walters) Date: Mon Aug 2 21:35:06 2004 Subject: [Phoenix-pm] greetings Message-ID: <20040728113105.GJ21852@illogics.org> Heh. I have a story I tell all too often =) I worked as a sysadmin at Motorola for a brief period of time. It was there I was ordered to learn Perl (after lieing at the interview saying I knew it). My first task was to write a script to find all of the Perl interpreters installed on the cluster that serves http://mot.com / http://motorola.com. The script traversed the entire filesystem and found 400 installs, about a third of which were Perl 4's (this was probably 4 years ago). Perl wouldn't be installed (and kept up to date) systemwide for "security reasons". So, instead of one potentially exploitable version for everyone, each person got a version that's not kept up to date and in a huge number of cases, exploitable. But this story has a point - you can install perl or any of the modules in your home directory or in some shared place. Assuming that perl itself is kept up to date and you just want to install a module, ftp the .tar.gz from CPAN, and do something like: tar -xzvf Foo-Bar-3.2.1.tar.gz cd Foo-Bar-3.2.1 perl Makefile.PL PREFIX=/usr/local/share/departments/r_and_d/shared_files/mp3s/ make && make install Perl programs won't "see" this module by default as its in a place that perl wasn't told about when it was built (and it isn't in the default place to install modules), but you can easily tell perl about it by saying: use lib '/usr/local/share/departments/r_and_d/shared_files/mp3s/'; Then the 'use' for that module will work: use Foo::Bar; You could even install the module into your home directory, as long as permissions were in order for your college's to see the module... or they could install a copy in their home directory and do something in the program using the module like: BEGIN { my($name,$passwd,$uid,$gid, $quota,$comment,$gcos,$dir,$shell,$expire) = getpwuid $<; push @INC, $dir . '/perl_modules'; } But that's fugly =P -scott On 0, "Metz, Bobby W, WCS" wrote: > > As neither I nor my colleagues have root access to compile > modules and the sysadmins are really freakish about keeping their Perl > dist unchanged as many "accepted" tools might break, we've developed all > of ours using our own modules, relying on system utilities to make the > SNMP calls instead of an established SNMP module from CPAN. Until > recently we were even lead to believe that there were no compilers > loaded on the box. I recently found one so we could compile our own > library for use but we've ran into some problems with the compiler on > some CPAN modules and really weren't looking forward to rewriting > everything anyway. > So, is there anyway to accomplish what I'm looking to do without > using Coro or some other module? If the "action" code is modularized, > could I simply fork these instances to run concurrently while either > passing back output to the calling routine or all writing to the same > set of error files? I just wasn't sure how Perl would handle such a > situation. > > Thanks for the feedback. > > Bobby > > -----Original Message----- > From: Scott Walters [mailto:scott@illogics.org] > Sent: Tuesday, July 27, 2004 5:16 PM > To: Metz, Bobby W, WCS > Cc: phoenix-pm@pm.org > Subject: Re: [Phoenix-pm] greetings > > > What module exactly are you using? Things that lend themselves well to > threads usually lend themselves well to coroutines as well, with one > exception - if you're trying to use two modules, each of which has their > > own event loop, coroutines don't directly work - you have to break > the event loop down. (If a module supports the Event module for a > communal > event loop, Coro has glue into Event, so this works). > > For example, if you're using Net::IRC with Tk, and Net::IRC wants you to > call > Net::IRC::start to hand over control of the program and Tk wants you to > call > Tk::MainLoop to give up the CPU, you have a delimma. Threads solve this > by > creating additional "virtual CPUs", wheres coroutines only help you > juggle your > one CPU. You'd have to extract the relavent filehandles, build your own > Event loop using Coro::Handle::unblock or Coro::Event::io, and then call > the > do_one_loop() loop in Net::IRC and the equivilent in Tk to do a single > pass through > their private event loops without giving up control of the CPU. > > Modules that don't have an event loop at all work great - they don't try > to > hold onto the CPU indefinately. So, it depends on the exact module > you're using =) > > -soctt > > On 0, "Metz, Bobby W, WCS" wrote: > > > > Hmmm...these all sound interesting so maybe I should ask a pointed > > question now. I do a lot of net admin stuff involving SNMP polling > and > > currently most of my tools are "single-threaded", i.e. I poll one > device > > at a time. Based on the options presented, what would be the easiest > > means of changing to a setup of polling say 10 devices at the same > time > > with the main script retaining control and reporting responsibilities? > > > > Thanks, > > > > Bobby > > > > -----Original Message----- > > From: phoenix-pm-bounces@pm.org [mailto:phoenix-pm-bounces@pm.org]On > > Behalf Of Anthony Nemmer > > Sent: Tuesday, July 27, 2004 7:44 AM > > To: Scott Walters > > Cc: phoenix-pm@pm.org > > Subject: Re: [Phoenix-pm] greetings > > > > > > Unix pipes implement a kind of coroutine chain of unix commands. > > > > Scott Walters wrote: > > > > >Well, coroutines are a lot like POE (or Event, or Stem), except > > >when the event happens, rather than another routine being called, the > > >current is allowed to continue. This means that you don't have to > > >tuck all of your variables into an object to preserve them, > > >and you don't have to return out of for() loops, if() statements, > > >deeply nested function calls, and so on... but the POE stuff > > >about not shooting yourself in the foot with threads still > > >applies. And no special version of modules are required, > > >as with threads. > > > > > >Here's a little script tht demonstrates continuations: > > > > > > use Coro; > > > use Coro::Cont; > > > > > > use File::Find; > > > use Perl6::Variables; > > > > > > sub get_next_perl :Cont { > > > find(sub { > > > return unless m/\.pl$/; > > > open my $pl, '<', $_ or return; > > > (my $shebang) = <$pl> =~ m/^#!(\S+)/ or return; > > > yield $shebang; > > > }, '/'); > > > return undef; > > > } > > > > > > while(my $_ = get_next_perl()) { > > > last unless defined $_; > > > print $_, "\n"; > > > } > > > > > >This tries to find all of the Perl itnerpreters on your system that > are > > >in use. Coroutines are used to create detached processes and > > continuations > > >are used to create closely coupled processes. In this case, control > > >flops back and forth between get_next_perl() and the while(). Even > > >as control flops back, the lexical variables inside get_next_perl() > > >keep their value. More importantly, the call to File::Find::find() > > isn't > > >exected out of. It would suck if that had to be restarted each time > > >we wanted to know what interpreter the next file used. Likewise with > a > > >network application, this would be responsive, whereas storing > > everything > > >in an array and returning a reference would wait a really long time > and > > then > > >suddenly have a whole bunch of data. > > > > > >Hrm. I should write some examples of gluing POE to Coro. Event > handler > > stubs > > >could execute a ->transfer() to transfer control to a specific > > coroutine. > > >I wonder how Coro::Event does it... > > > > > >-scott > > > > > >On 0, Artful wrote: > > > > > > > > >>>Anyone into multi-threaded perl programming? It's something I have > > no > > >>>experience in and would love to see an overview if anyone is > willing. > > >>>Just a thought. > > >>> > > >>>Bobby > > >>> > > >>> > > >>Threading in perl is cumbersome at best. I am falling in love with > > POE. > > >>http://poe.perl.org/ > > >> > > >>At first glance, it can seem complex, but the concept is pretty > simple > > and > > >>it is easy to pick up. There are a couple of recent articles at > > perl.com > > >>covering it: http://www.perl.com/pub/a/2004/07/02/poeintro.html and > > >>http://www.perl.com/pub/a/2004/07/22/poe.html > > >> > > >>-Art- > > >>_______________________________________________ > > >>Phoenix-pm mailing list > > >>Phoenix-pm@pm.org > > >>http://www.pm.org/mailman/listinfo/phoenix-pm > > >> > > >> > > >_______________________________________________ > > >Phoenix-pm mailing list > > >Phoenix-pm@pm.org > > >http://www.pm.org/mailman/listinfo/phoenix-pm > > > > > > > > > > > > > > > > > > -- > > > > SKYKING, SKYKING, DO NOT ANSWER. > > > > > > _______________________________________________ > > Phoenix-pm mailing list > > Phoenix-pm@pm.org > > http://www.pm.org/mailman/listinfo/phoenix-pm > > > > _______________________________________________ > > Phoenix-pm mailing list > > Phoenix-pm@pm.org > > http://www.pm.org/mailman/listinfo/phoenix-pm > > _______________________________________________ > Phoenix-pm mailing list > Phoenix-pm@pm.org > http://www.pm.org/mailman/listinfo/phoenix-pm From intertwingled at qwest.net Tue Jul 27 23:39:14 2004 From: intertwingled at qwest.net (Anthony Nemmer) Date: Mon Aug 2 21:35:06 2004 Subject: [Phoenix-pm] greetings In-Reply-To: <20040728113105.GJ21852@illogics.org> References: <20040728113105.GJ21852@illogics.org> Message-ID: <41072DF2.30206@qwest.net> Don't you mean "Scrotorola" ??? Scott Walters wrote: >Heh. I have a story I tell all too often =) > >I worked as a sysadmin at Motorola for a brief period of time. It was >there I was ordered to learn Perl (after lieing at the interview saying >I knew it). My first task was to write a script to find all of the Perl >interpreters installed on the cluster that serves http://mot.com / >http://motorola.com. The script traversed the entire filesystem >and found 400 installs, about a third of which were Perl 4's (this was >probably 4 years ago). Perl wouldn't be installed (and kept up to date) >systemwide for "security reasons". So, instead of one potentially >exploitable version for everyone, each person got a version that's >not kept up to date and in a huge number of cases, exploitable. > >But this story has a point - you can install perl or any of the modules >in your home directory or in some shared place. Assuming that perl >itself is kept up to date and you just want to install a module, >ftp the .tar.gz from CPAN, and do something like: > > tar -xzvf Foo-Bar-3.2.1.tar.gz > cd Foo-Bar-3.2.1 > perl Makefile.PL PREFIX=/usr/local/share/departments/r_and_d/shared_files/mp3s/ > make && make install > >Perl programs won't "see" this module by default as its in a place that perl >wasn't told about when it was built (and it isn't in the default place to >install modules), but you can easily tell perl about it by saying: > > use lib '/usr/local/share/departments/r_and_d/shared_files/mp3s/'; > >Then the 'use' for that module will work: > > use Foo::Bar; > >You could even install the module into your home directory, as long as >permissions were in order for your college's to see the module... >or they could install a copy in their home directory and do something in >the program using the module like: > > BEGIN { > my($name,$passwd,$uid,$gid, $quota,$comment,$gcos,$dir,$shell,$expire) = getpwuid $<; > push @INC, $dir . '/perl_modules'; > } > >But that's fugly =P > >-scott > > > >On 0, "Metz, Bobby W, WCS" wrote: > > >> As neither I nor my colleagues have root access to compile >>modules and the sysadmins are really freakish about keeping their Perl >>dist unchanged as many "accepted" tools might break, we've developed all >>of ours using our own modules, relying on system utilities to make the >>SNMP calls instead of an established SNMP module from CPAN. Until >>recently we were even lead to believe that there were no compilers >>loaded on the box. I recently found one so we could compile our own >>library for use but we've ran into some problems with the compiler on >>some CPAN modules and really weren't looking forward to rewriting >>everything anyway. >> So, is there anyway to accomplish what I'm looking to do without >>using Coro or some other module? If the "action" code is modularized, >>could I simply fork these instances to run concurrently while either >>passing back output to the calling routine or all writing to the same >>set of error files? I just wasn't sure how Perl would handle such a >>situation. >> >>Thanks for the feedback. >> >>Bobby >> >>-----Original Message----- >>From: Scott Walters [mailto:scott@illogics.org] >>Sent: Tuesday, July 27, 2004 5:16 PM >>To: Metz, Bobby W, WCS >>Cc: phoenix-pm@pm.org >>Subject: Re: [Phoenix-pm] greetings >> >> >>What module exactly are you using? Things that lend themselves well to >>threads usually lend themselves well to coroutines as well, with one >>exception - if you're trying to use two modules, each of which has their >> >>own event loop, coroutines don't directly work - you have to break >>the event loop down. (If a module supports the Event module for a >>communal >>event loop, Coro has glue into Event, so this works). >> >>For example, if you're using Net::IRC with Tk, and Net::IRC wants you to >>call >>Net::IRC::start to hand over control of the program and Tk wants you to >>call >>Tk::MainLoop to give up the CPU, you have a delimma. Threads solve this >>by >>creating additional "virtual CPUs", wheres coroutines only help you >>juggle your >>one CPU. You'd have to extract the relavent filehandles, build your own >>Event loop using Coro::Handle::unblock or Coro::Event::io, and then call >>the >>do_one_loop() loop in Net::IRC and the equivilent in Tk to do a single >>pass through >>their private event loops without giving up control of the CPU. >> >>Modules that don't have an event loop at all work great - they don't try >>to >>hold onto the CPU indefinately. So, it depends on the exact module >>you're using =) >> >>-soctt >> >>On 0, "Metz, Bobby W, WCS" wrote: >> >> >>>Hmmm...these all sound interesting so maybe I should ask a pointed >>>question now. I do a lot of net admin stuff involving SNMP polling >>> >>> >>and >> >> >>>currently most of my tools are "single-threaded", i.e. I poll one >>> >>> >>device >> >> >>>at a time. Based on the options presented, what would be the easiest >>>means of changing to a setup of polling say 10 devices at the same >>> >>> >>time >> >> >>>with the main script retaining control and reporting responsibilities? >>> >>>Thanks, >>> >>>Bobby >>> >>>-----Original Message----- >>>From: phoenix-pm-bounces@pm.org [mailto:phoenix-pm-bounces@pm.org]On >>>Behalf Of Anthony Nemmer >>>Sent: Tuesday, July 27, 2004 7:44 AM >>>To: Scott Walters >>>Cc: phoenix-pm@pm.org >>>Subject: Re: [Phoenix-pm] greetings >>> >>> >>>Unix pipes implement a kind of coroutine chain of unix commands. >>> >>>Scott Walters wrote: >>> >>> >>> >>>>Well, coroutines are a lot like POE (or Event, or Stem), except >>>>when the event happens, rather than another routine being called, the >>>>current is allowed to continue. This means that you don't have to >>>>tuck all of your variables into an object to preserve them, >>>>and you don't have to return out of for() loops, if() statements, >>>>deeply nested function calls, and so on... but the POE stuff >>>>about not shooting yourself in the foot with threads still >>>>applies. And no special version of modules are required, >>>>as with threads. >>>> >>>>Here's a little script tht demonstrates continuations: >>>> >>>> use Coro; >>>> use Coro::Cont; >>>> >>>> use File::Find; >>>> use Perl6::Variables; >>>> >>>> sub get_next_perl :Cont { >>>> find(sub { >>>> return unless m/\.pl$/; >>>> open my $pl, '<', $_ or return; >>>> (my $shebang) = <$pl> =~ m/^#!(\S+)/ or return; >>>> yield $shebang; >>>> }, '/'); >>>> return undef; >>>> } >>>> >>>> while(my $_ = get_next_perl()) { >>>> last unless defined $_; >>>> print $_, "\n"; >>>> } >>>> >>>>This tries to find all of the Perl itnerpreters on your system that >>>> >>>> >>are >> >> >>>>in use. Coroutines are used to create detached processes and >>>> >>>> >>>continuations >>> >>> >>>>are used to create closely coupled processes. In this case, control >>>>flops back and forth between get_next_perl() and the while(). Even >>>>as control flops back, the lexical variables inside get_next_perl() >>>>keep their value. More importantly, the call to File::Find::find() >>>> >>>> >>>isn't >>> >>> >>>>exected out of. It would suck if that had to be restarted each time >>>>we wanted to know what interpreter the next file used. Likewise with >>>> >>>> >>a >> >> >>>>network application, this would be responsive, whereas storing >>>> >>>> >>>everything >>> >>> >>>>in an array and returning a reference would wait a really long time >>>> >>>> >>and >> >> >>>then >>> >>> >>>>suddenly have a whole bunch of data. >>>> >>>>Hrm. I should write some examples of gluing POE to Coro. Event >>>> >>>> >>handler >> >> >>>stubs >>> >>> >>>>could execute a ->transfer() to transfer control to a specific >>>> >>>> >>>coroutine. >>> >>> >>>>I wonder how Coro::Event does it... >>>> >>>>-scott >>>> >>>>On 0, Artful wrote: >>>> >>>> >>>> >>>> >>>>>>Anyone into multi-threaded perl programming? It's something I have >>>>>> >>>>>> >>>no >>> >>> >>>>>>experience in and would love to see an overview if anyone is >>>>>> >>>>>> >>willing. >> >> >>>>>>Just a thought. >>>>>> >>>>>>Bobby >>>>>> >>>>>> >>>>>> >>>>>> >>>>>Threading in perl is cumbersome at best. I am falling in love with >>>>> >>>>> >>>POE. >>> >>> >>>>>http://poe.perl.org/ >>>>> >>>>>At first glance, it can seem complex, but the concept is pretty >>>>> >>>>> >>simple >> >> >>>and >>> >>> >>>>>it is easy to pick up. There are a couple of recent articles at >>>>> >>>>> >>>perl.com >>> >>> >>>>>covering it: http://www.perl.com/pub/a/2004/07/02/poeintro.html and >>>>>http://www.perl.com/pub/a/2004/07/22/poe.html >>>>> >>>>>-Art- >>>>>_______________________________________________ >>>>>Phoenix-pm mailing list >>>>>Phoenix-pm@pm.org >>>>>http://www.pm.org/mailman/listinfo/phoenix-pm >>>>> >>>>> >>>>> >>>>> >>>>_______________________________________________ >>>>Phoenix-pm mailing list >>>>Phoenix-pm@pm.org >>>>http://www.pm.org/mailman/listinfo/phoenix-pm >>>> >>>> >>>> >>>> >>>> >>>> >>>-- >>> >>>SKYKING, SKYKING, DO NOT ANSWER. >>> >>> >>>_______________________________________________ >>>Phoenix-pm mailing list >>>Phoenix-pm@pm.org >>>http://www.pm.org/mailman/listinfo/phoenix-pm >>> >>>_______________________________________________ >>>Phoenix-pm mailing list >>>Phoenix-pm@pm.org >>>http://www.pm.org/mailman/listinfo/phoenix-pm >>> >>> >>_______________________________________________ >>Phoenix-pm mailing list >>Phoenix-pm@pm.org >>http://www.pm.org/mailman/listinfo/phoenix-pm >> >> >_______________________________________________ >Phoenix-pm mailing list >Phoenix-pm@pm.org >http://www.pm.org/mailman/listinfo/phoenix-pm > > > > -- SKYKING, SKYKING, DO NOT ANSWER. From ahenry-pm at artful2099.com Wed Jul 28 12:40:56 2004 From: ahenry-pm at artful2099.com (Artful) Date: Mon Aug 2 21:35:06 2004 Subject: [Phoenix-pm] greetings In-Reply-To: <456FD0E7B215B24ABBAD711614E4A7A20938C4E4@OCCLUST03EVS1.ugd.att.com> References: <456FD0E7B215B24ABBAD711614E4A7A20938C4E4@OCCLUST03EVS1.ugd.att.com> Message-ID: <52932.171.161.160.10.1091036456.squirrel@empiresquare.com> > Hmmm...these all sound interesting so maybe I should ask a pointed > question now. I do a lot of net admin stuff involving SNMP polling and > currently most of my tools are "single-threaded", i.e. I poll one device > at a time. Based on the options presented, what would be the easiest > means of changing to a setup of polling say 10 devices at the same time > with the main script retaining control and reporting responsibilities? I would highly suggest Parallel::ForkManager for this task. A real threaded solution would probably be way overkill for what you are doing. I use Parallel::ForkManager all the time, it works very well. The following code will run 3 child processes in parallel. The module handles all of the forking and keeping track of how many children have been forked. The wait_all_children() will block until all of the child processes have finished, so you don't print out the stats until all of the processes have completed. #!/usr/bin/perl use strict; use Parallel::ForkManager; my $MAX_PROCESSES = 3; my @hosts = ('dopey', 'grumpy', 'doc', 'happy', 'bashful', 'sneezy', 'sleepy'); $pm = new Parallel::ForkManager($MAX_PROCESSES); my %snmp_info; foreach my $host (@hosts) { $pm->start and next; $snmp_info{$host} = &get_snmp_info($host); $pm->finish; } $pm->wait_all_children; foreach my $host (sort @hosts) { print "$host: $snmp_info{$host}\n"; } From ahenry-pm at artful2099.com Wed Jul 28 12:52:24 2004 From: ahenry-pm at artful2099.com (Artful) Date: Mon Aug 2 21:35:06 2004 Subject: [Phoenix-pm] greetings In-Reply-To: <20040728113105.GJ21852@illogics.org> References: <20040728113105.GJ21852@illogics.org> Message-ID: <30316.171.161.160.10.1091037144.squirrel@empiresquare.com> > Perl programs won't "see" this module by default as its in a place that > perl > wasn't told about when it was built (and it isn't in the default place to > install modules), but you can easily tell perl about it by saying: > > use lib '/usr/local/share/departments/r_and_d/shared_files/mp3s/'; > > Then the 'use' for that module will work: > > use Foo::Bar; > > You could even install the module into your home directory, as long as > permissions were in order for your college's to see the module... > or they could install a copy in their home directory and do something in > the program using the module like: > > BEGIN { > my($name,$passwd,$uid,$gid, > $quota,$comment,$gcos,$dir,$shell,$expire) = getpwuid $<; > push @INC, $dir . '/perl_modules'; > } > > But that's fugly =P I develop a lot of perl modules for my applications and I always install them outside of the standard @INC directories. For a while I was using the "use lib" command at the beginning of my scripts, but this wasn't very portable. I have found the best way to handle this is to use the PERL5LIB environment variable. Putting something like "export PERL5LIB=$PERL5LIB:~/lib/perl5/" or "export PERL5LIB=$PERL5LIB:/usr/local/share/departments/r_and_d/shared_files/mp3s/" into your .profile will add the directory to your @INC every time to log in. -Art-