From storm at iparadigms.com Wed Jan 2 14:36:02 2008 From: storm at iparadigms.com (Christian Storm) Date: Wed, 2 Jan 2008 14:36:02 -0800 Subject: [sf-perl] Testing a web crawler In-Reply-To: References: <003a01c84674$5ebfd500$4301a8c0@Untangle.local> <000101c84b21$b733ac00$259b0400$@com> Message-ID: <1E586BC7-841B-4E51-BCE5-84B0AF3ED899@iparadigms.com> On Dec 30, 2007, at 2:47 PM, Michael Friedman wrote: > I haven't done work on search engines, but I do work with a journal > reference <-> journal citation matching algorithm that has to perform > similar discrimination between "good" and "not quite good enough" > matches. Do you use any of the Citation::Biblio or ParaTools::Citation modules to do the citation parsing/matching? I was interested in doing this also but didn't know if these were my best bet. From friedman at highwire.stanford.edu Wed Jan 2 15:02:03 2008 From: friedman at highwire.stanford.edu (Michael Friedman) Date: Wed, 2 Jan 2008 15:02:03 -0800 (PST) Subject: [sf-perl] Testing a web crawler In-Reply-To: <1E586BC7-841B-4E51-BCE5-84B0AF3ED899@iparadigms.com> References: <003a01c84674$5ebfd500$4301a8c0@Untangle.local> <000101c84b21$b733ac00$259b0400$@com> <1E586BC7-841B-4E51-BCE5-84B0AF3ED899@iparadigms.com> Message-ID: Unfortunately (for you, fortunately for me) I didn't write the code that pulls the citation reference data out of the input files. So I can't speak to either of the modules you mention. The input we receive is in well-tagged XML, so the producer of the files separates the parts out for us anyway. :-) All I had to do was the matching of data from reference to citation and v.v. within the database -- which is hard enough. However, I thank you for the reference to the modules! I know some folks who'd love to have a more generic way to grab citation information from flat text... Has anyone else attacked this problem? -- Mike On Wed, 2 Jan 2008, Christian Storm wrote: > > On Dec 30, 2007, at 2:47 PM, Michael Friedman wrote: >> I haven't done work on search engines, but I do work with a journal >> reference <-> journal citation matching algorithm that has to perform >> similar discrimination between "good" and "not quite good enough" >> matches. > > Do you use any of the Citation::Biblio or ParaTools::Citation modules to > do the citation parsing/matching? I was interested in doing this also > but didn't know > if these were my best bet. > _______________________________________________ > SanFrancisco-pm mailing list > SanFrancisco-pm at pm.org > http://mail.pm.org/mailman/listinfo/sanfrancisco-pm > --------------------------------------------------------------------- Michael Friedman --------------------------------------------------------------------- From cba at groundworkopensource.com Wed Jan 2 16:50:06 2008 From: cba at groundworkopensource.com (Chris B. Anderson) Date: Wed, 2 Jan 2008 16:50:06 -0800 Subject: [sf-perl] BayLISA Monitoring SIG: Weds, Jan 9 2008, 7PM Message-ID: (Hi: You're invited to the BayLISA Monitoring SIG, Weds, Jan 9 2008, 7PM. See the meeting announcement pasted below: feel free to post it and/or forward it along to anyone else who might be interested. Many thanks, and hope to see you there!) ================================================= Monitoring SIG XIII: Nagios Integration in Hyperic HQ Hyperic will present on Nagios integration and using Hyperic HQ's new Nagios plugin, which provides Nagios-like functionality out of HQ, including the use of Nagios plugins and configuration files, Come ready to share your own Nagios and Hyperic experiences, and be prepared to ask probing questions. Or bring the requirements for your proposed monitoring deployment and we'll compare and contrast it to this solution. What: BayLISA Monitoring SIG XIII: Nagios Integration in Hyperic HQ Who: Anyone interested in IT monitoring issues and tools (newbies particularly welcome!) When: Wednesday, Jan 9 2008, 7PM Where: GroundWork Open Source, 139 Townsend St., San Francisco How: 139 Townsend St. is very near AT&T Ballpark. It is one and a half blocks from the CalTrain Depot. Take the MUNI N, T or J trolley to 2nd and King (ballpark stop) or take the 30 or 45 bus (among others) crosstown. Free evening street parking can probably be found, and there are several fee-based parking garages around in case of parking difficulty. Cost: Free!! New Year's hot pizza, late vintage bubbly refreshments (i.e. soda), and wintry snacks provided by GroundWork. We'll open up the doors at 6:30 or so and start the formal part of the meeting promptly at 7PM. RSVP (not necessary, but helpful): Peter Mui, pmui at groundworkopensource.com, 415-992-4573 www.groundworkopensource.com -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mail.pm.org/pipermail/sanfrancisco-pm/attachments/20080102/edc3bb9c/attachment.html From david at fetter.org Sat Jan 5 12:34:20 2008 From: david at fetter.org (David Fetter) Date: Sat, 5 Jan 2008 12:34:20 -0800 Subject: [sf-perl] Using Your Favorite Language Inside Postgres Message-ID: <20080105203420.GF24102@fetter.org> David Fetter presents: Using Your Favorite Language Inside Postgres Carbon Five has kindly given us space for this meeting. Josh Berkus will make a brief but important announcement. RSVP at the address below to get fed! http://postgresql.meetup.com/1/calendar/6522343/ -- David Fetter http://fetter.org/ Phone: +1 415 235 3778 AIM: dfetter666 Yahoo!: dfetter Skype: davidfetter XMPP: david.fetter at gmail.com Remember to vote! Consider donating to Postgres: http://www.postgresql.org/about/donate From david at fetter.org Sat Jan 5 12:57:02 2008 From: david at fetter.org (David Fetter) Date: Sat, 5 Jan 2008 12:57:02 -0800 Subject: [sf-perl] Oops! Re: Using Your Favorite Language Inside Postgres In-Reply-To: <20080105203420.GF24102@fetter.org> References: <20080105203420.GF24102@fetter.org> Message-ID: <20080105205702.GJ24102@fetter.org> On Sat, Jan 05, 2008 at 12:34:20PM -0800, David Fetter wrote: > David Fetter presents: > Using Your Favorite Language Inside Postgres > > Carbon Five has kindly given us space for this meeting. > > Josh Berkus will make a brief but important announcement. > > RSVP at the address below to get fed! > > http://postgresql.meetup.com/1/calendar/6522343/ Sorry. This should read: http://postgresql.meetup.com/1/calendar/6904648/ Cheers, David. -- David Fetter http://fetter.org/ Phone: +1 415 235 3778 AIM: dfetter666 Yahoo!: dfetter Skype: davidfetter XMPP: david.fetter at gmail.com Remember to vote! Consider donating to Postgres: http://www.postgresql.org/about/donate From extasia at extasia.org Sat Jan 5 19:09:56 2008 From: extasia at extasia.org (David Alban) Date: Sat, 5 Jan 2008 19:09:56 -0800 Subject: [sf-perl] hostid in mac os x? In-Reply-To: <96CEC388-9DC3-419D-BD47-00607B0709A1@OserConsulting.com> References: <4c714a9c0612291517y7ce7f52cn5e2f1d7edc9f5b9c@mail.gmail.com> <20061229232537.GA31097@electricrain.com> <96CEC388-9DC3-419D-BD47-00607B0709A1@OserConsulting.com> Message-ID: <4c714a9c0801051909m79035ac5p1d265a5c21c32346@mail.gmail.com> Reference: http://mail.pm.org/pipermail/sanfrancisco-pm/2006-December/000814.html and followups i haven't used my module on a mac since then, but i now want to do so. fyi, my solution: create /usr/local/bin/hostid, which contains: #!/bin/bash export PATH=/sbin:/bin:/usr/sbin:/usr/bin ifconfig en0 | grep ether | awk '{ print $2 }' | sed 's/://g' i want a hostid because there's a routine in my module which sends email, and i add an 'X-Hostid' header to each message. -- Live in a world of your own, but always welcome visitors. From nheller at silcon.com Sat Jan 5 20:41:17 2008 From: nheller at silcon.com (Neil Heller) Date: Sat, 5 Jan 2008 20:41:17 -0800 Subject: [sf-perl] hostid in mac os x? In-Reply-To: <4c714a9c0801051909m79035ac5p1d265a5c21c32346@mail.gmail.com> References: <4c714a9c0612291517y7ce7f52cn5e2f1d7edc9f5b9c@mail.gmail.com> <20061229232537.GA31097@electricrain.com> <96CEC388-9DC3-419D-BD47-00607B0709A1@OserConsulting.com> <4c714a9c0801051909m79035ac5p1d265a5c21c32346@mail.gmail.com> Message-ID: <000001c8501e$60acfdd0$2206f970$@com> Are you running a bash shell on a MAC? Neil Heller 510-862-4387 -----Original Message----- From: sanfrancisco-pm-bounces+nheller=silcon.com at pm.org [mailto:sanfrancisco-pm-bounces+nheller=silcon.com at pm.org] On Behalf Of David Alban Sent: Saturday, January 05, 2008 7:10 PM To: San Francisco Perl Mongers User Group Subject: Re: [sf-perl] hostid in mac os x? Reference: http://mail.pm.org/pipermail/sanfrancisco-pm/2006-December/000814.html and followups i haven't used my module on a mac since then, but i now want to do so. fyi, my solution: create /usr/local/bin/hostid, which contains: #!/bin/bash export PATH=/sbin:/bin:/usr/sbin:/usr/bin ifconfig en0 | grep ether | awk '{ print $2 }' | sed 's/://g' i want a hostid because there's a routine in my module which sends email, and i add an 'X-Hostid' header to each message. -- Live in a world of your own, but always welcome visitors. _______________________________________________ SanFrancisco-pm mailing list SanFrancisco-pm at pm.org http://mail.pm.org/mailman/listinfo/sanfrancisco-pm From extasia at extasia.org Sun Jan 6 07:53:31 2008 From: extasia at extasia.org (David Alban) Date: Sun, 6 Jan 2008 07:53:31 -0800 Subject: [sf-perl] hostid in mac os x? In-Reply-To: <000001c8501e$60acfdd0$2206f970$@com> References: <4c714a9c0612291517y7ce7f52cn5e2f1d7edc9f5b9c@mail.gmail.com> <20061229232537.GA31097@electricrain.com> <96CEC388-9DC3-419D-BD47-00607B0709A1@OserConsulting.com> <4c714a9c0801051909m79035ac5p1d265a5c21c32346@mail.gmail.com> <000001c8501e$60acfdd0$2206f970$@com> Message-ID: <4c714a9c0801060753h731872d5sd1341d3df00e39a6@mail.gmail.com> Yes. In OS X. On Jan 5, 2008 8:41 PM, Neil Heller wrote: > Are you running a bash shell on a MAC? -- Live in a world of your own, but always welcome visitors. From nheller at silcon.com Sun Jan 6 12:14:06 2008 From: nheller at silcon.com (Neil Heller) Date: Sun, 6 Jan 2008 12:14:06 -0800 Subject: [sf-perl] hostid in mac os x? In-Reply-To: <4c714a9c0801060753h731872d5sd1341d3df00e39a6@mail.gmail.com> References: <4c714a9c0612291517y7ce7f52cn5e2f1d7edc9f5b9c@mail.gmail.com> <20061229232537.GA31097@electricrain.com> <96CEC388-9DC3-419D-BD47-00607B0709A1@OserConsulting.com> <4c714a9c0801051909m79035ac5p1d265a5c21c32346@mail.gmail.com> <000001c8501e$60acfdd0$2206f970$@com> <4c714a9c0801060753h731872d5sd1341d3df00e39a6@mail.gmail.com> Message-ID: <001001c850a0$b0e47210$12ad5630$@com> What shell is standard (if there is such a thing) in OS X? Is it easy to run the KORN shell or CShell? Do those come with the OS or do you have to go to a third party to get them? Neil Heller 510-862-4387 -----Original Message----- From: sanfrancisco-pm-bounces+nheller=silcon.com at pm.org [mailto:sanfrancisco-pm-bounces+nheller=silcon.com at pm.org] On Behalf Of David Alban Sent: Sunday, January 06, 2008 7:54 AM To: San Francisco Perl Mongers User Group Subject: Re: [sf-perl] hostid in mac os x? Yes. In OS X. On Jan 5, 2008 8:41 PM, Neil Heller wrote: > Are you running a bash shell on a MAC? -- Live in a world of your own, but always welcome visitors. _______________________________________________ SanFrancisco-pm mailing list SanFrancisco-pm at pm.org http://mail.pm.org/mailman/listinfo/sanfrancisco-pm From biztos at mac.com Sun Jan 6 13:37:10 2008 From: biztos at mac.com (Kevin Frost) Date: Sun, 6 Jan 2008 13:37:10 -0800 Subject: [sf-perl] hostid in mac os x? In-Reply-To: <001001c850a0$b0e47210$12ad5630$@com> References: <4c714a9c0612291517y7ce7f52cn5e2f1d7edc9f5b9c@mail.gmail.com> <20061229232537.GA31097@electricrain.com> <96CEC388-9DC3-419D-BD47-00607B0709A1@OserConsulting.com> <4c714a9c0801051909m79035ac5p1d265a5c21c32346@mail.gmail.com> <000001c8501e$60acfdd0$2206f970$@com> <4c714a9c0801060753h731872d5sd1341d3df00e39a6@mail.gmail.com> <001001c850a0$b0e47210$12ad5630$@com> Message-ID: <8E476DF7-6A26-4ACD-9B56-58EB75B75547@mac.com> BASH is standard. An awful lot of normal, familiar UNIX is running under all that sexy Jobso eye candy. frost at mb ~ $ echo $SHELL /bin/bash frost at mb ~ $ ls -alF /bin/*sh -rwxr-xr-x 1 root wheel 1244912 Sep 23 18:41 /bin/bash* -rwxr-xr-x 2 root wheel 610864 Sep 23 19:10 /bin/csh* -r-xr-xr-x 1 root wheel 2103664 Sep 23 22:46 /bin/ksh* -r-xr-xr-x 1 root wheel 1244944 Sep 23 18:45 /bin/sh* -rwxr-xr-x 2 root wheel 610864 Sep 23 19:10 /bin/tcsh* -rwxr-xr-x 2 root wheel 982000 Sep 23 18:40 /bin/zsh* frost at mb ~ $ A lot of other stuff is available through MacPorts, though they have some sporadic packaging problems so some of the more complicated things (like PerlMagick) often won't compile with the normal `sudo port install foo` business. But I've found most everything can be hacked into working with a little effort. I do a lot of development on OS X that targets various flavors of Linux. I've lately found a sort of nerdvana in running a Linux server inside VMWare Fusion with a shared directory, so I use my Mac toolchain to code and jump over to the VM to run my tests and so on. It's so transparent I sometimes forget I've got the VM running. (VMs are only a real option on the newer, Intel Macs.) Some useful links for UNIX fans thinking of switching: http://www.macports.org/ http://www.macromates.com/ - awesome programmer's editor http://www.vmware.com/products/fusion/ http://www.parallels.com/ - the other VM for Intel Macs http://www.apple.com/macosx/features/unix/ http://iterm.sourceforge.net/ - popular alternative to the system terminal Also, as of Leopard (the new OS release, 10.5) system perl is 5.8.8: frost at mb ~ $ perl -v This is perl, v5.8.8 built for darwin-thread-multi-2level (with 1 registered patch, see perl -V for more detail) ...etc... cheers -- frosty On Jan 6, 2008, at 12:14 PM, Neil Heller wrote: > What shell is standard (if there is such a thing) in OS X? > Is it easy to run the KORN shell or CShell? > Do those come with the OS or do you have to go to a third party to > get them? > > Neil Heller > 510-862-4387 > > > -----Original Message----- > From: sanfrancisco-pm-bounces+nheller=silcon.com at pm.org > [mailto:sanfrancisco-pm-bounces+nheller=silcon.com at pm.org] On Behalf > Of > David Alban > Sent: Sunday, January 06, 2008 7:54 AM > To: San Francisco Perl Mongers User Group > Subject: Re: [sf-perl] hostid in mac os x? > > Yes. In OS X. > > On Jan 5, 2008 8:41 PM, Neil Heller wrote: >> Are you running a bash shell on a MAC? > > -- > Live in a world of your own, but always welcome visitors. > _______________________________________________ > SanFrancisco-pm mailing list > SanFrancisco-pm at pm.org > http://mail.pm.org/mailman/listinfo/sanfrancisco-pm > > _______________________________________________ > SanFrancisco-pm mailing list > SanFrancisco-pm at pm.org > http://mail.pm.org/mailman/listinfo/sanfrancisco-pm From masri at nolex.com Sun Jan 6 14:03:07 2008 From: masri at nolex.com (Adam Masri) Date: Sun, 6 Jan 2008 14:03:07 -0800 Subject: [sf-perl] hostid in mac os x? In-Reply-To: <8E476DF7-6A26-4ACD-9B56-58EB75B75547@mac.com> References: <4c714a9c0612291517y7ce7f52cn5e2f1d7edc9f5b9c@mail.gmail.com> <20061229232537.GA31097@electricrain.com> <96CEC388-9DC3-419D-BD47-00607B0709A1@OserConsulting.com> <4c714a9c0801051909m79035ac5p1d265a5c21c32346@mail.gmail.com> <000001c8501e$60acfdd0$2206f970$@com> <4c714a9c0801060753h731872d5sd1341d3df00e39a6@mail.gmail.com> <001001c850a0$b0e47210$12ad5630$@com> <8E476DF7-6A26-4ACD-9B56-58EB75B75547@mac.com> Message-ID: <29F504A3-1BC6-46AB-874C-FF6EC4E7E3F6@nolex.com> fink is another alternative package manager, although I'm not really sure at this point which one is more reliable/easier to use/has more packages. I've used fink in previous versions of OS X, but it always takes them a little while to get up & running flawlessly on new OS releases. 10.4 & before should work great, 10.5 is still a little buggy but they're getting there. If anyone has tested both & has thoughts / comments that would be interesting. http://www.finkproject.org/ On Jan 6, 2008, at 1:37 PM, Kevin Frost wrote: > A lot of other stuff is available through MacPorts, though they have > some sporadic packaging problems so some of the more complicated > things (like PerlMagick) often won't compile with the normal `sudo > port install foo` business. But I've found most everything can be > hacked into working with a little effort. Adam Masri masri at nolex.com President www.nolex.com Nolex From bh1 at light42.com Sun Jan 6 14:31:26 2008 From: bh1 at light42.com (Brian Hamlin) Date: Sun, 6 Jan 2008 14:31:26 -0800 Subject: [sf-perl] hostid in mac os x? In-Reply-To: <29F504A3-1BC6-46AB-874C-FF6EC4E7E3F6@nolex.com> References: <4c714a9c0612291517y7ce7f52cn5e2f1d7edc9f5b9c@mail.gmail.com> <20061229232537.GA31097@electricrain.com> <96CEC388-9DC3-419D-BD47-00607B0709A1@OserConsulting.com> <4c714a9c0801051909m79035ac5p1d265a5c21c32346@mail.gmail.com> <000001c8501e$60acfdd0$2206f970$@com> <4c714a9c0801060753h731872d5sd1341d3df00e39a6@mail.gmail.com> <001001c850a0$b0e47210$12ad5630$@com> <8E476DF7-6A26-4ACD-9B56-58EB75B75547@mac.com> <29F504A3-1BC6-46AB-874C-FF6EC4E7E3F6@nolex.com> Message-ID: <1E26FF5C-BCA7-11DC-9E67-000A277A733C@light42.com> I have only anecdotal evidence.. Basically, unix ports, whether via Fink or MacPorts (straight outta BSD), will always suffer in the windowing and fonts department. If you are installing a faceless server kind of thing, you are probably in good shape. xMagick and all rely on some font management, and thats where I draw the line on installs for my Macs. I am successfully using a pretty full featured imaging package, with a slew if imaging engines, like TIFF and JPEG and others, but again, its bits only, and faceless. OS 10.4, PowerPC.. couple variations... Meanwhile, those VMs are getting more a more solid, with hardware to support it. The rumor around here is that Parallels works a little better than VM Ware on a Mac. So its been said by someone who has put in the hours.. Those that can are buying high-end dual Xeon Macs with all the ram they can find. And it works. Yes, the VMs are for Intel. So if you need 100% environment compatibility, build it with a VM. Meanwhile, plenty of things work very well on BSD/Mac these days. On Jan 6, 2008, at 2:03 PM, Adam Masri wrote: > fink is another alternative package manager, although I'm not really > sure at this point which one is more reliable/easier to use/has more > packages. I've used fink in previous versions of OS X, but it always > takes them a little while to get up & running flawlessly on new OS > releases. 10.4 & before should work great, 10.5 is still a little > buggy but they're getting there. If anyone has tested both & has > thoughts / comments that would be interesting. > > http://www.finkproject.org/ > > On Jan 6, 2008, at 1:37 PM, Kevin Frost wrote: > >> A lot of other stuff is available through MacPorts, though they have >> some sporadic packaging problems so some of the more complicated >> things (like PerlMagick) often won't compile with the normal `sudo >> port install foo` business. But I've found most everything can be >> hacked into working with a little effort. > > > Adam Masri masri at nolex.com > President www.nolex.com > Nolex > > _______________________________________________ > SanFrancisco-pm mailing list > SanFrancisco-pm at pm.org > http://mail.pm.org/mailman/listinfo/sanfrancisco-pm From masri at nolex.com Sun Jan 6 15:15:47 2008 From: masri at nolex.com (Adam Masri) Date: Sun, 6 Jan 2008 15:15:47 -0800 Subject: [sf-perl] hostid in mac os x? In-Reply-To: <1E26FF5C-BCA7-11DC-9E67-000A277A733C@light42.com> References: <4c714a9c0612291517y7ce7f52cn5e2f1d7edc9f5b9c@mail.gmail.com> <20061229232537.GA31097@electricrain.com> <96CEC388-9DC3-419D-BD47-00607B0709A1@OserConsulting.com> <4c714a9c0801051909m79035ac5p1d265a5c21c32346@mail.gmail.com> <000001c8501e$60acfdd0$2206f970$@com> <4c714a9c0801060753h731872d5sd1341d3df00e39a6@mail.gmail.com> <001001c850a0$b0e47210$12ad5630$@com> <8E476DF7-6A26-4ACD-9B56-58EB75B75547@mac.com> <29F504A3-1BC6-46AB-874C-FF6EC4E7E3F6@nolex.com> <1E26FF5C-BCA7-11DC-9E67-000A277A733C@light42.com> Message-ID: <3FD1981F-F96E-4A02-AA5D-A23C1AB8CFF6@nolex.com> For those considering a VM on Intel Macs, have a look at this useful review of your options and how they stack up. This might be a nice alternative for you, allowing you to test your application development in the same server environment it will eventually be deployed on (assuming you're not using MacOS X Server, of course ;) ). http://www.mactech.com/articles/mactech/Vol.24/24.02/VirtualizationBenchmark/ On Jan 6, 2008, at 2:31 PM, Brian Hamlin wrote: > I have only anecdotal evidence.. > Basically, unix ports, whether via Fink or MacPorts (straight outta > BSD), will > always suffer in the windowing and fonts department. If you are > installing > a faceless server kind of thing, you are probably in good shape. > xMagick > and all rely on some font management, and thats where I draw the line > on installs for my Macs. > > I am successfully using a pretty full featured imaging package, with a > slew if imaging engines, like TIFF and JPEG and others, but again, > its bits only, and faceless. OS 10.4, PowerPC.. couple variations... > > Meanwhile, those VMs are getting more a more solid, with hardware > to support it. The rumor around here is that Parallels works a little > better than VM Ware on a Mac. So its been said by someone who > has put in the hours.. Those that can are buying high-end dual Xeon > Macs with all the ram they can find. And it works. Yes, the VMs are > for > Intel. > > So if you need 100% environment compatibility, build it with a VM. > Meanwhile, plenty of things work very well on BSD/Mac these days. > > > On Jan 6, 2008, at 2:03 PM, Adam Masri wrote: > >> fink is another alternative package manager, although I'm not really >> sure at this point which one is more reliable/easier to use/has more >> packages. I've used fink in previous versions of OS X, but it always >> takes them a little while to get up & running flawlessly on new OS >> releases. 10.4 & before should work great, 10.5 is still a little >> buggy but they're getting there. If anyone has tested both & has >> thoughts / comments that would be interesting. >> >> http://www.finkproject.org/ >> >> On Jan 6, 2008, at 1:37 PM, Kevin Frost wrote: >> >>> A lot of other stuff is available through MacPorts, though they have >>> some sporadic packaging problems so some of the more complicated >>> things (like PerlMagick) often won't compile with the normal `sudo >>> port install foo` business. But I've found most everything can be >>> hacked into working with a little effort. >> >> >> Adam Masri masri at nolex.com >> President www.nolex.com >> Nolex >> >> _______________________________________________ >> SanFrancisco-pm mailing list >> SanFrancisco-pm at pm.org >> http://mail.pm.org/mailman/listinfo/sanfrancisco-pm > > _______________________________________________ > SanFrancisco-pm mailing list > SanFrancisco-pm at pm.org > http://mail.pm.org/mailman/listinfo/sanfrancisco-pm Adam Masri masri at nolex.com President www.nolex.com Nolex From merlyn at stonehenge.com Sun Jan 6 15:31:14 2008 From: merlyn at stonehenge.com (Randal L. Schwartz) Date: Sun, 06 Jan 2008 15:31:14 -0800 Subject: [sf-perl] hostid in mac os x? In-Reply-To: <1E26FF5C-BCA7-11DC-9E67-000A277A733C@light42.com> (Brian Hamlin's message of "Sun, 6 Jan 2008 14:31:26 -0800") References: <4c714a9c0612291517y7ce7f52cn5e2f1d7edc9f5b9c@mail.gmail.com> <20061229232537.GA31097@electricrain.com> <96CEC388-9DC3-419D-BD47-00607B0709A1@OserConsulting.com> <4c714a9c0801051909m79035ac5p1d265a5c21c32346@mail.gmail.com> <000001c8501e$60acfdd0$2206f970$@com> <4c714a9c0801060753h731872d5sd1341d3df00e39a6@mail.gmail.com> <001001c850a0$b0e47210$12ad5630$@com> <8E476DF7-6A26-4ACD-9B56-58EB75B75547@mac.com> <29F504A3-1BC6-46AB-874C-FF6EC4E7E3F6@nolex.com> <1E26FF5C-BCA7-11DC-9E67-000A277A733C@light42.com> Message-ID: <86prwe1qgt.fsf@blue.stonehenge.com> >>>>> "Brian" == Brian Hamlin writes: Brian> Basically, unix ports, whether via Fink or MacPorts (straight outta Brian> BSD), will always suffer in the windowing and fonts department. If you Brian> are installing a faceless server kind of thing, you are probably in Brian> good shape. Of course! The point of fink and macports isn't for building and installing native OSX tools. It's for installing unix command-line or x11-based tools, which won't have a clue about OSX fonts or any native GUI! Of the two, if I can install the same thing from either fink or macports, I prefer fink, generally because fink has prebuilt binaries for many things, and I'm often in a hurry. MacPorts always comes from the source. MacPorts also installs an entirely *separate* Perl on my box, which means I have three, one of which never gets used except very indirectly. -- Randal L. Schwartz - Stonehenge Consulting Services, Inc. - +1 503 777 0095 Perl/Unix/security consulting, Technical writing, Comedy, etc. etc. See PerlTraining.Stonehenge.com for onsite and open-enrollment Perl training! From bh1 at light42.com Sun Jan 6 16:24:22 2008 From: bh1 at light42.com (Brian Hamlin) Date: Sun, 6 Jan 2008 16:24:22 -0800 Subject: [sf-perl] hostid in mac os x? In-Reply-To: <86prwe1qgt.fsf@blue.stonehenge.com> References: <4c714a9c0612291517y7ce7f52cn5e2f1d7edc9f5b9c@mail.gmail.com> <20061229232537.GA31097@electricrain.com> <96CEC388-9DC3-419D-BD47-00607B0709A1@OserConsulting.com> <4c714a9c0801051909m79035ac5p1d265a5c21c32346@mail.gmail.com> <000001c8501e$60acfdd0$2206f970$@com> <4c714a9c0801060753h731872d5sd1341d3df00e39a6@mail.gmail.com> <001001c850a0$b0e47210$12ad5630$@com> <8E476DF7-6A26-4ACD-9B56-58EB75B75547@mac.com> <29F504A3-1BC6-46AB-874C-FF6EC4E7E3F6@nolex.com> <1E26FF5C-BCA7-11DC-9E67-000A277A733C@light42.com> <86prwe1qgt.fsf@blue.stonehenge.com> Message-ID: On Jan 6, 2008, at 3:31 PM, Randal L. Schwartz wrote: > Brian> Basically, unix ports, whether via Fink or MacPorts (straight > outta > Brian> BSD), will always suffer in the windowing and fonts department. > If you > Brian> are installing a faceless server kind of thing, you are > probably in > Brian> good shape. > > Of course! The point of fink and macports isn't for building and > installing > native OSX tools. It's for installing unix command-line or x11-based > tools, > which won't have a clue about OSX fonts or any native GUI! > y, I could have said "although X11 is there, I dont use it, or install ports that use it" Its supposed to work, but, it seems to be more work than joy for me.. for multiple perls, I leave that up to those more experienced than I ! I have one, on 10.4 its 5.8.6, which seems fine to me.. (python is another story, for another channel) ps - the Postgres package works really well -Brian From extasia at extasia.org Sun Jan 6 20:42:23 2008 From: extasia at extasia.org (David Alban) Date: Sun, 6 Jan 2008 20:42:23 -0800 Subject: [sf-perl] hostid in mac os x? In-Reply-To: References: <4c714a9c0612291517y7ce7f52cn5e2f1d7edc9f5b9c@mail.gmail.com> <4c714a9c0801051909m79035ac5p1d265a5c21c32346@mail.gmail.com> <000001c8501e$60acfdd0$2206f970$@com> <4c714a9c0801060753h731872d5sd1341d3df00e39a6@mail.gmail.com> <001001c850a0$b0e47210$12ad5630$@com> <8E476DF7-6A26-4ACD-9B56-58EB75B75547@mac.com> <29F504A3-1BC6-46AB-874C-FF6EC4E7E3F6@nolex.com> <1E26FF5C-BCA7-11DC-9E67-000A277A733C@light42.com> <86prwe1qgt.fsf@blue.stonehenge.com> Message-ID: <4c714a9c0801062042v2cc92db6nc9c86b45aa33e878@mail.gmail.com> on the other hoof, for anyone who is a heavy user of X11 and is thinking of upgrading to leopard, be aware that: "Unfortunately, Apple shipped X11 in Leopard as a work in progress and with many painful bugs." http://homepage.mac.com/sao1/X11/index.html i haven't yet tried the latest Xquartz package, but hope to soon, as i'd like for gimp not to crash, using the X display on my macbook pro (whether using a mac gimp client, or a linux gimp client). On Jan 6, 2008 4:24 PM, Brian Hamlin wrote: > I could have said "although X11 is there, I dont use it, or install > ports that > use it" Its supposed to work, but, it seems to be more work than joy > for me.. -- Live in a world of your own, but always welcome visitors. From afife at untangle.com Tue Jan 8 11:33:07 2008 From: afife at untangle.com (Andrew Fife) Date: Tue, 8 Jan 2008 11:33:07 -0800 (PST) Subject: [sf-perl] Eric S. Raymond @ BALUG (Next Tuesday) Message-ID: <002e01c8522d$52e2a450$0200a8c0@Untangle.local> Howdy Folks: Eric S. Raymond will be kicking off the start of a great 2008 at The Bay Area Linux Users Group (BALUG) with a talk on January 15th. If you haven't been to BALUG in a while, this a great opportunity to check out what we're up to... and who knows you may just wind up eating dinner with Eric S. Raymond at your table. If you'd like to come, please RSVP: RSVP at balug.org Upcoming 2008 speakers include: Jan - Eric S. Raymond Feb - Bruce Perens March 24th (New Date) - Mark Shuttleworth April - Eric Allman May - Jeremy Allison June - Andrew Morton So why not signup for BALUG's extremely low volume announce list: http://lists.balug.org/listinfo.cgi/balug-announce-balug.org Meeting Details... 6:30pm January 15th, 2008 (Next Tuesday) Four Seas Restaurant 731 Grant Ave. San Francisco, CA 94108 Parking: http://www.portsmouthsquaregarage.com/ Cost: The meetings are always free, but dinner is $13 About BALUG: BALUG is lively gathering of Linux users & free software enthusiasts that combines great food, community & intimate access to featured speakers. We meet in the bar of the Four Seas Restaurant from 6:30pm. At 7pm, we share a family-style Chinese dinner, which is followed by our guest speaker. BALUG Mailing list Policy: BALUG promises not to abuse other LUGs mailing lists. Our current policy is to make one monthly announcement on other Bay Area LUGs mailing lists. If you feel this is not appropriate for a particular list, please tell us which list and what you feel would be a more appropriate policy for that list. Please send feedback to balug-contact at balug.org. ---------------------------------------- Andrew Fife Untangle - Open Source Security Gateway download.untangle.com 650.425.3327 (O) 415.806.6028 (C) afife at untangle.com From gatorreina at gmail.com Tue Jan 8 12:58:21 2008 From: gatorreina at gmail.com (Richard Reina) Date: Tue, 8 Jan 2008 14:58:21 -0600 Subject: [sf-perl] Hanging with the diamond operator? Message-ID: <489cf9d0801081258u330d0313s99af6a803f845207@mail.gmail.com> The script below is called from another perl script that runs on linux console on a few machines here. The problem is that sometimes the script hangs. I believe this script is hanging at the line push(@lines, $_) unless (/espf\[/); I believe this because in cases when it hangs, if I do a Cntl-C I get: Not a subroutine reference at ./file_delimiter.pl line 24, <> line3. This is turning out to be a disruptive problem here. Any help would be greatly appreciated. #!/usr/bin/perl5 -w use warnings; use strict; sub delimit { my ($tos, $ccs, $rp, $sb, $body, $in_file) = @_; if (defined $in_file) { # file submited @ARGV = $in_file; $body = ""; while(<>) { push(@lines, $_) unless (/espf\[/); # hangs here sometimes } # end of while } # end of if } # end of sub From woof at danlo.com Tue Jan 8 13:17:32 2008 From: woof at danlo.com (Daniel Lo) Date: Tue, 8 Jan 2008 13:17:32 -0800 Subject: [sf-perl] Hanging with the diamond operator? In-Reply-To: <489cf9d0801081258u330d0313s99af6a803f845207@mail.gmail.com> References: <489cf9d0801081258u330d0313s99af6a803f845207@mail.gmail.com> Message-ID: <1861320409.20080108131732@danlo.com> Hello Richard, Could you provide a sample file that causes the problem? -daniel Tuesday, January 8, 2008, 12:58:21 PM, you wrote: > The script below is called from another perl script that runs on linux > console on a few machines here. The problem is that sometimes the > script hangs. > I believe this script is hanging at the line push(@lines, $_) unless (/espf\[/); > I believe this because in cases when it hangs, if I do a Cntl-C I get: > Not a subroutine reference at ./file_delimiter.pl line 24, <> line3. > This is turning out to be a disruptive problem here. Any help would > be greatly appreciated. > #!/usr/bin/perl5 -w > use warnings; > use strict; > sub delimit { > my ($tos, $ccs, $rp, $sb, $body, $in_file) = @_; > if (defined $in_file) { # file submited > @ARGV = $in_file; > $body = ""; > while(<>) { > push(@lines, $_) unless (/espf\[/); # hangs here sometimes > } # end of while > } # end of if > } # end of sub > _______________________________________________ > SanFrancisco-pm mailing list > SanFrancisco-pm at pm.org > http://mail.pm.org/mailman/listinfo/sanfrancisco-pm -- Best regards, Daniel mailto:woof at danlo.com From doom at kzsu.stanford.edu Tue Jan 8 13:20:01 2008 From: doom at kzsu.stanford.edu (Joe Brenner) Date: Tue, 08 Jan 2008 13:20:01 -0800 Subject: [sf-perl] Hanging with the diamond operator? In-Reply-To: <489cf9d0801081258u330d0313s99af6a803f845207@mail.gmail.com> References: <489cf9d0801081258u330d0313s99af6a803f845207@mail.gmail.com> Message-ID: <200801082120.m08LK1iM068368@kzsu.stanford.edu> Richard Reina wrote: > The script below is called from another perl script that runs on linux > console on a few machines here. The problem is that sometimes the > script hangs. How do you call the script? Everything inside it is inside a subroutine called "delmit", and nothing here calls the sub. Either you've trimmed this down radically from the real script, and/or it isn't really a "script", but a code library... From woof at danlo.com Tue Jan 8 13:29:50 2008 From: woof at danlo.com (Daniel Lo) Date: Tue, 8 Jan 2008 13:29:50 -0800 Subject: [sf-perl] Hanging with the diamond operator? In-Reply-To: <1861320409.20080108131732@danlo.com> References: <489cf9d0801081258u330d0313s99af6a803f845207@mail.gmail.com> <1861320409.20080108131732@danlo.com> Message-ID: <585163298.20080108132950@danlo.com> Hello Daniel, Does $in_file come over NFS? Sometimes when NFS hangs, it causes a weird fight between perl and the OS on freeBSD. -daniel Tuesday, January 8, 2008, 1:17:32 PM, you wrote: > Hello Richard, > Could you provide a sample file that causes the problem? > -daniel > Tuesday, January 8, 2008, 12:58:21 PM, you wrote: >> The script below is called from another perl script that runs on linux >> console on a few machines here. The problem is that sometimes the >> script hangs. >> I believe this script is hanging at the line push(@lines, $_) unless (/espf\[/); >> I believe this because in cases when it hangs, if I do a Cntl-C I get: >> Not a subroutine reference at ./file_delimiter.pl line 24, <> line3. >> This is turning out to be a disruptive problem here. Any help would >> be greatly appreciated. >> #!/usr/bin/perl5 -w >> use warnings; >> use strict; >> sub delimit { >> my ($tos, $ccs, $rp, $sb, $body, $in_file) = @_; >> if (defined $in_file) { # file submited >> @ARGV = $in_file; >> $body = ""; >> while(<>) { >> push(@lines, $_) unless (/espf\[/); # hangs here sometimes >> } # end of while >> } # end of if >> } # end of sub >> _______________________________________________ >> SanFrancisco-pm mailing list >> SanFrancisco-pm at pm.org >> http://mail.pm.org/mailman/listinfo/sanfrancisco-pm -- Best regards, Daniel mailto:woof at danlo.com From gatorreina at gmail.com Tue Jan 8 13:54:20 2008 From: gatorreina at gmail.com (Richard Reina) Date: Tue, 8 Jan 2008 15:54:20 -0600 Subject: [sf-perl] Hanging with the diamond operator? In-Reply-To: <200801082120.m08LK1iM068368@kzsu.stanford.edu> References: <489cf9d0801081258u330d0313s99af6a803f845207@mail.gmail.com> <200801082120.m08LK1iM068368@kzsu.stanford.edu> Message-ID: <489cf9d0801081354v3c7774afg2d6e650066da97e9@mail.gmail.com> Joe, Thank you very much for your reply. The file is called from a couple different scripts in one of the the following ways: with a file (in which case a file is submitted that needs to be checked for "epsf[". In these cases the sub sometimes hangs &delimit($T, $C, $R, $S, $B, $file); or w/o a file so the scalar $B will be the $body that winds up in the delimited file. In these cases while(<>) is never executed and the program never hangs. &delimit($T, $C, $R, $S, $B); It is trimmed down significantly chiefly because it is on a private network and it's a lot to retype. The only thing that happens after the while loop is that a new file is created containing delimiters in which the scalar $body is one of the delimited fields. The file is then rsynced to another local machine. Thanks for the help thus far. On 1/8/08, Joe Brenner wrote: > > Richard Reina wrote: > > > The script below is called from another perl script that runs on linux > > console on a few machines here. The problem is that sometimes the > > script hangs. > > How do you call the script? Everything inside it is inside a > subroutine called "delmit", and nothing here calls the sub. > > Either you've trimmed this down radically from the real script, > and/or it isn't really a "script", but a code library... > > _______________________________________________ > SanFrancisco-pm mailing list > SanFrancisco-pm at pm.org > http://mail.pm.org/mailman/listinfo/sanfrancisco-pm > From gatorreina at gmail.com Tue Jan 8 13:57:28 2008 From: gatorreina at gmail.com (Richard Reina) Date: Tue, 8 Jan 2008 15:57:28 -0600 Subject: [sf-perl] Hanging with the diamond operator? In-Reply-To: <585163298.20080108132950@danlo.com> References: <489cf9d0801081258u330d0313s99af6a803f845207@mail.gmail.com> <1861320409.20080108131732@danlo.com> <585163298.20080108132950@danlo.com> Message-ID: <489cf9d0801081357w6b499264x695e4b20bb63e81@mail.gmail.com> > > Does $in_file come over NFS? Sometimes when NFS hangs, it causes a weird > fight > between perl and the OS on freeBSD. > Daniel, Thanks for the reply. To answer you question no. $in_file is simply the name of a simple text file that exists on the same directory. If $in_file is defined it is checked for epsf[. From quinn at fairpath.com Tue Jan 8 14:01:01 2008 From: quinn at fairpath.com (Quinn Weaver) Date: Tue, 8 Jan 2008 14:01:01 -0800 Subject: [sf-perl] Hanging with the diamond operator? In-Reply-To: <489cf9d0801081258u330d0313s99af6a803f845207@mail.gmail.com> References: <489cf9d0801081258u330d0313s99af6a803f845207@mail.gmail.com> Message-ID: <20080108220101.GA48062@fu.funkspiel.org> On Tue, Jan 08, 2008 at 02:58:21PM -0600, Richard Reina wrote: > The script below is called from another perl script that runs on linux > console on a few machines here. The problem is that sometimes the > script hangs. > > I believe this script is hanging at the line push(@lines, $_) unless (/espf\[/); > Could this be a problem with the low-level activity of reading the file? Are you reading this file off of a network file system of some sort? <> will hang until it reaches a newline or EOF. > I believe this because in cases when it hangs, if I do a Cntl-C I get: > > Not a subroutine reference at ./file_delimiter.pl line 24, <> line3. I'm not sure where this is coming from. At first I thought perhaps you had done something like $SIG{INT} = \&no_such_sub; but on my Perl (v5.8.8) that gives a different error: SIGINT handler "no_such_sub" not defined. That said, I wouldn't worry about it too much. I think it's an artifact of your doing Ctrl-C, not a problem you'll encounter in Real Life. -- Quinn Weaver, independent contractor | President, San Francisco Perl Mongers http://fairpath.com/quinn/resume/ | http://sf.pm.org/ 510-520-5217 From quinn at fairpath.com Tue Jan 8 14:07:08 2008 From: quinn at fairpath.com (Quinn Weaver) Date: Tue, 8 Jan 2008 14:07:08 -0800 Subject: [sf-perl] Hanging with the diamond operator? In-Reply-To: <489cf9d0801081354v3c7774afg2d6e650066da97e9@mail.gmail.com> References: <489cf9d0801081258u330d0313s99af6a803f845207@mail.gmail.com> <200801082120.m08LK1iM068368@kzsu.stanford.edu> <489cf9d0801081354v3c7774afg2d6e650066da97e9@mail.gmail.com> Message-ID: <20080108220707.GB48062@fu.funkspiel.org> Follow-up: I agree with Joe. I don't think we'll be able to help any further without seeing more of your code (and files). Even then, we may not be able to reproduce the problem, if Daniel's and my common hunch is right and it's an NFS (or other SAN) glitch. I would suggest re-writing the code with non-blocking IO instead of <>, then seeing what kind of errors you get back (in $!). See the entry on sysread in the perlfunc(1) man page. Bummer about the private network thing. That's a pain. Are you sure you aren't getting yourself into trouble sending us code? -- Quinn Weaver, independent contractor | President, San Francisco Perl Mongers http://fairpath.com/quinn/resume/ | http://sf.pm.org/ 510-520-5217 From woof at danlo.com Tue Jan 8 14:25:07 2008 From: woof at danlo.com (Daniel Lo) Date: Tue, 8 Jan 2008 14:25:07 -0800 Subject: [sf-perl] Hanging with the diamond operator? In-Reply-To: <20080108220707.GB48062@fu.funkspiel.org> References: <489cf9d0801081258u330d0313s99af6a803f845207@mail.gmail.com> <200801082120.m08LK1iM068368@kzsu.stanford.edu> <489cf9d0801081354v3c7774afg2d6e650066da97e9@mail.gmail.com> <20080108220707.GB48062@fu.funkspiel.org> Message-ID: <1952633894.20080108142507@danlo.com> Log::Log4perl is could be a winner. You might want to try logging the "$in_file" names, along with a start and finish time. sub delimit { my ... DEBUG( 'Start :' . scalar localtime ); DEBUG( '$in_file :' . $in_file ); ... DEBUG ('End :' . scalar localtime ) ; } -daniel Tuesday, January 8, 2008, 2:07:08 PM, you wrote: > Follow-up: > I agree with Joe. I don't think we'll be able to help any further > without seeing more of your code (and files). > Even then, we may not be able to reproduce the problem, if Daniel's and my > common hunch is right and it's an NFS (or other SAN) glitch. > I would suggest re-writing the code with non-blocking IO instead of <>, > then seeing what kind of errors you get back (in $!). See the entry on sysread > in the perlfunc(1) man page. > Bummer about the private network thing. That's a pain. Are you sure you > aren't getting yourself into trouble sending us code? -- Best regards, Daniel mailto:woof at danlo.com From gatorreina at gmail.com Tue Jan 8 14:41:01 2008 From: gatorreina at gmail.com (Richard Reina) Date: Tue, 8 Jan 2008 16:41:01 -0600 Subject: [sf-perl] Hanging with the diamond operator? In-Reply-To: <20080108220101.GA48062@fu.funkspiel.org> References: <489cf9d0801081258u330d0313s99af6a803f845207@mail.gmail.com> <20080108220101.GA48062@fu.funkspiel.org> Message-ID: <489cf9d0801081441u7e5ceb45t8fa4736878e960d@mail.gmail.com> This is the error I get with perl 5.6.0. On 1/8/08, Quinn Weaver wrote: > On Tue, Jan 08, 2008 at 02:58:21PM -0600, Richard Reina wrote: > > The script below is called from another perl script that runs on linux > > console on a few machines here. The problem is that sometimes the > > script hangs. > > > > I believe this script is hanging at the line push(@lines, $_) unless > (/espf\[/); > > > > Could this be a problem with the low-level activity of reading the file? > Are you reading this file off of a network file system of some sort? > <> will hang until it reaches a newline or EOF. > > > I believe this because in cases when it hangs, if I do a Cntl-C I get: > > > > Not a subroutine reference at ./file_delimiter.pl line 24, <> line3. > > I'm not sure where this is coming from. At first I thought perhaps you > had done something like > > $SIG{INT} = \&no_such_sub; > > but on my Perl (v5.8.8) that gives a different error: > > SIGINT handler "no_such_sub" not defined. > > That said, I wouldn't worry about it too much. I think it's an artifact > of your doing Ctrl-C, not a problem you'll encounter in Real Life. > > -- > Quinn Weaver, independent contractor | President, San Francisco Perl > Mongers > http://fairpath.com/quinn/resume/ | http://sf.pm.org/ > 510-520-5217 > _______________________________________________ > SanFrancisco-pm mailing list > SanFrancisco-pm at pm.org > http://mail.pm.org/mailman/listinfo/sanfrancisco-pm > From gatorreina at gmail.com Tue Jan 8 14:43:29 2008 From: gatorreina at gmail.com (Richard Reina) Date: Tue, 8 Jan 2008 16:43:29 -0600 Subject: [sf-perl] Hanging with the diamond operator? In-Reply-To: <1952633894.20080108142507@danlo.com> References: <489cf9d0801081258u330d0313s99af6a803f845207@mail.gmail.com> <200801082120.m08LK1iM068368@kzsu.stanford.edu> <489cf9d0801081354v3c7774afg2d6e650066da97e9@mail.gmail.com> <20080108220707.GB48062@fu.funkspiel.org> <1952633894.20080108142507@danlo.com> Message-ID: <489cf9d0801081443l3807ec28w9c6f89a854f8835d@mail.gmail.com> I have never used DEBUG before I'll try this and see what happens. Thanks, RIchard On 1/8/08, Daniel Lo wrote: > Log::Log4perl is could be a winner. > > You might want to try logging the "$in_file" names, along with a start and > finish time. > > sub delimit { > my ... > DEBUG( 'Start :' . scalar localtime ); > DEBUG( '$in_file :' . $in_file ); > > ... > > DEBUG ('End :' . scalar localtime ) ; > } > > -daniel > > > > Tuesday, January 8, 2008, 2:07:08 PM, you wrote: > > > Follow-up: > > > I agree with Joe. I don't think we'll be able to help any further > > without seeing more of your code (and files). > > > Even then, we may not be able to reproduce the problem, if Daniel's and my > > common hunch is right and it's an NFS (or other SAN) glitch. > > > I would suggest re-writing the code with non-blocking IO instead of <>, > > then seeing what kind of errors you get back (in $!). See the entry on > sysread > > in the perlfunc(1) man page. > > > Bummer about the private network thing. That's a pain. Are you sure you > > aren't getting yourself into trouble sending us code? > > > > > -- > Best regards, > Daniel mailto:woof at danlo.com > > > _______________________________________________ > SanFrancisco-pm mailing list > SanFrancisco-pm at pm.org > http://mail.pm.org/mailman/listinfo/sanfrancisco-pm > From woof at danlo.com Tue Jan 8 14:48:21 2008 From: woof at danlo.com (Daniel Lo) Date: Tue, 8 Jan 2008 14:48:21 -0800 Subject: [sf-perl] Hanging with the diamond operator? In-Reply-To: <489cf9d0801081443l3807ec28w9c6f89a854f8835d@mail.gmail.com> References: <489cf9d0801081258u330d0313s99af6a803f845207@mail.gmail.com> <200801082120.m08LK1iM068368@kzsu.stanford.edu> <489cf9d0801081354v3c7774afg2d6e650066da97e9@mail.gmail.com> <20080108220707.GB48062@fu.funkspiel.org> <1952633894.20080108142507@danlo.com> <489cf9d0801081443l3807ec28w9c6f89a854f8835d@mail.gmail.com> Message-ID: <910432527.20080108144821@danlo.com> Hello Richard, Be sure to invoke Log::Log4perl this way.. use Log::Log4perl qw | :easy |; That makes DEBUG, INFO, WARN, ERROR, FATAL available as easy calls. -daniel Tuesday, January 8, 2008, 2:43:29 PM, you wrote: > I have never used DEBUG before I'll try this and see what happens. > Thanks, > RIchard > On 1/8/08, Daniel Lo wrote: >> Log::Log4perl is could be a winner. >> >> You might want to try logging the "$in_file" names, along with a start and >> finish time. >> >> sub delimit { >> my ... >> DEBUG( 'Start :' . scalar localtime ); >> DEBUG( '$in_file :' . $in_file ); >> >> ... >> >> DEBUG ('End :' . scalar localtime ) ; >> } >> >> -daniel >> >> >> >> Tuesday, January 8, 2008, 2:07:08 PM, you wrote: >> >> > Follow-up: >> >> > I agree with Joe. I don't think we'll be able to help any further >> > without seeing more of your code (and files). >> >> > Even then, we may not be able to reproduce the problem, if Daniel's and my >> > common hunch is right and it's an NFS (or other SAN) glitch. >> >> > I would suggest re-writing the code with non-blocking IO instead of <>, >> > then seeing what kind of errors you get back (in $!). See the entry on >> sysread >> > in the perlfunc(1) man page. >> >> > Bummer about the private network thing. That's a pain. Are you sure you >> > aren't getting yourself into trouble sending us code? >> >> >> >> >> -- >> Best regards, >> Daniel mailto:woof at danlo.com >> >> >> _______________________________________________ >> SanFrancisco-pm mailing list >> SanFrancisco-pm at pm.org >> http://mail.pm.org/mailman/listinfo/sanfrancisco-pm >> > _______________________________________________ > SanFrancisco-pm mailing list > SanFrancisco-pm at pm.org > http://mail.pm.org/mailman/listinfo/sanfrancisco-pm -- Best regards, Daniel mailto:woof at danlo.com From quinn at fairpath.com Thu Jan 10 00:28:59 2008 From: quinn at fairpath.com (Quinn Weaver) Date: Thu, 10 Jan 2008 00:28:59 -0800 Subject: [sf-perl] [OT] Used laptop place? Message-ID: <20080110082859.GA62631@fu.funkspiel.org> Hey, Can anyone recommend a good Bay Area place to buy a used laptop? My friend's just died a motherboardly death, in the middle of grad-school finals. :( Buying used would be best, but it has to be local, due to the time-frame. Thanks for your gracious replies to this tangentially-related-to-Perl post. :) -- Quinn Weaver, independent contractor | President, San Francisco Perl Mongers http://fairpath.com/quinn/resume/ | http://sf.pm.org/ 510-520-5217 From biztos at mac.com Thu Jan 10 01:01:50 2008 From: biztos at mac.com (Kevin Frost) Date: Thu, 10 Jan 2008 01:01:50 -0800 Subject: [sf-perl] [OT] Used laptop place? In-Reply-To: <20080110082859.GA62631@fu.funkspiel.org> References: <20080110082859.GA62631@fu.funkspiel.org> Message-ID: Craigslist? Apple has good refurb deals too, but that assumes you want a new-ish mac. I just read in the NYT that a lot of returns end up in ebay "shops." -- frosty (via iPhone) On Jan 10, 2008, at 12:28 AM, Quinn Weaver wrote: > Hey, > > Can anyone recommend a good Bay Area place to buy a used laptop? My > friend's just died a motherboardly death, in the middle of grad-school > finals. :( Buying used would be best, but it has to be local, due to > the time-frame. > > Thanks for your gracious replies to this tangentially-related-to- > Perl post. :) > > -- > Quinn Weaver, independent contractor | President, San Francisco > Perl Mongers > http://fairpath.com/quinn/resume/ | http://sf.pm.org/ > 510-520-5217 > _______________________________________________ > SanFrancisco-pm mailing list > SanFrancisco-pm at pm.org > http://mail.pm.org/mailman/listinfo/sanfrancisco-pm From masri at nolex.com Thu Jan 10 01:23:08 2008 From: masri at nolex.com (Adam Masri) Date: Thu, 10 Jan 2008 01:23:08 -0800 Subject: [sf-perl] [OT] Used laptop place? In-Reply-To: <20080110082859.GA62631@fu.funkspiel.org> References: <20080110082859.GA62631@fu.funkspiel.org> Message-ID: <4C3026D8-258D-45ED-BC26-A50339AA5A9D@nolex.com> As a Mac consultant, I often have clients trying to get out of older Macs when they buy a new system from my distributor. If your friend is interested in a Mac, I think I have a couple clients' laptops for sale right now. Email me off-list with a budget & I'll see what's available. On Jan 10, 2008, at 12:28 AM, Quinn Weaver wrote: > Hey, > > Can anyone recommend a good Bay Area place to buy a used laptop? My > friend's just died a motherboardly death, in the middle of grad-school > finals. :( Buying used would be best, but it has to be local, due to > the time-frame. > > Thanks for your gracious replies to this tangentially-related-to- > Perl post. :) > > -- > Quinn Weaver, independent contractor | President, San Francisco > Perl Mongers > http://fairpath.com/quinn/resume/ | http://sf.pm.org/ > 510-520-5217 > _______________________________________________ > SanFrancisco-pm mailing list > SanFrancisco-pm at pm.org > http://mail.pm.org/mailman/listinfo/sanfrancisco-pm Adam Masri masri at nolex.com President www.nolex.com Nolex From doom at kzsu.stanford.edu Thu Jan 10 04:24:05 2008 From: doom at kzsu.stanford.edu (Joe Brenner) Date: Thu, 10 Jan 2008 04:24:05 -0800 Subject: [sf-perl] [OT] Used laptop place? In-Reply-To: <20080110082859.GA62631@fu.funkspiel.org> References: <20080110082859.GA62631@fu.funkspiel.org> Message-ID: <200801101224.m0ACO5Xe003930@kzsu.stanford.edu> Quinn Weaver wrote: > Can anyone recommend a good Bay Area place to buy a used laptop? My > friend's just died a motherboardly death, in the middle of grad-school > finals. :( Buying used would be best, but it has to be local, due to > the time-frame. > > Thanks for your gracious replies to this tangentially-related-to-Perl post. :) I'd suggest just doing the obvious: http://sfbay.craigslist.org/search/sys?query=laptop Some possible picks, decreasing in price: http://sfbay.craigslist.org/sfc/sys/534315548.html http://sfbay.craigslist.org/eby/sys/534186434.html http://sfbay.craigslist.org/eby/sys/534269602.html From gatorreina at gmail.com Thu Jan 10 06:56:15 2008 From: gatorreina at gmail.com (Richard Reina) Date: Thu, 10 Jan 2008 08:56:15 -0600 Subject: [sf-perl] [OT] Used laptop place? In-Reply-To: <20080110082859.GA62631@fu.funkspiel.org> References: <20080110082859.GA62631@fu.funkspiel.org> Message-ID: <489cf9d0801100656v5c884ac4o4c39af9227703097@mail.gmail.com> I just bought an Ace Aspire 4315 from Microcenter from for $379.00 -- not sure if they still have any in stock. Got it running Ubuntu 7.10 just fine. On Jan 10, 2008 2:28 AM, Quinn Weaver wrote: > Hey, > > Can anyone recommend a good Bay Area place to buy a used laptop? My > friend's just died a motherboardly death, in the middle of grad-school > finals. :( Buying used would be best, but it has to be local, due to > the time-frame. > > Thanks for your gracious replies to this tangentially-related-to-Perl > post. :) > > -- > Quinn Weaver, independent contractor | President, San Francisco Perl > Mongers > http://fairpath.com/quinn/resume/ | http://sf.pm.org/ > 510-520-5217 > _______________________________________________ > SanFrancisco-pm mailing list > SanFrancisco-pm at pm.org > http://mail.pm.org/mailman/listinfo/sanfrancisco-pm > -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mail.pm.org/pipermail/sanfrancisco-pm/attachments/20080110/15e67d93/attachment.html From asheesh at asheesh.org Thu Jan 10 00:34:54 2008 From: asheesh at asheesh.org (Asheesh Laroia) Date: Thu, 10 Jan 2008 00:34:54 -0800 (PST) Subject: [sf-perl] [OT] Used laptop place? In-Reply-To: <20080110082859.GA62631@fu.funkspiel.org> References: <20080110082859.GA62631@fu.funkspiel.org> Message-ID: On Thu, 10 Jan 2008, Quinn Weaver wrote: > Can anyone recommend a good Bay Area place to buy a used laptop? My > friend's just died a motherboardly death, in the middle of grad-school > finals. :( Buying used would be best, but it has to be local, due to > the time-frame. http://sfbay.craigslist.org/search/sss?query=1400x1050+thinkpad /me drools -- Asheesh. -- "Absolutely nothing should be concluded from these figures except that no conclusion can be drawn from them." (By Joseph L. Brothers, Linux/PowerPC Project) From matisse at matisse.net Thu Jan 10 09:49:22 2008 From: matisse at matisse.net (Matisse Enzer) Date: Thu, 10 Jan 2008 09:49:22 -0800 Subject: [sf-perl] Contract job opening: Object-Oriented Perl Developer - Mostly Telecommute OK (cupertino) Message-ID: <50AA87AC-9392-407E-A6E9-7392B0C7789F@matisse.net> Hello folks, My team is looking for an intermediate-to-advanced OO Perl programmer who can show code samples of OO Perl and unit tests. PLEASE READ THE ENTIRE POSTING BEFORE RESPONDING: http://sfbay.craigslist.org/sby/sof/531839280.html ------------------------------------------------------- Matisse Enzer http://www.matisse.net/ - http://www.eigenstate.net/ From matisse at matisse.net Thu Jan 10 09:51:08 2008 From: matisse at matisse.net (Matisse Enzer) Date: Thu, 10 Jan 2008 09:51:08 -0800 Subject: [sf-perl] [OT] Used laptop place? In-Reply-To: <20080110082859.GA62631@fu.funkspiel.org> References: <20080110082859.GA62631@fu.funkspiel.org> Message-ID: <2381B248-5EC6-4265-8763-FAD66726C712@matisse.net> San Francisco Computer is worth giving a phone call to. They don't advertise used stuff, but might have some. 415-752-3891 ------------------------------------------------------- Matisse Enzer http://www.matisse.net/ - http://www.eigenstate.net/ From doom at kzsu.stanford.edu Thu Jan 10 13:59:14 2008 From: doom at kzsu.stanford.edu (Joe Brenner) Date: Thu, 10 Jan 2008 13:59:14 -0800 Subject: [sf-perl] [OT] Used laptop place? In-Reply-To: <489cf9d0801100656v5c884ac4o4c39af9227703097@mail.gmail.com> References: <20080110082859.GA62631@fu.funkspiel.org> <489cf9d0801100656v5c884ac4o4c39af9227703097@mail.gmail.com> Message-ID: <200801102159.m0ALxEJa012782@kzsu.stanford.edu> Richard Reina wrote: > I just bought an Ace Aspire 4315 from Microcenter from for $379.00 -- not > sure if they still have any in stock. Got it running Ubuntu 7.10 just fine. Ubuntu 7.10 seems to be a good release as far as hardware compatibility goes. I've got an Alvio MS-1013 laptop (AMD64-based) that Ubuntu used to have problems with, but Kubuntu 7.10 installed on it without too much trouble. My one complaint with that release though, is that they've enabled the "quiet" boot options, so there's no way to know what the hell is going on during boot. I recommend: (0) Don't panic if the first time you boot it seems like your machine has hung. (1) At first opportunity, go into /boot/grub/menu.lst and (a) Comment out the line "hiddenmenu" (b) Comment out the "quiet" lines. (c) Modify the "kernel" line so there's no "quiet" in the list of options And I suppose this is far enough off topic that I should move over to balug-talk with this, and I suppose I will... From gatorreina at gmail.com Fri Jan 11 07:39:27 2008 From: gatorreina at gmail.com (Richard Reina) Date: Fri, 11 Jan 2008 09:39:27 -0600 Subject: [sf-perl] Running a perl script as a service Message-ID: <489cf9d0801110739i5df976c3w4d122b97fdc6ec99@mail.gmail.com> I have a script below (at the bottom ) that reads incoming data from serial port and formats it. The program works fine when I execute it from a console. However, in order to keep it up at all times I created an /etc/init.d script that executes it: #! /bin/sh # Basic support for *nix style chkconfig ### # chkconfig: 235 98 55 # description: Manages the services you are controlling with the chkconfig command ### PERL=/usr/bin/perl SRL_READER=/usr/src/maillaundpad/serial_reader_test.pl case "$1" in start) echo -n "Starting new-service" $PERL $SRL_READER daemon echo "." ;; stop) echo -n "Stopping new-service" $PERL $SRL_READER -k echo "." ;; *) echo "Usage: /sbin/service srlreader {start|stop}" exit 1 esac When I run via the /init.d/script it crashes when it has to call another perl script with the following output: /sbin/service srlreader start Starting new-serviceINCOMING FILE BEING RECEIVED Closing File Can't locate mail_processor.pl in @INC (@INC contains: /usr/lib/perl5/site_perl/5.8.8/i386-linux-thread-multi /usr/lib/perl5/site_perl/5.8.7/i386-linux-thread-multi /usr/lib/perl5/site_perl/5.8.6/i386-linux-thread-multi /usr/lib/perl5/site_perl/5.8.5/i386-linux-thread-multi /usr/lib/perl5/site_perl/5.8.8 /usr/lib/perl5/site_perl/5.8.7 /usr/lib/perl5/site_perl/5.8.6 /usr/lib/perl5/site_perl/5.8.5 /usr/lib/perl5/site_perl /usr/lib/perl5/vendor_perl/5.8.8/i386-linux-thread-multi /usr/lib/perl5/vendor_perl/5.8.7/i386-linux-thread-multi /usr/lib/perl5/vendor_perl/5.8.6/i386-linux-thread-multi /usr/lib/perl5/vendor_perl/5.8.5/i386-linux-thread-multi /usr/lib/perl5/vendor_perl/5.8.8 /usr/lib/perl5/vendor_perl/5.8.7 /usr/lib/perl5/vendor_perl/5.8.6 /usr/lib/perl5/vendor_perl/5.8.5 /usr/lib/perl5/vendor_perl /usr/lib/perl5/5.8.8/i386-linux-thread-multi /usr/lib/perl5/5.8.8 .) at /usr/src/maillaundpad/serial_reader_test.pl line 71, line 24. . Any ideas as to what I'm doing wrong? Thanks for any help. ######### script ######################## #!/usr/bin/perl -w # serial_reader_test.pl #test this program w/out serial drives use strict; use Device::SerialPort; my $LOGDIR = "/home/richard/test"; # path to data file my $LOGFILE = "serial_data.log"; # file name to output to #my $PORT = "/dev/ttyD015"; # port to watch my $PORT = "/dev/ttyS0"; # port to watch # # Serial Settings # my $ob = Device::SerialPort->new ($PORT) || die "Can't Open $PORT: $!"; # # open the logfile, and Port # open(LOG,">>${LOGDIR}/${LOGFILE}") ||die "can't open smdr file $LOGDIR/$LOGFILE for append: $!\n"; open(DEV, "<$PORT") || die "Cannot open $PORT: $_"; #open(DEV, ") { # print input device to file # get a nice date string for naming an email file my ($yr, $mo, $day, $hr, $min, $sec) = (localtime)[5,4,3,2,1,0]; my $date = $sec . $min . $hr . $day . ($mo + 1) . ($yr + 1900); #print $_; # print to console (for now) print LOG $_; # print to log file if ($_ =~ /#######/) { #this is the begining of an email file print "INCOMING FILE BEING RECEIVED\n"; $mail_count++; $write_file = "y"; $filename = $mail_count . "EMAIL" . $date; open(EMAIL_FILE, ">$filename") || die "CANT OPEN EMAIL_FILE: $!\n"; } if ($write_file eq "y") { print EMAIL_FILE $_; } #end of if if ($_ =~ /!!!!!!!/) { print "Closing File\n"; close (EMAIL_FILE) || die "CAN'T CLOSE EMAIL_FILE: $!"; $write_file = "n"; require "mail_processor.pl"; process($filename); rename "$filename", "sent/$filename"; } #end of if } # end of while undef $ob; ### end -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mail.pm.org/pipermail/sanfrancisco-pm/attachments/20080111/774deb2e/attachment.html From quinn at fairpath.com Fri Jan 11 08:07:34 2008 From: quinn at fairpath.com (Quinn Weaver) Date: Fri, 11 Jan 2008 08:07:34 -0800 Subject: [sf-perl] Running a perl script as a service In-Reply-To: <489cf9d0801110739i5df976c3w4d122b97fdc6ec99@mail.gmail.com> References: <489cf9d0801110739i5df976c3w4d122b97fdc6ec99@mail.gmail.com> Message-ID: <20080111160734.GA87719@fu.funkspiel.org> On Fri, Jan 11, 2008 at 09:39:27AM -0600, Richard Reina wrote: > Any ideas as to what I'm doing wrong? Thanks for any help. I think the problem is this: When you run it from the command line, it uses your personal environment var settings, including your setting for PERL5LIB. When it runs from your init.d script, it doesn't have your environment-- just a minimal env setup provided by the init system. To avoid confusion, I would use an explicit path here: > require "mail_processor.pl"; e.g. require '/path/to/mail_processor.pl'; HTH, -- Quinn Weaver, independent contractor | President, San Francisco Perl Mongers http://fairpath.com/quinn/resume/ | http://sf.pm.org/ 510-520-5217 From woof at danlo.com Fri Jan 11 12:20:07 2008 From: woof at danlo.com (Daniel Lo) Date: Fri, 11 Jan 2008 12:20:07 -0800 Subject: [sf-perl] Running a perl script as a service In-Reply-To: <489cf9d0801110739i5df976c3w4d122b97fdc6ec99@mail.gmail.com> References: <489cf9d0801110739i5df976c3w4d122b97fdc6ec99@mail.gmail.com> Message-ID: <791978742.20080111122007@danlo.com> Hello Richard, Where is mailprocessor.pl? -daniel Friday, January 11, 2008, 7:39:27 AM, you wrote: > I have a script below (at the bottom ) that reads incoming data from serial > port and formats it. The program works fine when I execute it from a > console. However, in order to keep it up at all times I created an > /etc/init.d script that executes it: > #! /bin/sh > # Basic support for *nix style chkconfig > ### > # chkconfig: 235 98 55 > # description: Manages the services you are controlling with the chkconfig > command > ### > PERL=/usr/bin/perl > SRL_READER=/usr/src/maillaundpad/serial_reader_test.pl > case "$1" in > start) > echo -n "Starting new-service" > $PERL $SRL_READER daemon > echo "." > ;; > stop) > echo -n "Stopping new-service" > $PERL $SRL_READER -k > echo "." > ;; > *) > echo "Usage: /sbin/service srlreader {start|stop}" > exit 1 > esac > When I run via the /init.d/script it crashes when it has to call another > perl script with the following output: > /sbin/service srlreader start > Starting new-serviceINCOMING FILE BEING RECEIVED > Closing File > Can't locate mail_processor.pl in @INC (@INC contains: > /usr/lib/perl5/site_perl/5.8.8/i386-linux-thread-multi > /usr/lib/perl5/site_perl/5.8.7/i386-linux-thread-multi > /usr/lib/perl5/site_perl/5.8.6/i386-linux-thread-multi > /usr/lib/perl5/site_perl/5.8.5/i386-linux-thread-multi > /usr/lib/perl5/site_perl/5.8.8 /usr/lib/perl5/site_perl/5.8.7 > /usr/lib/perl5/site_perl/5.8.6 /usr/lib/perl5/site_perl/5.8.5 > /usr/lib/perl5/site_perl > /usr/lib/perl5/vendor_perl/5.8.8/i386-linux-thread-multi > /usr/lib/perl5/vendor_perl/5.8.7/i386-linux-thread-multi > /usr/lib/perl5/vendor_perl/5.8.6/i386-linux-thread-multi > /usr/lib/perl5/vendor_perl/5.8.5/i386-linux-thread-multi > /usr/lib/perl5/vendor_perl/5.8.8 /usr/lib/perl5/vendor_perl/5.8.7 > /usr/lib/perl5/vendor_perl/5.8.6 /usr/lib/perl5/vendor_perl/5.8.5 > /usr/lib/perl5/vendor_perl /usr/lib/perl5/5.8.8/i386-linux-thread-multi > /usr/lib/perl5/5.8.8 .) at /usr/src/maillaundpad/serial_reader_test.pl line > 71, line 24. > . > Any ideas as to what I'm doing wrong? Thanks for any help. > ######### script ######################## > #!/usr/bin/perl -w > # serial_reader_test.pl > #test this program w/out serial drives > use strict; > use Device::SerialPort; > my $LOGDIR = "/home/richard/test"; # path to data file > my $LOGFILE = "serial_data.log"; # file name to output to > #my $PORT = "/dev/ttyD015"; # port to watch > my $PORT = "/dev/ttyS0"; # port to watch > # > # Serial Settings > # > my $ob = Device::SerialPort->new ($PORT) || die "Can't Open $PORT: $!"; > # > # open the logfile, and Port > # open(LOG,">>>${LOGDIR}/${LOGFILE}") > ||die "can't open smdr file $LOGDIR/$LOGFILE for append: $!\n"; > open(DEV, "<$PORT") || die "Cannot open $PORT: $_"; > #open(DEV, " #select(LOG), $| = 1; # set nonbufferd mode > # > # Loop forver, logging data to the log file > # > my $write_file; # y or no write data to file > my $mail_count = 0; # the number of mails received in the session > my $filename; # what the new file will be called > while($_ = ) { # print input device to file > # get a nice date string for naming an email file > my ($yr, $mo, $day, $hr, $min, $sec) = (localtime)[5,4,3,2,1,0]; > my $date = $sec . $min . $hr . $day . ($mo + 1) . ($yr + 1900); > #print $_; # print to console (for now) > print LOG $_; # print to log file > if ($_ =~ /#######/) { > #this is the begining of an email file > print "INCOMING FILE BEING RECEIVED\n"; > $mail_count++; > $write_file = "y"; > $filename = $mail_count . "EMAIL" . $date; > open(EMAIL_FILE, ">$filename") || die "CANT OPEN EMAIL_FILE: $!\n"; > } > if ($write_file eq "y") { > print EMAIL_FILE $_; > } #end of if > if ($_ =~ /!!!!!!!/) { > print "Closing File\n"; > close (EMAIL_FILE) || die "CAN'T CLOSE EMAIL_FILE: $!"; > $write_file = "n"; > require "mail_processor.pl"; > process($filename); > rename "$filename", "sent/$filename"; > } #end of if > } # end of while > undef $ob; > ### end -- Best regards, Daniel mailto:woof at danlo.com From doom at kzsu.stanford.edu Fri Jan 11 13:03:10 2008 From: doom at kzsu.stanford.edu (Joe Brenner) Date: Fri, 11 Jan 2008 13:03:10 -0800 Subject: [sf-perl] Running a perl script as a service In-Reply-To: <20080111160734.GA87719@fu.funkspiel.org> References: <489cf9d0801110739i5df976c3w4d122b97fdc6ec99@mail.gmail.com> <20080111160734.GA87719@fu.funkspiel.org> Message-ID: <200801112103.m0BL3AKw032100@kzsu.stanford.edu> Quinn Weaver wrote: > Richard Reina wrote: > > > Any ideas as to what I'm doing wrong? Thanks for any help. > > I think the problem is this: > > When you run it from the command line, it uses your personal > environment var settings, including your setting for PERL5LIB. > > When it runs from your init.d script, it doesn't have your environment-- > just a minimal env setup provided by the init system. > > To avoid confusion, I would use an explicit path here: > > > require "mail_processor.pl"; > > e.g. require '/path/to/mail_processor.pl'; I might try adding a line like: use lib '/path/to'; Once you've found one problem like that, it's likely that others will turn up. I suggest writing a small script that does things like echo your environment variables to a log file, then you can run it from init.d and also from the command-line. Compare the output of the two runs, looking for differences that are likely to cause problems (PERL5LIB, PATH, etc). Here's a copy of my "echo_env_to_log" if you're interested: #!/usr/bin/perl # echo_env_to_log doom at kzsu.stanford.edu # 19 Sep 2007 use warnings; use strict; $|=1; use File::Basename qw( basename ); ### use Env qw(HOME); our $VERSION = 0.01; my $prog = basename($0); my $label = shift; my $home = "/home/doom"; # Can't use $HOME: becomes "/root" when you're root. my $logfile = "$home/tmp/$prog.log"; open my $lf, ">>", $logfile or die "$!"; print {$lf} "\n"; if ($label) { print {$lf} "$label:\n"; } print {$lf} "Running: $0\n"; my $datestamp = `date`; chomp($datestamp); print {$lf} "at $datestamp\n"; foreach my $k (keys %ENV) { print {$lf} "$k=\"$ENV{$k}\"\n"; } From extasia at extasia.org Fri Jan 11 13:12:36 2008 From: extasia at extasia.org (David Alban) Date: Fri, 11 Jan 2008 13:12:36 -0800 Subject: [sf-perl] Running a perl script as a service In-Reply-To: <200801112103.m0BL3AKw032100@kzsu.stanford.edu> References: <489cf9d0801110739i5df976c3w4d122b97fdc6ec99@mail.gmail.com> <20080111160734.GA87719@fu.funkspiel.org> <200801112103.m0BL3AKw032100@kzsu.stanford.edu> Message-ID: <4c714a9c0801111312u65e038b2v600fdc00b4bf0dcb@mail.gmail.com> you might consider: use File::Glob qw( bsd_glob ); my $home = bsd_glob( '~doom' ); would make it a little more portable if ~doom isn't the same everywhere. On Jan 11, 2008 1:03 PM, Joe Brenner wrote: > my $home = "/home/doom"; # Can't use $HOME: becomes "/root" when you're root. -- Live in a world of your own, but always welcome visitors. From rdm at cfcl.com Sat Jan 12 17:50:57 2008 From: rdm at cfcl.com (Rich Morin) Date: Sat, 12 Jan 2008 17:50:57 -0800 Subject: [sf-perl] (Capistrano) PeepCode & Pizza, Thursday 1/24 Message-ID: Free Food! Free Movies! Free Software! We'll be showing the PeepCode screencast on Capistrano 2.1: Capistrano 2 is a tool for automating the deployment of your application to a server. You can also automate many other monotonous server-maintenance tasks. It is written in Ruby, but can be used to deploy any kind of web application. -- http://peepcode.com/products/capistrano-2 And, if that isn't enough, you'll have a chance to try out WAVEscape, a gesture-based, 3D interaction technology that Reactrix introduced last week at CES 2008: http://www.youtube.com/watch?v=L7UR4wjUz8g (video) After an hour of pizza, palaver, and panda punching (see the YouTube video linked above), we'll settle down for the video, allowing occasional pauses for questions, etc. Reactrix uses Capistrano, so we can answer _some_ questions. We're also hoping that some helpful wizards may show up... PeepCode & Pizza gatherings are sponsored by PeepCode and Reactrix Systems. The meeting will be held at the Reactrix offices in Redwood City from 6-9 pm on Thursday, January 24. About PeepCode and Reactrix Systems PeepCode (http://peepcode.com) produces economical, well- produced screencasts on technical topics (e.g., Capistrano, Git, httperf, Prototype.js, Rails, RJS, rSpec, TextMate). Reactrix develops and supports video-based advertising devices, featuring interactive content. Generally, these are placed in malls, theaters, etc. We use numerous Open Source technologies, including C++, Capistrano, Git, Linux, OpenGL, Perl, Rails, and Ruby. Yes, we're hiring! http://www.reactrix.com/ http://www.reactrix.com/index.php http://www.reactrix.com/careers.php http://www.YouTube.com/watch?v=QzsQKULMbiU (video) When: Tuesday, January 24, 2007 6p - 7p chat, munch pizza, punch pandas, etc. 7p - 9p watch and discuss a PeepCode screencast 9p - ?? retire (perhaps) to a local pub NOTE: RSVPs (rdm at cfcl.com) are greatly appreciated; help us to know how much pizza (and what kind) to order! Where: Reactrix Systems, Inc. 650-980-2700 301 Chesapeake Drive Redwood City, CA Map: http://tinyurl.com/27b22y Directions: http://www.reactrix.com/driving_directions.php Cheap Food! Cheap Talk! Also, as usual, the Beer And Scripting SIG will be held on the 4th Wednesday: http://cfcl.com/rdm/bass/ -- http://www.cfcl.com/rdm Rich Morin http://www.cfcl.com/rdm/resume rdm at cfcl.com http://www.cfcl.com/rdm/weblog +1 650-873-7841 Technical editing and writing, programming, and web development From gatorreina at gmail.com Mon Jan 14 08:33:21 2008 From: gatorreina at gmail.com (Richard Reina) Date: Mon, 14 Jan 2008 10:33:21 -0600 Subject: [sf-perl] Running a perl script as a service In-Reply-To: <20080111160734.GA87719@fu.funkspiel.org> References: <489cf9d0801110739i5df976c3w4d122b97fdc6ec99@mail.gmail.com> <20080111160734.GA87719@fu.funkspiel.org> Message-ID: <489cf9d0801140833r217f5933tac8371ef94222930@mail.gmail.com> Thanks for all the replies. Putting the full path in fixed the problem. Thanks again. On Jan 11, 2008 10:07 AM, Quinn Weaver On Fri, Jan 11, 2008 at 09:39:27AM -0600, Richard Reina wrote: > > > Any ideas as to what I'm doing wrong? Thanks for any help. > > I think the problem is this: > > When you run it from the command line, it uses your personal > environment var settings, including your setting for PERL5LIB. > > When it runs from your init.d script, it doesn't have your environment-- > just a minimal env setup provided by the init system. > > To avoid confusion, I would use an explicit path here: > > > require "mail_processor.pl"; > > e.g. require '/path/to/mail_processor.pl'; > > HTH, > > -- > Quinn Weaver, independent contractor | President, San Francisco Perl > Mongers > http://fairpath.com/quinn/resume/ | http://sf.pm.org/ > 510-520-5217 > _______________________________________________ > SanFrancisco-pm mailing list > SanFrancisco-pm at pm.org > http://mail.pm.org/mailman/listinfo/sanfrancisco-pm > -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mail.pm.org/pipermail/sanfrancisco-pm/attachments/20080114/0a2bef1d/attachment.html From quinn at fairpath.com Wed Jan 16 12:18:17 2008 From: quinn at fairpath.com (Quinn Weaver) Date: Wed, 16 Jan 2008 12:18:17 -0800 Subject: [sf-perl] [job] Wanted: Senior Developer for SingleFeed.com Message-ID: <20080116201817.GA55553@fu.funkspiel.org> I'm forwarding this post at the request of brian at singlefeed.com. Please reply to him, not to me or to the list. * * * SingleFeed is seeking a serious full-time web application developer to start immediately. This position is located in San Francisco or Palo Alto. Agile development practices. Rapid paced startup environment. SingleFeed is a venture-backed start up with real customers and real revenue. Our funding comes from two prominent early-stage VCs, True Ventures and NetService Ventures, the backers of companies like Automattic, Aggregate Knowledge, and Meebo. SingleFeed is a web service which enables merchants to effectively market their goods through shopping search engines such as Google Product Search, Yahoo! Shopping, Shopzilla, and PriceGrabber by managing and submitting high quality product data feeds. Each shopping engine has a different specification for how they want product data feeds to be delivered. Each shopping engine also has a different algorithm for how they rank products. SingleFeed's goal is to get merchants up and running quickly and easily on multiple shopping engines while helping merchants achieve the highest ROI possible. We are seeking someone to play a senior role in conceiving, designing and implementing SingleFeed's data feed management and optimization service. This is an exciting business that is growing rapidly, and we need someone who can quickly translate business needs and customer feedback into implemented features that together make a robust system. The position requires the ability to design systems, communicate and work effectively with others, write high quality scalable code, and deliver work on schedule. The candidate must have high standards with regard to the quality and maintainability of the system. Foremost, you must be a top-notch coder with a track record of solving hard problems quickly and elegantly. The candidate must be a very experienced web developer with background in Perl and other scripting languages as well as having worked with a strongly typed object-oriented language such as Java or C++. Expertise in SQL databases is required and specific experience with mySQL is a plus. Knowledge of front-end development using JavaScript and AJAX techniques is also necessary. Experience with common software engineering tools and processes is necessary. The ability to work in concert with a small team of passionate engineers, designers and product managers is essential. You will have to take a tech test, so only serious candidates should apply. Qualifications: Bachelor's degree in computer science or other technical field, or equivalent work experience. Master's or similar experience, is a plus. Significant experience shipping commercial software or building critical components of highly trafficked websites Five years of experience with design and implementation using the following technologies: - server-side web development using Perl, PHP or Java (significant portions of the system are written in Perl, so you need to have recent experience with Perl). - client side using DHTML and JavaScript - databases (Oracle, mySQL) -- Quinn Weaver, independent contractor | President, San Francisco Perl Mongers http://fairpath.com/quinn/resume/ | http://sf.pm.org/ 510-520-5217 From quinn at fairpath.com Wed Jan 16 12:20:59 2008 From: quinn at fairpath.com (Quinn Weaver) Date: Wed, 16 Jan 2008 12:20:59 -0800 Subject: [sf-perl] [job] Wanted: Senior Developer for SingleFeed.com In-Reply-To: <20080116201817.GA55553@fu.funkspiel.org> References: <20080116201817.GA55553@fu.funkspiel.org> Message-ID: <20080116202059.GA55604@fu.funkspiel.org> Update: they are looking for both contractors and employees. I forgot to mention this--my bad. -- Quinn Weaver, independent contractor | President, San Francisco Perl Mongers http://fairpath.com/quinn/resume/ | http://sf.pm.org/ 510-520-5217 From quinn at fairpath.com Mon Jan 21 12:38:53 2008 From: quinn at fairpath.com (Quinn Weaver) Date: Mon, 21 Jan 2008 12:38:53 -0800 Subject: [sf-perl] Beer and Scripting SIG Message-ID: <20080121203853.GA21589@fu.funkspiel.org> Late-breaking news: There will be no formal SF.pm meeting this month. If you're looking for an informal dinner-type meeting, we suggest BASS, the Beer and Scripting SIG, meeting this Wednesday at 8:00: http://www.cfcl.com/rdm/bass/ Apologies for the late announcement, -- Quinn Weaver, independent contractor | President, San Francisco Perl Mongers http://fairpath.com/quinn/resume/ | http://sf.pm.org/ 510-520-5217 From rdm at cfcl.com Tue Jan 22 07:17:10 2008 From: rdm at cfcl.com (Rich Morin) Date: Tue, 22 Jan 2008 07:17:10 -0800 Subject: [sf-perl] BASS Meeting (SF), Wed. January 23 Message-ID: We had lots of fun networking our XO (OLPC) last time, so we'll be bringing it to BASS again. The UI is based on Squeak and Python is used for a lot of the programming, so it's quite a testament to the power of scripting languages. The Beer and Scripting SIG rides again! If you'd like to eat good Chinese food, chat with other local scripters, and possibly take a look at laptop-demoed scripting hacks, this is the place to do it! For your convenience, here are the critical details: Date: Wednesday, January 23, 2008 (4th. Wed.) Time: 8:00 pm Place: Pasquales Pizzeria 701 Irving St. (At 8th. Ave.) San Francisco, California, USA 415/661-2140 See the BASS web page for more information: http://cfcl.com/rdm/bass/ -r P.S. Also consider attending the second PeepCode & Pizza gathering (Thursday, 1/24 in Redwood City). We'll be watching and discussing the Capistrano 2.1 screencast; for more information, see http://ruby.meetup.com/123/ -- http://www.cfcl.com/rdm Rich Morin http://www.cfcl.com/rdm/resume rdm at cfcl.com http://www.cfcl.com/rdm/weblog +1 650-873-7841 Technical editing and writing, programming, and web development From rick at linuxmafia.com Tue Jan 22 11:20:18 2008 From: rick at linuxmafia.com (Rick Moen) Date: Tue, 22 Jan 2008 11:20:18 -0800 Subject: [sf-perl] BASS Meeting (SF), Wed. January 23 In-Reply-To: References: Message-ID: <20080122192018.GS11662@linuxmafia.com> Quoting Rich Morin (rdm at cfcl.com): > The Beer and Scripting SIG rides again! If you'd like to > eat good Chinese food, chat with other local scripters, > and possibly take a look at laptop-demoed scripting hacks, > this is the place to do it! Pasquale's Pizzeria features Chinese food? Cool! ;-> (I assume that was a small typo, and should have been "thin-crust pizza and a variety of other Italian food", right?) From rdm at cfcl.com Tue Jan 22 18:02:09 2008 From: rdm at cfcl.com (Rich Morin) Date: Tue, 22 Jan 2008 18:02:09 -0800 Subject: [sf-perl] BASS Meeting (SF), Wed. January 23 In-Reply-To: <20080122192018.GS11662@linuxmafia.com> References: <20080122192018.GS11662@linuxmafia.com> Message-ID: At 11:20 -0800 1/22/08, Rick Moen wrote: > Pasquale's Pizzeria features Chinese food? Cool! ;-> > > (I assume that was a small typo, and should have been > "thin-crust pizzaand a variety of other Italian food", right?) Just testing to see if anyone is awake. More to the point, what I'm looking for is "Yeah, Rich, D&I will be there, for sure!". -r -- http://www.cfcl.com/rdm Rich Morin http://www.cfcl.com/rdm/resume rdm at cfcl.com http://www.cfcl.com/rdm/weblog +1 650-873-7841 Technical editing and writing, programming, and web development From rick at linuxmafia.com Tue Jan 22 19:36:12 2008 From: rick at linuxmafia.com (Rick Moen) Date: Tue, 22 Jan 2008 19:36:12 -0800 Subject: [sf-perl] BASS Meeting (SF), Wed. January 23 In-Reply-To: References: <20080122192018.GS11662@linuxmafia.com> Message-ID: <20080123033612.GB11662@linuxmafia.com> Quoting Rich Morin (rdm at cfcl.com): > Just testing to see if anyone is awake. More to the point, what > I'm looking for is "Yeah, Rich, D&I will be there, for sure!". Perhaps next time. Deirdre is a bit busy on a project, but sends her cheery regards to you and Vicki.