From keith.reed at philips.com Tue May 2 16:35:28 2006 From: keith.reed at philips.com (Keith Reed) Date: Tue, 2 May 2006 16:35:28 -0700 Subject: SPUG: IIS 6.0 and Perl CGI Message-ID: We just moved from Apache to IIS 6.0, and all of our perl CGI programs now display the following HTTP header line at the top of the document. Content-Type: text/html; charset=ISO-8859-1 We have mapped PerlEx under IIS, to execute the CGI programs. When I don't print $cgi->header at the beginning of the output from my Perl CGI program, that causes other things not to work, such as a JavaScript based menuing system. Any help will be greatly appreciated. Thanks... Keith -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mail.pm.org/pipermail/spug-list/attachments/20060502/6152d290/attachment.html From benb at speakeasy.net Tue May 2 17:20:38 2006 From: benb at speakeasy.net (BenRifkah Burnett) Date: Tue, 02 May 2006 17:20:38 -0700 Subject: SPUG: IIS 6.0 and Perl CGI In-Reply-To: References: Message-ID: <4457F756.8030202@speakeasy.net> Keith Reed wrote: > > We just moved from Apache to IIS 6.0, and all of our perl CGI programs > now display the following HTTP header line at the top of the document. > > Content-Type: text/html; charset=ISO-8859-1 If I understand this properly you're saying that your code is printing a header using $cgi->header AND you're also getting the above line in your output. This means that you're getting two content-type HTTP headers in your output for cgi scripts. Is this a correct assessment? It's possible that your IIS setup is configured to automatically print a content-type header in certain circumstances. I know nearly nothing about IIS so I can't help you go through your configuration to see if this is happening. Post this question to an IIS group for that approach. You may be able to troubleshoot this by creating a test perl script that doesn't use CGI.pm and see if you get the same results. Try to simulate the environment of the script as much as possible. Put it in the same directory that your other scripts are in. Give it the same extension. Make sure it's the same file format (e.g.: UNIX, DOS). You could try replacing one of your scripts with the following: If you still get two content-type headers then it's most likely an issue with IIS configuration and not with the way you're using perl. -- BenRifkah Burnett, Research Consultant University of Washington * Biostatistics o Clinical Trials Center (CTC) + Resuscitation Outcomes Consortium (ROC) From ghawk at eskimo.com Tue May 2 21:16:26 2006 From: ghawk at eskimo.com (Gary Hawkins) Date: Tue, 2 May 2006 21:16:26 -0700 Subject: SPUG: mod_perl web hosting In-Reply-To: Message-ID: <087f01c66e68$59bc61d0$0101a8c0@GARYHA> If you know of a web-hosting company with mod_perl, particularly if you have some positive experience with them, please let me know, I'm trying to decide where to place a website. Thanks, Gary From haircut at gmail.com Wed May 3 01:08:54 2006 From: haircut at gmail.com (Adam Monsen) Date: Wed, 3 May 2006 01:08:54 -0700 Subject: SPUG: mod_perl web hosting In-Reply-To: <087f01c66e68$59bc61d0$0101a8c0@GARYHA> References: <087f01c66e68$59bc61d0$0101a8c0@GARYHA> Message-ID: <9ebd65110605030108l1e172e57y9d249e4087641d42@mail.gmail.com> On 5/2/06, Gary Hawkins wrote: > > If you know of a web-hosting company with mod_perl, particularly if you > have > some positive experience with them, please let me know, I'm trying to > decide > where to place a website. > [...] Gary, I'd highly recommend paying for a virtual colocation server, and installing mod_perl yourself. mod_perl installations are generally quite customized, and I can't imagine a one-size-fits-all hosting service. Keith Lofstrom gave a great talk this past weekend at Linuxfest Northwest on virtual colo places like Rimuhosting, Vcolo and the like. Unfortunately, I can't find a link to the talk right now (maybe someone else out there has the link?). That said, I'm curious to know if anyone /does/ offer some kind of off-the-shelf mod_perl hosting, and what they offer. -- Adam Monsen -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mail.pm.org/pipermail/spug-list/attachments/20060503/18e26c33/attachment.html From kenslinux at shaw.ca Wed May 3 01:21:31 2006 From: kenslinux at shaw.ca (Ken Clarke) Date: Wed, 03 May 2006 01:21:31 -0700 Subject: SPUG: mod_perl web hosting References: <087f01c66e68$59bc61d0$0101a8c0@GARYHA> Message-ID: <001d01c66e8a$95b46e90$1000a8c0@kens> Checkout http://positivefusion.com They have knowledgeable, responsive and helpful tech support and monitored but not crippled SSH2 shell access. One time they recompiled Apache on my shared host server to accommodate some specific mod_perl features I needed. Can't get much better than that! >> Ken Clarke >> Contract Web Programmer / E-commerce Technologist >> www.PerlProgrammer.net ----- Original Message ----- From: "Gary Hawkins" To: Sent: Tuesday, May 02, 2006 9:16 PM Subject: SPUG: mod_perl web hosting > If you know of a web-hosting company with mod_perl, particularly if you > have > some positive experience with them, please let me know, I'm trying to > decide > where to place a website. > > Thanks, > > Gary > > > > _____________________________________________________________ > Seattle Perl Users Group Mailing List > POST TO: spug-list at pm.org > SUBSCRIPTION: http://mail.pm.org/mailman/listinfo/spug-list > MEETINGS: 3rd Tuesdays > WEB PAGE: http://seattleperl.org/ From atom.powers at gmail.com Wed May 3 08:10:44 2006 From: atom.powers at gmail.com (Atom Powers) Date: Wed, 3 May 2006 08:10:44 -0700 Subject: SPUG: mod_perl web hosting In-Reply-To: <001d01c66e8a$95b46e90$1000a8c0@kens> References: <087f01c66e68$59bc61d0$0101a8c0@GARYHA> <001d01c66e8a$95b46e90$1000a8c0@kens> Message-ID: > From: "Gary Hawkins" > To: > Sent: Tuesday, May 02, 2006 9:16 PM > Subject: SPUG: mod_perl web hosting > > > > If you know of a web-hosting company with mod_perl, particularly if you > > have > > some positive experience with them, please let me know, I'm trying to > > decide > > where to place a website. > > > > Thanks, > > > > Gary > > I've been using webmasters.com for several years. mod_perl, mysql, tons of other stuff. ~$100/year. -- -- Perfection is just a word I use occasionally with mustard. --Atom Powers-- From andrew at sweger.net Wed May 3 12:34:25 2006 From: andrew at sweger.net (Andrew Sweger) Date: Wed, 3 May 2006 12:34:25 -0700 (PDT) Subject: SPUG: O'Reilly UG Discount Changes Message-ID: O'Reilly has increased the discount offered on books to user group members. Check it out: Get 30% off a single book or 35% off two or more books from O'Reilly, No Starch, Paraglyph, PC Publishing, Pragmatic Bookshelf, SitePoint, or Syngress books you purchase directly from O'Reilly. Just use code DSUG when ordering online or by phone 800-998-9938. Free ground shipping on orders $29.95 or more in the US. Other benefits you receive when you buy directly from O'Reilly include: *100% Satisfaction Guarantee* If, for any reason, you're not completely satisfied with your purchase, return it to us and get your money back. A return shipping label is included with every direct purchase, and directions are posted online in case you've misplaced it: . *Safari Enabled* Whenever possible, our books are "Safari Enabled." This means you can access your book for free online for 45 days through the O'Reilly Safari Bookshelf. How do you know if your book is Safari Enabled? Turn your book over and look for the "Safari Enabled" logo on the bottom right of the page. If it's there, flip through the last couple pages of your book until you find directions for accessing your book online. *Booktech* Have a question about your book? O'Reilly is the only publisher that offers tech support for books. Send an email to and we'll help you out. Be specific: Include the book title and page number. It's also a good idea to include the ISBN so we know what edition you have. *Reader Reviews* Our reader reviews are read by most people at O'Reilly, including Tim O'Reilly, all our editors, as well as sales, marketing, and PR. So if you have praise, a gripe, or ideas for improvement, writing a reader review on oreilly.com is a sure way for your voice to be heard. Just go to your book's catalog page on oreilly.com and click the "Write a Review" button. *Book Registration* Register your book online and we'll notify you when the book has been updated or a new edition is available. You can also win books and other prizes. Haven't registered your books? Just go to . *Newsletters* Our newsletters keep you updated on the latest articles, books, news, and events. A complete list of newsletters and lists can be found at . From andrew at seattleperl.org Thu May 11 17:16:21 2006 From: andrew at seattleperl.org (Andrew Sweger) Date: Thu, 11 May 2006 17:16:21 -0700 (PDT) Subject: SPUG: Meeting Announcement -- -- 16 May 2006 Message-ID: May 2006 Seattle Perl Users Group (SPUG) Meeting ================================================ Title: Perl at IMDb Speaker: Murray Chapman Meeting Date: Tuesday, 16 May 2006 Meeting Time: 6:30 - 8:30 p.m. Location: Whitepages.com offices Cost: Admission is free and open to the general public Info: http://seattleperl.org/ =========================================== Please join us Tuesday evening on 16 May 2006 at the regular monthly meeting of the Seattle Perl Users Group. Murray Chapman takes us inside the studio and on to the backlot for a glimpse into the Perl magic that keeps the reels turning at the Internet Movie Database. Come meet this star of script and web scenes made famous around the world. Thanks goes to SPUG-Workers for doing all the work to organize this presentation and to our speaker for giving their time and knowledge to us. See below for more information on... - Speaker Background - Presentation Description - Meeting Location Speaker Background ================== Murray Chapman -------------- Murray is the manager of the technology team at IMDb; their role is to build and operate the website, development platform, and other internal tools. Murray has been with IMDb since 1993 when it was a hobby project coordinated via rec.arts.movies. Following the April 1998 aquisition by Amazon.com, he moved from Brisbane, Australia to Seattle to spearhead the integration effort. He is a movie and computer geek, which makes IMDb the perfect environment for him! Presentation Description ======================== Perl at IMDb ------------ The Internet Movie Database is a top-100 website with an large amount of highly-interlinked data. They see themselves as a technology company rather than a media or entertainment company, having custom-built essentially all of our software in Perl. Murray wants to share some of the lessons they have learned about Perl: what works, what doesn't, and what we wish it could do -- as well as discussing practical information about building and operating an ultra-high-volume website as part of a team that is distributed across the globe. Meeting Location ================ Whitepages.com is located on the 16th floor of the Rainier Square Tower (1301 5th Avenue, Seattle) which is across from the 5th Avenue Theater. See the directions[1] for a quick primer on how to reach us from various locations across Puget Sound. There are plenty of locations to park in the area, including on the street. If you're looking for off-street parking, you can park in the Rainier Square garage which has an entrance on Union St. After 6PM, the building management restricts access to most floors. Our host is trying to take care of this, but if unsuccessful, they will station someone on the 1st floor near the elevator bank and 5th Avenue entrance to let people in. Worst case scenario, give our host a call on his cell phone[2] and he'll run down to let you in. Our hosts are providing a generous assortment of free sodas, fruit drinks, teas, and coffee, and also have some snacks. You definitely won't dehydrate here. We look forward to seeing you! [1] - http://www.whitepagesinc.com/locations [2] - (206) 579-7113 From andrew at seattleperl.org Fri May 12 14:26:41 2006 From: andrew at seattleperl.org (Andrew Sweger) Date: Fri, 12 May 2006 14:26:41 -0700 (PDT) Subject: SPUG: SPUG Wiki replaced Message-ID: The MediaWiki based SPUG Wiki at http://mediawiki.seattleperl.org/ has now replaced the Kwiki-based SPUG Wiki formerly at http://wiki.seattleperl.org/. Now all you SPUG Wiki needs can be found at http://wiki.seattleperl.org/ using the MediaWiki software. Why? It just turns out to be much simpler to manage from a sysadmin aspect. I managed to replace the stock MediaWiki flower icon with a camel (The Camel) on the Wiki. wiki wiki wiki wiki wiki wiki wiki wiki wiki wiki wiki wiki wiki wiki wiki -- Andrew B. Sweger | P.O. Box 33147 President | Seattle WA 98133 Seattle Perl Users Group | (206) 219-7119 andrew{at}seattleperl.org | http://seattleperl.org/ From rizvi at amazon.com Fri May 12 14:52:20 2006 From: rizvi at amazon.com (Rizvi, Ali) Date: Fri, 12 May 2006 14:52:20 -0700 Subject: SPUG: SPUG Wiki replaced Message-ID: I find it kind of ironic that the Seattle "Perl" Users Group are running a php based wiki. Don't get wrong I like MediaWiki and you can make a case of being pragmatic but I thought Twiki is real nice Perl based wiki engine (though it is not DB based but I am not sure if this was desired feature). Did your research indicate Twiki was hard to manage/administrate? Just a thought, may be we can discuss this (time permitting) in the next monthly meeting. Happy Friday! Ali -----Original Message----- From: spug-list-bounces+rizvi=amazon.com at pm.org [mailto:spug-list-bounces+rizvi=amazon.com at pm.org] On Behalf Of Andrew Sweger Sent: Friday, May 12, 2006 2:27 PM To: SPUG Members Subject: SPUG: SPUG Wiki replaced The MediaWiki based SPUG Wiki at http://mediawiki.seattleperl.org/ has now replaced the Kwiki-based SPUG Wiki formerly at http://wiki.seattleperl.org/. Now all you SPUG Wiki needs can be found at http://wiki.seattleperl.org/ using the MediaWiki software. Why? It just turns out to be much simpler to manage from a sysadmin aspect. I managed to replace the stock MediaWiki flower icon with a camel (The Camel) on the Wiki. wiki wiki wiki wiki wiki wiki wiki wiki wiki wiki wiki wiki wiki wiki wiki -- Andrew B. Sweger | P.O. Box 33147 President | Seattle WA 98133 Seattle Perl Users Group | (206) 219-7119 andrew{at}seattleperl.org | http://seattleperl.org/ _____________________________________________________________ Seattle Perl Users Group Mailing List POST TO: spug-list at pm.org SUBSCRIPTION: http://mail.pm.org/mailman/listinfo/spug-list MEETINGS: 3rd Tuesdays WEB PAGE: http://seattleperl.org/ From bill at celestial.com Fri May 12 14:52:52 2006 From: bill at celestial.com (Bill Campbell) Date: Fri, 12 May 2006 14:52:52 -0700 Subject: SPUG: SPUG Wiki replaced In-Reply-To: References: Message-ID: <20060512215252.GB37127@alexis.mi.celestial.com> On Fri, May 12, 2006, Andrew Sweger wrote: >The MediaWiki based SPUG Wiki at http://mediawiki.seattleperl.org/ has now >replaced the Kwiki-based SPUG Wiki formerly at >http://wiki.seattleperl.org/. Now all you SPUG Wiki needs can be found at >http://wiki.seattleperl.org/ using the MediaWiki software. > >Why? It just turns out to be much simpler to manage from a sysadmin >aspect. > >I managed to replace the stock MediaWiki flower icon with a camel (The >Camel) on the Wiki. > >wiki wiki wiki wiki wiki wiki wiki wiki wiki wiki wiki wiki wiki wiki wiki Veni, Vidi, Wiki? Bill -- INTERNET: bill at Celestial.COM Bill Campbell; Celestial Software LLC URL: http://www.celestial.com/ PO Box 820; 6641 E. Mercer Way FAX: (206) 232-9186 Mercer Island, WA 98040-0820; (206) 236-1676 ``If guns are outlawed, only the government will have guns. Only the police, the secret police, the military, the hired servants of our rulers. Only the government -- and a few outlaws. I intend to be among the outlaws.'' EDWARD ABBEY (1927-1989) From bill at celestial.com Fri May 12 14:54:05 2006 From: bill at celestial.com (Bill Campbell) Date: Fri, 12 May 2006 14:54:05 -0700 Subject: SPUG: SPUG Wiki replaced In-Reply-To: References: Message-ID: <20060512215405.GC37127@alexis.mi.celestial.com> On Fri, May 12, 2006, Rizvi, Ali wrote: >I find it kind of ironic that the Seattle "Perl" Users Group are running a >php based wiki. They didn't use the Zope/Plone site I set up for them either (python based :-). Bill -- INTERNET: bill at Celestial.COM Bill Campbell; Celestial Software LLC URL: http://www.celestial.com/ PO Box 820; 6641 E. Mercer Way FAX: (206) 232-9186 Mercer Island, WA 98040-0820; (206) 236-1676 The essence of all slavery consists in taking the produce of another's labor by force. It is immaterial whether this force be founded on ownership of the slave or ownership of the money that he must get to live on. Leo Tolstoy 1891 From andrew at seattleperl.org Fri May 12 15:12:38 2006 From: andrew at seattleperl.org (Andrew Sweger) Date: Fri, 12 May 2006 15:12:38 -0700 (PDT) Subject: SPUG: SPUG Wiki replaced In-Reply-To: Message-ID: I experienced Twiki a while back[1]. My decision was largely driven by 1) how much sysadmin effort would be required to get it up and maintain it, 2) whether it supported user accountability out of the box, 3) whether it is an officially maintained Debian package, 4) database backed, and 5) fast (MW takes advantage of memcached; mad props to our buddy, Brad). Perl was a ways further down the list as I recall. Twiki missed out on a few points plus carries some unfortunate political and licensing baggage (I stopped trying to keep up years ago, so maybe things have changed). Oh, and for those just joining us, the MediaWiki for SPUG was setup a long time ago and received much kindness from helpful members getting content converted. It just took me a very long time to finally switch out the vhosts (all of ten minutes of work). Debian? I'm probably more of a Debian zealot than I am a Perl zealot. If I was a zealot at all. Debian: set it and forget it. But I agree there's a small amount of irony. :) [1] - it is not a pleasant memory On Fri, 12 May 2006, Rizvi, Ali wrote: > I find it kind of ironic that the Seattle "Perl" Users Group are > running a php based wiki. > > Don't get wrong I like MediaWiki and you can make a case of being > pragmatic but I thought Twiki is real nice Perl based wiki engine > (though it is not DB based but I am not sure if this was desired > feature). > > Did your research indicate Twiki was hard to manage/administrate? > > Just a thought, may be we can discuss this (time permitting) in the > next monthly meeting. -- Andrew B. Sweger | P.O. Box 33147 President | Seattle WA 98133 Seattle Perl Users Group | (206) 219-7119 andrew{at}seattleperl.org | http://seattleperl.org/ From andrew at seattleperl.org Fri May 12 15:15:23 2006 From: andrew at seattleperl.org (Andrew Sweger) Date: Fri, 12 May 2006 15:15:23 -0700 (PDT) Subject: SPUG: SPUG Wiki replaced In-Reply-To: <20060512215405.GC37127@alexis.mi.celestial.com> Message-ID: On Fri, 12 May 2006, Bill Campbell wrote: > On Fri, May 12, 2006, Rizvi, Ali wrote: > > >I find it kind of ironic that the Seattle "Perl" Users Group are running a > >php based wiki. > > They didn't use the Zope/Plone site I set up for them either > (python based :-). The truth comes out: I despisssse thosssse ssslippery ssssnakes. -- Andrew B. Sweger | P.O. Box 33147 President | Seattle WA 98133 Seattle Perl Users Group | (206) 219-7119 andrew{at}seattleperl.org | http://seattleperl.org/ From bill at celestial.com Fri May 12 15:20:46 2006 From: bill at celestial.com (Bill Campbell) Date: Fri, 12 May 2006 15:20:46 -0700 Subject: SPUG: SPUG Wiki replaced In-Reply-To: References: <20060512215405.GC37127@alexis.mi.celestial.com> Message-ID: <20060512222046.GA46971@alexis.mi.celestial.com> On Fri, May 12, 2006, Andrew Sweger wrote: >On Fri, 12 May 2006, Bill Campbell wrote: > >> On Fri, May 12, 2006, Rizvi, Ali wrote: >> >> >I find it kind of ironic that the Seattle "Perl" Users Group are running a >> >php based wiki. >> >> They didn't use the Zope/Plone site I set up for them either >> (python based :-). > >The truth comes out: I despisssse thosssse ssslippery ssssnakes. Python becomes much more palatable with liberal use of #{ and #} comments, allowing the vi editor to match brackes as $DEITY intended. Bill -- INTERNET: bill at Celestial.COM Bill Campbell; Celestial Software, LLC URL: http://www.celestial.com/ PO Box 820; 6641 E. Mercer Way FAX: (206) 232-9186 Mercer Island, WA 98040-0820; (206) 236-1676 Democracy must be sometihng more than two wolves and a sheep voting on what to have for dinner -- James Bovard From bill at celestial.com Fri May 12 15:55:22 2006 From: bill at celestial.com (Bill Campbell) Date: Fri, 12 May 2006 15:55:22 -0700 Subject: SPUG: SPUG Wiki replaced In-Reply-To: References: Message-ID: <20060512225522.GA51470@alexis.mi.celestial.com> On Fri, May 12, 2006, Andrew Sweger wrote: >I experienced Twiki a while back[1]. My decision was largely driven by 1) >how much sysadmin effort would be required to get it up and maintain it, >2) whether it supported user accountability out of the box, 3) whether it >is an officially maintained Debian package, 4) database backed, and 5) >fast (MW takes advantage of memcached; mad props to our buddy, Brad). Perl >was a ways further down the list as I recall. Twiki missed out on a few >points plus carries some unfortunate political and licensing baggage (I >stopped trying to keep up years ago, so maybe things have changed). Personally I don't care what language a package uses so long as it (a) runs in *nix, and (b) does the job without my having to poke around it its guts too frequently. The two major perl projects that we use are amavisd-new and spamassassin. We switched from Majordomo to Mailman several years ago (with a perl front-end I adapated from one I wrote for Majordomo years ago to prescan for spam patterns). Zope and Plone provide lots of capabilities that the average user can take advantage of without having to write in *ANY* language. Bill -- INTERNET: bill at Celestial.COM Bill Campbell; Celestial Software, LLC URL: http://www.celestial.com/ PO Box 820; 6641 E. Mercer Way FAX: (206) 232-9186 Mercer Island, WA 98040-0820; (206) 236-1676 ``It is surprising how much new stuff users find that developers never do. You put a copy in front of a normal user and they find all these bugs that you would think developers would find. The real users and developers are completely different species as far as I am concerned.'' --Linux creator Linus Torvalds From andrew at sweger.net Fri May 12 18:48:41 2006 From: andrew at sweger.net (Andrew Sweger) Date: Fri, 12 May 2006 18:48:41 -0700 (PDT) Subject: SPUG: object refs in Perl 5.6.1 vs 5.8.4 Message-ID: I feel like I'm going nuts. Please show me how nuts I am. I have some code that runs fine in development and promptly goes whacky in production. First, the environments: Dev --- Debian 3.1 (sarge) w/ Linux 2.4.27 Perl 5.8.4 Apache 1.3.33 mod_perl 1.29.0.3 (via libapache-mod-perl) Production ---------- Red Hat Enterprise Linux ES release 2.1 (Panama) (no choice) w/ linux 2.3.9-e.65smp (no choice) Perl 5.6.1 (no choice) Apache 1.3.27-10.ent (no choice) mod_perl 1.26-2 (no choice) I cannot duplicate the production environment in development. Nor would I do so except under threat of violent torture. My code is a CGI::Application using HTML::Template. The problem only appears when running under Apache/mod_perl(Apache::Registry) in production. I do clean restarts of the Apache server after making each code change (and sometimes complete stop/start cycles). The problem does not appear when running the code from the cammand line. It all runs fine in the dev environment. It seems that object methods that are supposed to return objects from another class (or just a simple hash ref) are suddenly just returning a scalar string containing the name of the thing I was trying to get back. Does that ring any bells yet? For example, in my application's cgiapp_postrun callback (automatically hooked by CGI::Application), I ask for $self->session() expecting a hash-ref or undef, I get back q{session}. I ask for $self->param('affiliate') expecting a My::Affiliate blessed object or undef), I get back q{affiliate}. These later blow up when I attempt to call further methods or de-refs on (for example) $sess->{'status'} which dies complaining I tried to use a string as a hash ref while under the influence of "strict refs" (strict is on *everywhere* in my code, except where it specifically is not, and this ain't one of 'em). my $sess = $self->session(); my $affiliate = $self->param('affiliate'); I'm dying for someone to say, "Ah, Andrew. You simpleton. Have you already forgotten ___________________?" Somebody at least say, "Wow, dude. That sure is weird." I'd almost swear there's nothing in the code path that could be returning those dumb strings. -- Andrew B. Sweger -- The great thing about multitasking is that several things can go wrong at once. From m3047 at inwa.net Sat May 13 08:19:59 2006 From: m3047 at inwa.net (Fred Morris) Date: Sat, 13 May 2006 08:19:59 -0700 Subject: SPUG: object refs in Perl 5.6.1 vs 5.8.4 Message-ID: Isn't that what happens when you try to stringify a ref? Checked paths? Any funny stuff going on in startup.perl? Using evals for anything in particular? Check paths, check the At 6:48 PM 5/12/06, Andrew Sweger wrote: >[...] >It seems that object methods that are supposed to return objects from >another class (or just a simple hash ref) are suddenly just returning a >scalar string containing the name of the thing I was trying to get back. -- Fred Morris From andrew at sweger.net Mon May 15 09:01:02 2006 From: andrew at sweger.net (Andrew Sweger) Date: Mon, 15 May 2006 09:01:02 -0700 (PDT) Subject: SPUG: object refs in Perl 5.6.1 vs 5.8.4 In-Reply-To: Message-ID: On Sat, 13 May 2006, Fred Morris wrote: > Isn't that what happens when you try to stringify a ref? I don't think so. A stringified object would be more like "Class::Name=HASH(0x836a824)". > Checked paths? Several times. But, after taking a break from this over the weekend, I'll look 'em over a few more times with OCD-like fervor. > Any funny stuff going on in startup.perl? One "use lib" to hook my local lib tree and a lot of "use Whatever ();" to preload the usual heavy hitters. No funny business here. > Using evals for anything in particular? Now that's an interesting question. This is inherited code that's gone through several programmers and subsequent coding styles. They naturally applied either the style they were familiar with or what ever code de jour took their fancy that month (I'm just as guilty). I do have an eval that I added to this particular application. I used it to replace a try/throw block (a la Error.pm) that was partially applied around a tie() call for an Apache::Session::File object (which is one of my culprits). Error.pm was not used consistently throughout the stack and there was already a mechanism for handling a tie() failure in scope. So I replaced it with an eval block. I'll have to play with that to see if I broke some other semantics somewhere. Thanks, Fred. -- Andrew B. Sweger -- The great thing about multitasking is that several things can go wrong at once. From andrew at seattelperl.org Mon May 15 14:26:12 2006 From: andrew at seattelperl.org (Andrew Sweger) Date: Mon, 15 May 2006 14:26:12 -0700 (PDT) Subject: SPUG: Meeting REMINDER -- Perl at IMDb -- 16 May 2006 Message-ID: The SPUG meeting is tomorrow evening. May 2006 Seattle Perl Users Group (SPUG) Meeting ================================================ Title: Perl at IMDb Speaker: Murray Chapman Meeting Date: Tuesday, 16 May 2006 Meeting Time: 6:30 - 8:30 p.m. Location: Whitepages.com offices Cost: Admission is free and open to the general public Info: http://seattleperl.org/ =========================================== Please join us Tuesday evening on 16 May 2006 at the regular monthly meeting of the Seattle Perl Users Group. Murray Chapman takes us inside the studio and on to the backlot for a glimpse into the Perl magic that keeps the reels turning at the Internet Movie Database. Come meet this star of script and web scenes made famous around the world. Thanks goes to SPUG-Workers for doing all the work to organize this presentation and to our speaker for giving their time and knowledge to us. See below for more information on... - Speaker Background - Presentation Description - Meeting Location Speaker Background ================== Murray Chapman -------------- Murray is the manager of the technology team at IMDb; their role is to build and operate the website, development platform, and other internal tools. Murray has been with IMDb since 1993 when it was a hobby project coordinated via rec.arts.movies. Following the April 1998 aquisition by Amazon.com, he moved from Brisbane, Australia to Seattle to spearhead the integration effort. He is a movie and computer geek, which makes IMDb the perfect environment for him! Presentation Description ======================== Perl at IMDb ------------ The Internet Movie Database is a top-100 website with an large amount of highly-interlinked data. They see themselves as a technology company rather than a media or entertainment company, having custom-built essentially all of our software in Perl. Murray wants to share some of the lessons they have learned about Perl: what works, what doesn't, and what we wish it could do -- as well as discussing practical information about building and operating an ultra-high-volume website as part of a team that is distributed across the globe. Meeting Location ================ Whitepages.com is located on the 16th floor of the Rainier Square Tower (1301 5th Avenue, Seattle) which is across from the 5th Avenue Theater. See the directions[1] for a quick primer on how to reach us from various locations across Puget Sound. There are plenty of locations to park in the area, including on the street. If you're looking for off-street parking, you can park in the Rainier Square garage which has an entrance on Union St. After 6PM, the building management restricts access to most floors. Our host is trying to take care of this, but if unsuccessful, they will station someone on the 1st floor near the elevator bank and 5th Avenue entrance to let people in. Worst case scenario, give our host a call on his cell phone[2] and he'll run down to let you in. Our hosts are providing a generous assortment of free sodas, fruit drinks, teas, and coffee, and also have some snacks. You definitely won't dehydrate here. We look forward to seeing you! [1] - http://www.whitepagesinc.com/locations [2] - (206) 579-7113 From jerry.gay at gmail.com Wed May 17 06:48:01 2006 From: jerry.gay at gmail.com (jerry gay) Date: Wed, 17 May 2006 06:48:01 -0700 Subject: SPUG: summer meeting preview Message-ID: <1d9a3f400605170648s3802ef81s147a8d64f43a0728@mail.gmail.com> inspired by stas bekman's visit last summer, i've been working on some speakers to make this summer even better for seattle perl hackers. with two confirmed speakers already, and two tentative, this promises to be a great summer. below is an overview of what i've been able to plan so far. this can also be found on the spug wiki, which i will keep up to date as information changes (http://wiki.seattleperl.org/) ~jerry June 23 (Confirmed) -- Audrey Tang Audrey Tang is the creator of pugs, a Haskell-based Perl 6 implementation. She will present Deploying Perl 6, which will be given again, just days later, at YAPC::NA. July (tentative) -- brian d foy brian d foy is the author of Learning Perl, Intermediate Perl, and the logical follow up and soon to be released tome, Mastering Perl. He has tentatively accepted an invitation to speak at SPUG in July, just before OSCON. August (Confirmed, date TBD) -- Mark Jason Dominus Mark is a well-respected perl hacker, a dynamic speaker, author of the highly-regarded Higher Order Perl, and is working on his next book, Perl Program Repair Shop and Red Flags. For his presentation, Mark will take some code SPUG gives him, refactor it, and present it to us, with lessons learned. Much thanks goes to whitepages.com for sponsoring Mark's visit. September (tentative) -- chromatic chromatic is a skilled perl hacker and editor at O'Reilly. He has tentatively accepted an invitation to speak at SPUG in September. From ingy at ttul.org Wed May 17 08:10:02 2006 From: ingy at ttul.org (Ingy dot Net) Date: Wed, 17 May 2006 08:10:02 -0700 Subject: SPUG: summer meeting preview In-Reply-To: <1d9a3f400605170648s3802ef81s147a8d64f43a0728@mail.gmail.com> References: <1d9a3f400605170648s3802ef81s147a8d64f43a0728@mail.gmail.com> Message-ID: <20060517151002.GB8289@ttul.org> FYI, A little birdy told me that Ingy d??t Net will be living in Seattle this summer, and could be coaxed into a Spug presentation. :) Cheers, Ingy On 17/05/06 06:48 -0700, jerry gay wrote: > > inspired by stas bekman's visit last summer, i've been working on some > speakers to make this summer even better for seattle perl hackers. > with two confirmed speakers already, and two tentative, this promises > to be a great summer. below is an overview of what i've been able to > plan so far. this can also be found on the spug wiki, which i will > keep up to date as information changes (http://wiki.seattleperl.org/) > ~jerry > > June 23 (Confirmed) -- Audrey Tang > > Audrey Tang is the creator of pugs, a Haskell-based Perl 6 > implementation. She will present Deploying Perl 6, which will be given > again, just days later, at YAPC::NA. > > > July (tentative) -- brian d foy > > brian d foy is the author of Learning Perl, Intermediate Perl, and the > logical follow up and soon to be released tome, Mastering Perl. He has > tentatively accepted an invitation to speak at SPUG in July, just > before OSCON. > > > August (Confirmed, date TBD) -- Mark Jason Dominus > > Mark is a well-respected perl hacker, a dynamic speaker, author of the > highly-regarded Higher Order Perl, and is working on his next book, > Perl Program Repair Shop and Red Flags. For his presentation, Mark > will take some code SPUG gives him, refactor it, and present it to us, > with lessons learned. Much thanks goes to whitepages.com for > sponsoring Mark's visit. > > > September (tentative) -- chromatic > > chromatic is a skilled perl hacker and editor at O'Reilly. He has > tentatively accepted an invitation to speak at SPUG in September. > _____________________________________________________________ > Seattle Perl Users Group Mailing List > POST TO: spug-list at pm.org > SUBSCRIPTION: http://mail.pm.org/mailman/listinfo/spug-list > MEETINGS: 3rd Tuesdays > WEB PAGE: http://seattleperl.org/ From Eric.D.Peterson at alltel.com Wed May 17 12:31:44 2006 From: Eric.D.Peterson at alltel.com (Eric.D.Peterson at alltel.com) Date: Wed, 17 May 2006 12:31:44 -0700 Subject: SPUG: spug-list Digest, Vol 35, Issue 8 Message-ID: <7D0AAB71F5A3104AA2A7631DA3C7489DAAF21F@nwwaseant641.alltel.com> I was unable to make the meeting yesterday. How was it? Were there handouts? Or some presentation that we (those that didn't attend) could review? Cheers Eric -----Original Message----- From: spug-list-bounces+eric.d.peterson=alltel.com at pm.org [mailto:spug-list-bounces+eric.d.peterson=alltel.com at pm.org] On Behalf Of spug-list-request at pm.org Sent: Wednesday, 17 May 2006 12:01 To: spug-list at pm.org Subject: spug-list Digest, Vol 35, Issue 8 Today's Topics: 1. summer meeting preview (jerry gay) 2. Re: summer meeting preview (Ingy dot Net) End of spug-list Digest, Vol 35, Issue 8 **************************************** ***************************************************************************** The information contained in this message, including attachments, may contain privileged or confidential information that is intended to be delivered only to the person identified above. If you are not the intended recipient, or the person responsible for delivering this message to the intended recipient, ALLTEL requests that you immediately notify the sender and asks that you do not read the message or its attachments, and that you delete them without copying or sending them to anyone else. From jerry.gay at gmail.com Thu May 18 08:31:24 2006 From: jerry.gay at gmail.com (jerry gay) Date: Thu, 18 May 2006 08:31:24 -0700 Subject: SPUG: spug-list Digest, Vol 35, Issue 8 In-Reply-To: <7D0AAB71F5A3104AA2A7631DA3C7489DAAF21F@nwwaseant641.alltel.com> References: <7D0AAB71F5A3104AA2A7631DA3C7489DAAF21F@nwwaseant641.alltel.com> Message-ID: <1d9a3f400605180831u3883be6fq43b7dd56a6cfb5d8@mail.gmail.com> On 5/17/06, Eric.D.Peterson at alltel.com wrote: > I was unable to make the meeting yesterday. How was it? Were > there handouts? Or some presentation that we (those that didn't attend) > could review? > it was enlightening. murray gave us an overview of imdb from the business perspective, then dove into a technical overview. he described the production environment, gave statistics on load and throughput, and introduced us to their homegrown templating language. he described the reasons for not using prior art, and discussed the pros and cons of the template system. also, he gave us a glimpse of what it's like dealing with hollywood--i'll eave that bit up to your imagination. he did provide some handouts, but i don't know if he'll give away the slides... murray? ~jerry From jerry.gay at gmail.com Thu May 18 08:51:00 2006 From: jerry.gay at gmail.com (jerry gay) Date: Thu, 18 May 2006 08:51:00 -0700 Subject: SPUG: dead or canadian? Message-ID: <1d9a3f400605180851u6a9f86a5v37fe12b0aba31e8c@mail.gmail.com> i've got a little twist on the old favorite game, "dead or canadian." if you're not familiar with it, shame on you for not watching mtv in the late 80's. at this week's meeting, i met and had dinner with a dead^Wcanadian fellow, and i've forgotten his name. i promised to give him some info, but it's a bit difficult without that critical piece of information. so, if you're out there, and aren't *both* dead and canadian, please send me an off-list response, so i can fulfill my promise. ~jerry From jobs-noreply at seattleperl.org Mon May 22 09:57:33 2006 From: jobs-noreply at seattleperl.org (SPUG Jobs) Date: Mon, 22 May 2006 09:57:33 -0700 (PDT) Subject: SPUG: JOB: Web Engineer, Seattle Times New Media Message-ID: Internet Engineer/Web Developer The Seattle Times New Media department is seeking an experienced Internet Engineer to design and implement features for www.seattletimes.com. You will have the opportunity to contribute on a wide variety of Web publishing product initiatives, play an active role within a dynamic engineering team and collaborate with a highly motivated cross-functional group. Develop Web applications using Javascript, SQL, php, Oracle, MySQL, XML, Perl and AJAX. Design and implement new site features as well as data transformation and exchange with other systems. Implement application features to enhance workflow efficiency and ensure data integrity. Minimum Requirements: BA/BS in Computer Science, Programming or equivalent demonstrated work experience. 4 years experience developing Web applications. Perl, Javascript, XML, php and SQL required. Experience with SQL databases, relational database modeling, Linux, and Windows. Extensive Web application development experience. Preferred Experience: Content management systems, Web publishing, ad serving, and search engine experience desired. Apache, Oracle and ColdFusion experience a plus. At the Seattle Times you'll find work that matters. We are a family-owned-and-operated company, involved with the community we serve. We are a drug-free workplace. EOE. Learn more about our company at seattletimescompany.com. To apply please e-mail or mail your cover letter and resume with job title and job #06-122/MS to: msye at seattletimes.com. Marie E. Sye Recruiter Seattle Times 206-464-2146 From jobs-noreply at seattleperl.org Mon May 22 12:51:09 2006 From: jobs-noreply at seattleperl.org (SPUG Jobs) Date: Mon, 22 May 2006 12:51:09 -0700 (PDT) Subject: SPUG: JOB: low-level tech/operations in lower Queen Anne Message-ID: Kinesis CEM., LLC is looking for a low level technical/operations person to fill a need here. The position would need a computer savvy person, with some knowledge about databases, and as a bonus, knowledge of perl. We have a mixed Linux/Windows environment. Our system is built on Perl, Apache and PostgeSQL. The work will be part technical, part not. To repeat, this is a low level position, similar to an internship. This would be a great opportunity for someone starting out in the computer industry, or alternately, could grow into a project management position for someone interested in market research. This would be a regular employee position, maybe part time, maybe full time, on a temporary basis. We're located in lower Queen Anne, two blocks west of Key arena. Telecommuting is unlikely. We are a market research company, focusing on surveys and mystery shopping. Interested applicants can contact Peter Darley at pdarley at kinesis-cem.com From andrew at sweger.net Tue May 23 10:38:14 2006 From: andrew at sweger.net (Andrew Sweger) Date: Tue, 23 May 2006 10:38:14 -0700 (PDT) Subject: SPUG: O'Reilly Open Source Convention "Locals Only" UG Discount Message-ID: I could have sworn I already forwarded this on to the list (a month ago!). Sorry for not getting this to you sooner. The good news is you still have plenty of time to take advantage of this offer. The O'Reilly Open Source Convention (OSCON) is returning to Portland, Oregon. Once again Oreilly is offering a special discount to the locals-- User Group members in Oregon and Washington. With this "locals only" discount, you get 20% off of OSCON registration. Anyone who registers by June 5 gets a double discount--20% off of the early registration price. After the June 5, you receive 20% off the regular conference pricing. Use code os06pusg when you register online: To register, go to: O'Reilly Open Source Convention Oregon Convention Center 777 N. E. Martin Luther King Jr. Blvd Portland, Oregon 97212 July 24-28, 2006 http://conferences.oreilly.com/oscon/ Oreilly also needs help getting the OSCON wiki and Platial map up to speed. Now is your chance to share your local hangouts & advice with other OSCON attendees. OSCON 2006 Wiki http://wiki.oreillynet.com/oscon2006/ OSCON 2006 Platial Map http://platial.com/saxtell/map/2476#OSCON_2006 From jazzdev at gmail.com Wed May 24 11:37:22 2006 From: jazzdev at gmail.com (JD Brennan) Date: Wed, 24 May 2006 11:37:22 -0700 Subject: SPUG: Bad file descriptor at .+ line \d+. Message-ID: Anyone seen an error matching this pattern running a Perl CGI on Windows 2003 with IIS 6.0? Here's my simple test script: dir.pl print "Content-type: text/plain\n\n"; open(CVS,"dir d:\\Inetpub\\wwwroot\\release_docs |") || die "Can't run dir: $!"; while () { print "$_"; } close(CVS); Here's the error I get: Can't run dir: Bad file descriptor at D:\Inetpub\wwwroot\safe\bin\dir.pl line 2. Script works on another Windows 2003 box with IIS 6.0. I can't find how I've got them configured differently. Any ideas appreciated. JD From jerry.gay at gmail.com Wed May 24 12:01:10 2006 From: jerry.gay at gmail.com (jerry gay) Date: Wed, 24 May 2006 12:01:10 -0700 Subject: SPUG: Bad file descriptor at .+ line \d+. In-Reply-To: References: Message-ID: <1d9a3f400605241201u667b2403h4cea3750ae13fb3c@mail.gmail.com> the error message points to line two of your script: > open(CVS,"dir d:\\Inetpub\\wwwroot\\release_docs |") || die "Can't run dir: $!"; it seems a file named 'dir d:\\Inetpub\\wwwroot\\release_docs |' does not exist ~jerry On 5/24/06, JD Brennan wrote: > Anyone seen an error matching this pattern running a Perl CGI > on Windows 2003 with IIS 6.0? > > Here's my simple test script: dir.pl > > print "Content-type: text/plain\n\n"; > open(CVS,"dir d:\\Inetpub\\wwwroot\\release_docs |") || die "Can't run dir: $!"; > while () { print "$_"; } > close(CVS); > > Here's the error I get: > > Can't run dir: Bad file descriptor at D:\Inetpub\wwwroot\safe\bin\dir.pl line 2. > > Script works on another Windows 2003 box with IIS 6.0. I can't find how > I've got them configured differently. > > Any ideas appreciated. > > JD > _____________________________________________________________ > Seattle Perl Users Group Mailing List > POST TO: spug-list at pm.org > SUBSCRIPTION: http://mail.pm.org/mailman/listinfo/spug-list > MEETINGS: 3rd Tuesdays > WEB PAGE: http://seattleperl.org/ > From paul at goracke.org Wed May 24 12:25:45 2006 From: paul at goracke.org (Paul Goracke) Date: Wed, 24 May 2006 12:25:45 -0700 Subject: SPUG: Bad file descriptor at .+ line \d+. In-Reply-To: References: Message-ID: <200605241225.45616.paul@goracke.org> On Wednesday 24 May 2006 11:37 am, JD Brennan wrote: > Here's the error I get: > > Can't run dir: Bad file descriptor at D:\Inetpub\wwwroot\safe\bin\dir.pl > line 2. > > Script works on another Windows 2003 box with IIS 6.0. I can't find how > I've got them configured differently. Is the release_docs directory empty on your problem machine? I notice that doing a 'dir' on an empty directory says "File Not Found"--it might be possible that translates to "Bad file descriptor". pg From cwilkes-spug at ladro.com Wed May 24 13:21:52 2006 From: cwilkes-spug at ladro.com (Chris Wilkes) Date: Wed, 24 May 2006 13:21:52 -0700 Subject: SPUG: Bad file descriptor at .+ line \d+. In-Reply-To: References: Message-ID: <20060524202152.GA31540@www2.ladro.com> On Wed, May 24, 2006 at 11:37:22AM -0700, JD Brennan wrote: > Anyone seen an error matching this pattern running a Perl CGI > on Windows 2003 with IIS 6.0? > > Here's my simple test script: dir.pl > > print "Content-type: text/plain\n\n"; > open(CVS,"dir d:\\Inetpub\\wwwroot\\release_docs |") || die "Can't run dir: $!"; > while () { print "$_"; } > close(CVS); > > Here's the error I get: > > Can't run dir: Bad file descriptor at D:\Inetpub\wwwroot\safe\bin\dir.pl line 2. Are you just trying to get a listing of stuff in that directory? use strict; my @stuff; my $dir = "c:/tmp"; opendir (FOO, $dir) || die "bah: $!\n"; @stuff = map { "$dir/$_" } grep { !/^\.{1,2}$/ } readdir(FOO); close FOO; foreach (@stuff) { printf "%-20s %s\n", $_, getType($_); } sub getType { my $f = shift(); return "file" if (-f $f); return "directory" if (-d $f); return "unknown"; } From jarich at perltraining.com.au Wed May 24 16:11:24 2006 From: jarich at perltraining.com.au (Jacinta Richardson) Date: Thu, 25 May 2006 09:11:24 +1000 (EST) Subject: SPUG: Bad file descriptor at .+ line \d+. In-Reply-To: Message-ID: On Wed, 24 May 2006, JD Brennan wrote: > Anyone seen an error matching this pattern running a Perl CGI > on Windows 2003 with IIS 6.0? > > Here's my simple test script: dir.pl > > print "Content-type: text/plain\n\n"; > open(CVS,"dir d:\\Inetpub\\wwwroot\\release_docs |") || die "Can't run dir: $!"; > while () { print "$_"; } > close(CVS); > > Here's the error I get: > > Can't run dir: Bad file descriptor at D:\Inetpub\wwwroot\safe\bin\dir.pl line 2. > > Script works on another Windows 2003 box with IIS 6.0. I can't find how > I've got them configured differently. My theory is that your environments are different. It is possible that on the machine that's failing, "dir" isn't in the path. You can test this by changing your script to: print "Content-type: text/plain\n\n"; system("dir d:\\Inetpub\\wwwroot\\release_docs"); if($?) { "Failed to run dir: $!"; } The solution would be to set $ENV{PATH} to something which includes the location of your "dir" executable - have a look at what the working machine has in it's PATH. I think you can just type "env" at the dos prompt to see all the values (or loop over the keys of %ENV). For what it's's worth, I strongly recommend using the three argument version of open for piped commands. (Unless you need backwards compatibility with Perl < 5.6.0). open(CVS, "-|", "dir d:\\Inetpub\\wwwroot\\release_docs") or die "Can't run dir: $!"; This makes it much more clear to others that you don't want to open the filename: "dir d:\\Inetpub\\wwwroot\\release_docs |" but are actually executing a command (or if they don't know the syntax, at least they realise you're doing something that looks odd). All the very best, Jacinta -- ("`-''-/").___..--''"`-._ | Jacinta Richardson | `6_ 6 ) `-. ( ).`-.__.`) | Perl Training Australia | (_Y_.)' ._ ) `._ `. ``-..-' | +61 3 9354 6001 | _..`--'_..-_/ /--'_.' ,' | contact at perltraining.com.au | (il),-'' (li),' ((!.-' | www.perltraining.com.au | From jazzdev at gmail.com Wed May 24 16:50:10 2006 From: jazzdev at gmail.com (JD Brennan) Date: Wed, 24 May 2006 16:50:10 -0700 Subject: SPUG: Bad file descriptor at .+ line \d+. In-Reply-To: References: Message-ID: You are quite correct. The environments were different. They were running with different user accounts. I just had to setup the Directory Security for the virtual directory in IIS to use an account that is in the Local Administrators group. That seems to allow Perl CGIs to create subprocesses. Thanks for your help. JD P.S. system() didn't work either. It just did nothing and produced no errors either. On 5/24/06, Jacinta Richardson wrote: > On Wed, 24 May 2006, JD Brennan wrote: > > > Anyone seen an error matching this pattern running a Perl CGI > > on Windows 2003 with IIS 6.0? > > > > Here's my simple test script: dir.pl > > > > print "Content-type: text/plain\n\n"; > > open(CVS,"dir d:\\Inetpub\\wwwroot\\release_docs |") || die "Can't run dir: $!"; > > while () { print "$_"; } > > close(CVS); > > > > Here's the error I get: > > > > Can't run dir: Bad file descriptor at D:\Inetpub\wwwroot\safe\bin\dir.pl line 2. > > > > Script works on another Windows 2003 box with IIS 6.0. I can't find how > > I've got them configured differently. > > My theory is that your environments are different. It is possible that > on the machine that's failing, "dir" isn't in the path. You can test this > by changing your script to: > > print "Content-type: text/plain\n\n"; > system("dir d:\\Inetpub\\wwwroot\\release_docs"); > if($?) { > "Failed to run dir: $!"; > } > > The solution would be to set $ENV{PATH} to something which includes the > location of your "dir" executable - have a look at what the working > machine has in it's PATH. I think you can just type "env" at the dos > prompt to see all the values (or loop over the keys of %ENV). > > For what it's's worth, I strongly recommend using the three argument > version of open for piped commands. (Unless you need backwards > compatibility with Perl < 5.6.0). > > open(CVS, "-|", "dir d:\\Inetpub\\wwwroot\\release_docs") > or die "Can't run dir: $!"; > > This makes it much more clear to others that you don't want to open the > filename: "dir d:\\Inetpub\\wwwroot\\release_docs |" but are actually > executing a command (or if they don't know the syntax, at least they > realise you're doing something that looks odd). > > All the very best, > > Jacinta > > -- > ("`-''-/").___..--''"`-._ | Jacinta Richardson | > `6_ 6 ) `-. ( ).`-.__.`) | Perl Training Australia | > (_Y_.)' ._ ) `._ `. ``-..-' | +61 3 9354 6001 | > _..`--'_..-_/ /--'_.' ,' | contact at perltraining.com.au | > (il),-'' (li),' ((!.-' | www.perltraining.com.au | > > From bmaust at gmail.com Wed May 24 17:13:38 2006 From: bmaust at gmail.com (Brandon Maust) Date: Wed, 24 May 2006 17:13:38 -0700 Subject: SPUG: Bad file descriptor at .+ line \d+. In-Reply-To: References: Message-ID: On 5/24/06, JD Brennan wrote: > I just had to setup the Directory Security for the virtual > directory in IIS to use an account that is in the Local Administrators > group. That seems to allow Perl CGIs to create subprocesses. running CGI processes (even perl) with administrative privileges is generally a scary way to do things. Could adding the account to the local users group or granting it a specific privilege have the same effect? -- Brandon From jazzdev at gmail.com Wed May 24 17:21:37 2006 From: jazzdev at gmail.com (JD Brennan) Date: Wed, 24 May 2006 17:21:37 -0700 Subject: SPUG: Bad file descriptor at .+ line \d+. In-Reply-To: References: Message-ID: Yes, there's probably some specific privilege that would work, but we're not concerned enough about the security on this machine to spend the time trying to figure it out. It's an internal web server that everyone has write permission to anyway. JD On 5/24/06, Brandon Maust wrote: > On 5/24/06, JD Brennan wrote: > > > I just had to setup the Directory Security for the virtual > > directory in IIS to use an account that is in the Local Administrators > > group. That seems to allow Perl CGIs to create subprocesses. > > running CGI processes (even perl) with administrative privileges is > generally a scary way to do things. Could adding the account to the > local users group or granting it a specific privilege have the same > effect? > > -- > Brandon > From jobs-noreply at seattleperl.org Fri May 26 09:26:11 2006 From: jobs-noreply at seattleperl.org (SPUG Jobs) Date: Fri, 26 May 2006 09:26:11 -0700 (PDT) Subject: SPUG: JOB: Perl contract, Portland, Maine Message-ID: Contract opening with client of Global Technical Talent Location: Portland, Maine area - minimum of 3 months - Hourly Pay range is from $60 to $75 c2c or 1099 and adjusted according for a w2. - Prefer onsite - Client is a Bank - Application being developed is a collections application Experience with Perl, OO Programming and Perl-Mod *Perl Programmer with OO Programming Skills *Experienced with SQL and Oracle *Perl-Mod Must Have: Perl, HTML, JavaScript Patty Price Sr. Technical Recruiter Global Technical Talent 28 Deer Street Portsmouth, NH 03801 603-610-6211 Office 978-413-4519 Cell From MichaelRWolf at att.net Fri May 26 14:00:45 2006 From: MichaelRWolf at att.net (Michael R. Wolf) Date: Fri, 26 May 2006 14:00:45 -0700 Subject: SPUG: querying multiple databases with one $dbh Message-ID: A student in my Perl+CGI+DBI class is used to working in PHP and often uses MySQL to query more than one database. Not only does the SQL connect to multiple databases, but it also does a join across the multiple databases. It does all this without her having to explicitly connect to any databases. She can do this directly with MySQL from the command line, so it appears (to my niave DBI mind) that she should be able to do it from the DBI. SELECT table1.a, table2.b FROM db1.table1 table1, db2.table1 table2 WHERE table1.c = table2.c I'm assuming that she can do something like this. Any comments? $sql = "as given above"; $dbh = DBI::new('DBI:mysql:db1', undef, undef, {AutoCommit=>1}; $sth = $dbh->prepare($sql); She wants to avoid getting two $dbh's because then she'd have to do the join from Perl rather than having MySQL do it for her. Is MySQL connecting/disconnecting each time she runs this query, or is there some magic where it caches the DB Handles behind the scene? Is there another way to have multiple connections via the DBI without having to do multiple DBI::new()'s? -- Michael R. Wolf All mammals learn by playing! MichaelRWolf at att.net From dleonard at dleonard.net Fri May 26 15:52:38 2006 From: dleonard at dleonard.net (dleonard at dleonard.net) Date: Fri, 26 May 2006 15:52:38 -0700 (PDT) Subject: SPUG: object refs in Perl 5.6.1 vs 5.8.4 In-Reply-To: Message-ID: Based on past experience with similar issues I would guess that an AUTOLOAD somewhere is biting you. In fact at our previous employer's long, long ago I believe I ran into the exact same issue. Something in startup.pl was loading a module with an AUTOLOAD that was hosing up everything downstream. -- On Fri, 12 May 2006, Andrew Sweger wrote: > I feel like I'm going nuts. Please show me how nuts I am. I have some code > that runs fine in development and promptly goes whacky in production. > First, the environments: > > Dev > --- > Debian 3.1 (sarge) > w/ Linux 2.4.27 > Perl 5.8.4 > Apache 1.3.33 > mod_perl 1.29.0.3 (via libapache-mod-perl) > > Production > ---------- > Red Hat Enterprise Linux ES release 2.1 (Panama) (no choice) > w/ linux 2.3.9-e.65smp (no choice) > Perl 5.6.1 (no choice) > Apache 1.3.27-10.ent (no choice) > mod_perl 1.26-2 (no choice) > > I cannot duplicate the production environment in development. Nor would I > do so except under threat of violent torture. > > My code is a CGI::Application using HTML::Template. The problem only > appears when running under Apache/mod_perl(Apache::Registry) in > production. I do clean restarts of the Apache server after making each > code change (and sometimes complete stop/start cycles). The problem does > not appear when running the code from the cammand line. It all runs fine > in the dev environment. > > It seems that object methods that are supposed to return objects from > another class (or just a simple hash ref) are suddenly just returning a > scalar string containing the name of the thing I was trying to get back. > > Does that ring any bells yet? > > For example, in my application's cgiapp_postrun callback (automatically > hooked by CGI::Application), I ask for $self->session() expecting a > hash-ref or undef, I get back q{session}. I ask for > $self->param('affiliate') expecting a My::Affiliate blessed object or > undef), I get back q{affiliate}. These later blow up when I attempt to > call further methods or de-refs on (for example) $sess->{'status'} which > dies complaining I tried to use a string as a hash ref while under the > influence of "strict refs" (strict is on *everywhere* in my code, except > where it specifically is not, and this ain't one of 'em). > > my $sess = $self->session(); > my $affiliate = $self->param('affiliate'); > > I'm dying for someone to say, "Ah, Andrew. You simpleton. Have you already > forgotten ___________________?" > > Somebody at least say, "Wow, dude. That sure is weird." I'd almost swear > there's nothing in the code path that could be returning those dumb > strings. > > -- > Andrew B. Sweger -- The great thing about multitasking is that several > things can go wrong at once. > > > _____________________________________________________________ > Seattle Perl Users Group Mailing List > POST TO: spug-list at pm.org > SUBSCRIPTION: http://mail.pm.org/mailman/listinfo/spug-list > MEETINGS: 3rd Tuesdays > WEB PAGE: http://seattleperl.org/ > From cxreg at pobox.com Fri May 26 16:05:35 2006 From: cxreg at pobox.com (Dave O) Date: Fri, 26 May 2006 18:05:35 -0500 (CDT) Subject: SPUG: querying multiple databases with one $dbh In-Reply-To: <20060526210117.311511783A@x6.develooper.com> References: <20060526210117.311511783A@x6.develooper.com> Message-ID: I don't believe that MySQL supports Oracle-like DBLink functionality, although you can use the SQL as described if the 2 logical databases are in the same physical MySQL instance, thus accessible with a single socket and $dbh. That's probably what she was doing. Dave On Fri, 26 May 2006, Michael R. Wolf wrote: > A student in my Perl+CGI+DBI class is used to working in PHP and often > uses MySQL to query more than one database. Not only does the SQL > connect to multiple databases, but it also does a join across the > multiple databases. It does all this without her having to explicitly > connect to any databases. She can do this directly with MySQL from > the command line, so it appears (to my niave DBI mind) that she should > be able to do it from the DBI. > > SELECT table1.a, table2.b > FROM db1.table1 table1, db2.table1 table2 > WHERE table1.c = table2.c > > I'm assuming that she can do something like this. Any comments? > > $sql = "as given above"; > $dbh = DBI::new('DBI:mysql:db1', undef, undef, {AutoCommit=>1}; > $sth = $dbh->prepare($sql); > > She wants to avoid getting two $dbh's because then she'd have to do > the join from Perl rather than having MySQL do it for her. > > Is MySQL connecting/disconnecting each time she runs this query, or is > there some magic where it caches the DB Handles behind the scene? > > Is there another way to have multiple connections via the DBI without > having to do multiple DBI::new()'s? > > -- > Michael R. Wolf > All mammals learn by playing! > MichaelRWolf at att.net > > > _____________________________________________________________ > Seattle Perl Users Group Mailing List > POST TO: spug-list at pm.org > SUBSCRIPTION: http://mail.pm.org/mailman/listinfo/spug-list > MEETINGS: 3rd Tuesdays > WEB PAGE: http://seattleperl.org/ > > > From globetrotcom at yahoo.com Tue May 30 14:36:20 2006 From: globetrotcom at yahoo.com (Satish Gupta) Date: Tue, 30 May 2006 14:36:20 -0700 (PDT) Subject: SPUG: finding full path to itself Message-ID: <20060530213620.41003.qmail@web36105.mail.mud.yahoo.com> When I a stand-alone script is running, how can this script determine it's own absolute path in a portable manner? I notice that $0 works differently on different OS's. On some it gives full path and not on others. Thanks --------------------------------- Be a chatter box. Enjoy free PC-to-PC calls with Yahoo! Messenger with Voice. -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mail.pm.org/pipermail/spug-list/attachments/20060530/feaa855a/attachment.html From jlb at io.com Tue May 30 15:40:05 2006 From: jlb at io.com (jlb) Date: Tue, 30 May 2006 17:40:05 -0500 (CDT) Subject: SPUG: finding full path to itself In-Reply-To: <20060530213620.41003.qmail@web36105.mail.mud.yahoo.com> References: <20060530213620.41003.qmail@web36105.mail.mud.yahoo.com> Message-ID: <20060530173821.R14000@eris.io.com> Cwd.pm provides some portable, safe methods to determine your current working directory. On Tue, 30 May 2006, Satish Gupta wrote: > When I a stand-alone script is running, how can this script determine it's own absolute path in a portable manner? > > I notice that $0 works differently on different OS's. On some it gives full path and not on others. > > Thanks > > > --------------------------------- > Be a chatter box. Enjoy free PC-to-PC calls with Yahoo! Messenger with Voice. From cmeyer at helvella.org Tue May 30 16:21:44 2006 From: cmeyer at helvella.org (Colin Meyer) Date: Tue, 30 May 2006 16:21:44 -0700 Subject: SPUG: finding full path to itself In-Reply-To: <20060530173821.R14000@eris.io.com> References: <20060530213620.41003.qmail@web36105.mail.mud.yahoo.com> <20060530173821.R14000@eris.io.com> Message-ID: <20060530232144.GF20374@funpox.helvella.org> On Tue, May 30, 2006 at 05:40:05PM -0500, jlb wrote: > Cwd.pm provides some portable, safe methods to determine your current > working directory. Or see FindBin.pm, if you want to know where the script itself is located (e.g. to be able to read a config file from the same dir). -Colin. > > On Tue, 30 May 2006, Satish Gupta wrote: > > > When I a stand-alone script is running, how can this script determine it's own absolute path in a portable manner? > > > > I notice that $0 works differently on different OS's. On some it gives full path and not on others. > > > > Thanks > > > > > > --------------------------------- > > Be a chatter box. Enjoy free PC-to-PC calls with Yahoo! Messenger with Voice. > _____________________________________________________________ > Seattle Perl Users Group Mailing List > POST TO: spug-list at pm.org > SUBSCRIPTION: http://mail.pm.org/mailman/listinfo/spug-list > MEETINGS: 3rd Tuesdays > WEB PAGE: http://seattleperl.org/ From rick.croote at philips.com Tue May 30 17:07:04 2006 From: rick.croote at philips.com (Rick Croote) Date: Tue, 30 May 2006 17:07:04 -0700 Subject: SPUG: finding full path to itself In-Reply-To: <20060530232144.GF20374@funpox.helvella.org> Message-ID: The best way I've found to do this has been FindBin. We often use it to find where the custom libs are relative to the application, such as the following code: use FindBin; use lib "$FindBin::Bin/../../libs/perl"; or to obtain the location: use FindBin; my $appPath = $FindBin::Bin; --- Rick Croote Software Engineer Environment and Tools Team Philips Medical Systems Bothell, WA Rick.Croote at Philips.com Phone: 425-487-7834 Colin Meyer Sent by: spug-list-bounces+rick.croote=philips.com at pm.org 2006-05-30 04:21 PM To jlb cc spug-list at pm.org Subject Re: SPUG: finding full path to itself Classification On Tue, May 30, 2006 at 05:40:05PM -0500, jlb wrote: > Cwd.pm provides some portable, safe methods to determine your current > working directory. Or see FindBin.pm, if you want to know where the script itself is located (e.g. to be able to read a config file from the same dir). -Colin. > > On Tue, 30 May 2006, Satish Gupta wrote: > > > When I a stand-alone script is running, how can this script determine it's own absolute path in a portable manner? > > > > I notice that $0 works differently on different OS's. On some it gives full path and not on others. > > > > Thanks > > > > > > --------------------------------- > > Be a chatter box. Enjoy free PC-to-PC calls with Yahoo! Messenger with Voice. > _____________________________________________________________ > Seattle Perl Users Group Mailing List > POST TO: spug-list at pm.org > SUBSCRIPTION: http://mail.pm.org/mailman/listinfo/spug-list > MEETINGS: 3rd Tuesdays > WEB PAGE: http://seattleperl.org/ _____________________________________________________________ Seattle Perl Users Group Mailing List POST TO: spug-list at pm.org SUBSCRIPTION: http://mail.pm.org/mailman/listinfo/spug-list MEETINGS: 3rd Tuesdays WEB PAGE: http://seattleperl.org/ -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mail.pm.org/pipermail/spug-list/attachments/20060530/c54d3948/attachment.html From jlb at io.com Tue May 30 17:30:00 2006 From: jlb at io.com (Jon Burdge) Date: Tue, 30 May 2006 19:30:00 -0500 (CDT) Subject: SPUG: finding full path to itself In-Reply-To: <20060530232144.GF20374@funpox.helvella.org> References: <20060530213620.41003.qmail@web36105.mail.mud.yahoo.com> <20060530173821.R14000@eris.io.com> <20060530232144.GF20374@funpox.helvella.org> Message-ID: <20060530192923.X18857@eris.io.com> > Or see FindBin.pm, if you want to know where the script itself is > located (e.g. to be able to read a config file from the same dir). Oh, I completely misunderstood the question. Excellent point. From cwilkes-spug at ladro.com Tue May 30 21:12:42 2006 From: cwilkes-spug at ladro.com (Chris Wilkes) Date: Tue, 30 May 2006 21:12:42 -0700 Subject: SPUG: finding full path to itself In-Reply-To: <20060530213620.41003.qmail@web36105.mail.mud.yahoo.com> References: <20060530213620.41003.qmail@web36105.mail.mud.yahoo.com> Message-ID: <20060531041242.GA25460@www2.ladro.com> On Tue, May 30, 2006 at 02:36:20PM -0700, Satish Gupta wrote: > When I a stand-alone script is running, how can this script determine > it's own absolute path in a portable manner? > > I notice that $0 works differently on different OS's. On some it gives > full path and not on others. Along those same lines how can I, in a portable manner, determine the full path to the perl executable? Kwiki has a hardcoded path of #!/usr/bin/perl which is okay for most non-windows machines, but I'm stuck with a windows box for right now. It is not a big deal as I just edit index.cgi after every update (or I could edit the Kwiki::Files file) but it would be nice to automagically figure that out when installing Kwiki. Chris From MichaelRWolf at att.net Wed May 31 08:22:24 2006 From: MichaelRWolf at att.net (Michael R. Wolf) Date: Wed, 31 May 2006 08:22:24 -0700 Subject: SPUG: finding full path to itself In-Reply-To: <20060531041242.GA25460@www2.ladro.com> Message-ID: Try $^X Or use English; $EXECUTABLE_NAME -- Michael R. Wolf All mammals learn by playing! MichaelRWolf at att.net > -----Original Message----- > From: spug-list-bounces+michaelrwolf=att.net at pm.org [mailto:spug-list- > bounces+michaelrwolf=att.net at pm.org] On Behalf Of Chris Wilkes > Sent: Tuesday, May 30, 2006 9:13 PM > To: spug-list at pm.org > Subject: Re: SPUG: finding full path to itself > > On Tue, May 30, 2006 at 02:36:20PM -0700, Satish Gupta wrote: > > When I a stand-alone script is running, how can this script determine > > it's own absolute path in a portable manner? > > > > I notice that $0 works differently on different OS's. On some it gives > > full path and not on others. > > Along those same lines how can I, in a portable manner, determine the > full path to the perl executable? > > Kwiki has a hardcoded path of #!/usr/bin/perl which is okay for most > non-windows machines, but I'm stuck with a windows box for right now. It > is not a big deal as I just edit index.cgi after every update (or I > could edit the Kwiki::Files file) but it would be nice to automagically > figure that out when installing Kwiki. > > Chris > _____________________________________________________________ > Seattle Perl Users Group Mailing List > POST TO: spug-list at pm.org > SUBSCRIPTION: http://mail.pm.org/mailman/listinfo/spug-list > MEETINGS: 3rd Tuesdays > WEB PAGE: http://seattleperl.org/ From charles.e.derykus at boeing.com Wed May 31 09:36:49 2006 From: charles.e.derykus at boeing.com (DeRykus, Charles E) Date: Wed, 31 May 2006 09:36:49 -0700 Subject: SPUG: finding full path to itself In-Reply-To: <20060531041242.GA25460@www2.ladro.com> Message-ID: On Tue, May 30, 2006 at 02:36:20PM -0700, Satish Gupta wrote: > When I a stand-alone script is running, how can this script determine > it's own absolute path in a portable manner? > > I notice that $0 works differently on different OS's. On some it gives > full path and not on others. >> Along those same lines how can I, in a portable manner, determine the full path >> to the perl executable? >> Kwiki has a hardcoded path of #!/usr/bin/perl which is okay for most non-windows >> machines, but I'm stuck with a windows box for right now. It is not a big deal >> as I just edit index.cgi after every update (or I could edit the Kwiki::Files file) >> but it would be nice to automagically figure that out when installing Kwiki. The recommended safe way in `perldoc perl` is to use the installed executable. On Win32 for instance: C:\>perl -V:perlpath perlpath='C:\Perl\bin\perl.exe'; C:\>perl -V:_exe _exe='.exe'; >From `perldoc perlvar`: Because many operating systems permit anyone with read access to the Perl program file to make a copy of it, patch the copy, and then execute the copy, the security-conscious Perl programmer should take care to invoke the installed copy of perl, not the copy referenced by $^X. The following statements accomplish this goal, and produce a pathname that can be invoked as a command or referenced as a file. use Config; $secure_perl_path = $Config{perlpath}; if ($^O ne 'VMS') {$secure_perl_path .= $Config{_exe} unless $secure_perl_path =~ m/$Config{_exe}$/i;} -- Charles DeRykus