From david.s.patterson at usa.net Thu Sep 7 14:14:20 2006 From: david.s.patterson at usa.net (David S. Patterson) Date: Thu, 07 Sep 2006 14:14:20 -0700 Subject: SPUG: Piping a file to perl to execute Message-ID: <784kigVNu8880S29.1157663660@cmsweb29.cms.usa.net> I'm trying to kludge together a strategy to protect some perl source code from prying eyes (this would be on a Unix-like system). I'm thinking of a solution in which a simple compiled front-end program reads an encrypted text file, decodes it internally into a perl script, and then execs or launches the perl executable and somehow provides the decoded perl script to it. The point is that the decoded perl script must never become a temporary file that a "casual user" could edit. I think that temporary pipe files would be fine, finding and opening those is not "easy". Does anyone have any ideas or suggestions about this? Is it possible to "pipe" a file to perl and have it execute it? Can it be done with the right command line switch? e.g.: $ cat foo.pl | perl Thanx, -Pat From muzzle at imdb.com Thu Sep 7 14:19:47 2006 From: muzzle at imdb.com (Murray Chapman) Date: Thu, 7 Sep 2006 22:19:47 +0100 (BST) Subject: SPUG: Piping a file to perl to execute In-Reply-To: <784kigVNu8880S29.1157663660@cmsweb29.cms.usa.net> Message-ID: On Thu, 7 Sep 2006, David S. Patterson wrote: > I'm trying to kludge together a strategy to protect some perl source code from > prying eyes (this would be on a Unix-like system). > Does anyone have any ideas or suggestions about this? See: http://omaha.pm.org/emails/2003/msg00188.html and then if you still want to proceed: Filter::Crypto Murray -- Murray Chapman Zheenl Punczna -- -- muzzle at imdb.com zhmmyr at vzqo.pbz -- -- Internet Movie Database Vagrearg Zbivr Qngnonfr -- -- http://www.imdb.com uggc://jjj.vzqo.pbz -- From jazzdev at gmail.com Thu Sep 7 14:20:16 2006 From: jazzdev at gmail.com (JD Brennan) Date: Thu, 7 Sep 2006 14:20:16 -0700 Subject: SPUG: Piping a file to perl to execute In-Reply-To: <784kigVNu8880S29.1157663660@cmsweb29.cms.usa.net> References: <784kigVNu8880S29.1157663660@cmsweb29.cms.usa.net> Message-ID: You don't need a command line switch unless you want to pass args: % echo 'print "hi\n";' | perl hi % echo 'print "@ARGV\n";' | perl - a1 a2 a1 a2 JD On 9/7/06, David S. Patterson wrote: > > I'm trying to kludge together a strategy to protect some perl source code > from > prying eyes (this would be on a Unix-like system). > > I'm thinking of a solution in which a simple compiled front-end program > reads > an encrypted text file, decodes it internally into a perl script, and then > execs or launches the perl executable and somehow provides the decoded > perl > script to it. The point is that the decoded perl script must never become > a > temporary file that a "casual user" could edit. I think that temporary > pipe > files would be fine, finding and opening those is not "easy". > > Does anyone have any ideas or suggestions about this? > > Is it possible to "pipe" a file to perl and have it execute it? Can it be > done with the right command line switch? > > e.g.: $ cat foo.pl | perl > > Thanx, > > -Pat > > > _____________________________________________________________ > 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/20060907/ff0edc0e/attachment.html From jazzdev at gmail.com Thu Sep 7 14:26:05 2006 From: jazzdev at gmail.com (JD Brennan) Date: Thu, 7 Sep 2006 14:26:05 -0700 Subject: SPUG: Piping a file to perl to execute In-Reply-To: References: <784kigVNu8880S29.1157663660@cmsweb29.cms.usa.net> Message-ID: Interesting. I'd say using a byte-code or native-code compiler would be better than encryption. David said he just wants to keep the code from a 'casual user' so compiling would accomplish that. JD On 9/7/06, Murray Chapman wrote: > > On Thu, 7 Sep 2006, David S. Patterson wrote: > > > I'm trying to kludge together a strategy to protect some perl source > code from > > prying eyes (this would be on a Unix-like system). > > > Does anyone have any ideas or suggestions about this? > > See: > > http://omaha.pm.org/emails/2003/msg00188.html > > and then if you still want to proceed: > > Filter::Crypto > > > Murray > > > -- Murray Chapman Zheenl Punczna -- > -- muzzle at imdb.com zhmmyr at vzqo.pbz -- > > -- Internet Movie Database Vagrearg Zbivr Qngnonfr -- > -- http://www.imdb.com uggc://jjj.vzqo.pbz -- > > _____________________________________________________________ > 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/20060907/15293c9b/attachment.html From tim at consultix-inc.com Thu Sep 7 14:42:08 2006 From: tim at consultix-inc.com (Tim Maher) Date: Thu, 7 Sep 2006 14:42:08 -0700 Subject: SPUG: Piping a file to perl to execute In-Reply-To: <784kigVNu8880S29.1157663660@cmsweb29.cms.usa.net> References: <784kigVNu8880S29.1157663660@cmsweb29.cms.usa.net> Message-ID: <20060907214208.GA21519@jumpy.consultix-inc.com> On Thu, Sep 07, 2006 at 02:14:20PM -0700, David S. Patterson wrote: > I'm trying to kludge together a strategy to protect some perl source code from > prying eyes (this would be on a Unix-like system). > > Thanx, > > -Pat Hi Pat, * You could use Acme::Bleach (or it's more tantalizing variation that I solicited from Damian, Acme::Morse) to disguise the source code, while still allowing it to be executed * You could use Filter::Simple (or one of its relatives) to have Perl "automatically" convert encrypted source code into plain text for compilation. Although a sophisticated user could use Perl's back-end facilities to dumpy out the readable source, a casual user won't know how to do that *-------------------------------------------------------------------* | Tim Maher, PhD (206) 781-UNIX (866) DOC-PERL (866) DOC-UNIX | | tim at ( Consultix-Inc, TeachMePerl, or TeachMeUnix ) dot Com | *-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-* | UPCOMING CLASSES; 9/18: UNIX/Linux Fundamentals 10/9: Basic Perl | | * Check out my new book: "Minimal Perl for UNIX/Linux People" * | | See MinimalPerl.com for details, free chapters, and ordering | *-------------------------------------------------------------------* From tim at consultix-inc.com Thu Sep 7 18:07:52 2006 From: tim at consultix-inc.com (Tim Maher) Date: Thu, 7 Sep 2006 18:07:52 -0700 Subject: SPUG: Minimal Perl book released today! Message-ID: <20060908010752.GA22334@jumpy.consultix-inc.com> SPUGsters, My book on Perl is finally available. In fact, it's /so/ available that you can even get two of its twelve chapters for free from the publisher's web site! As detailed in the brochure (see http://MinimalPerl.com), this book teaches Perl to UNIX/Linux people by capitalizing on their existing knowledge and skills. For example, the book discusses the matching operator's features in terms of the grep/fgrep/egrep commands, and it contrasts the syntax and features of Perl arrays with Shell arrays. What's more, because this is not a book for beginners only, it goes into greater detail on a variety of topics than you'll find anywhere else (e.g., how to emulate the advanced features of the Shell's looping facilities, and how to use "set -x" to debug Shell commands launched via "system"). I spent a great deal of time and effort to make this book as useful and entertaining as possible. For example, to enrich its value as a reference work, the book provides nearly 100 detailed tables, showing Perl's essential features and how they relate to their counterparts in the Shell (e.g., split vs. $IFS), or in the UNIX/Linux command set (e.g., Text::Autoformat vs. fmt). Another unique feature of this book is its use of amusing "case studies", to entertain you while you're learning Perl. Here are some of the characters you'll encounter in the book: * Patrick from soggy Seattle, a climatology data-wrangler who consoles himself by proving that Miami and New York are "rainier" * Felix and Oscar, who respectively specialize in the fastidious and quick-and-dirty styles of programming and are in contention for the same promotion * Ivan the stamp collector--who has to compress images ranging from scowling dictators to Franco Zappato's tweezer collection--to fit within the storage alloted by his ISP * Diggity Dog, a rapper with a reputation for profanity to uphold, who "validates" his lyrics with Perl * The wily Bell Labs veteran, who wins a $200 bar-bet by writing a one- line Shell script that calculates the square root of "pi". Like other JAPHs, I'm very grateful for Larry's gift of Perl to us, so I'm happy to have been able to give something back to Perlity by making this contribution to the literature. However, I hasten to add that I'm indebted to dozens of members from the Perl community-- including many SPUGsters--for their generous donations of time and effort to act as reviewers and proofreaders for this book. To get more details and to download the sample chapters, go to the publisher's site: http://manning.com/maher To download the brochure and useful articles containing material that couldn't fit in the book itself, go to http://MinimalPerl.com By the way, those who buy the Electronic-edition ($22.50), which is available now, can upgrade to the paper version when it becomes available in a few weeks by paying the difference. If you exercise this option, you'll get the book in both digital and paper formats for the price of the paper version alone, which is pretty cool. I hope you like my book! -Tim *-------------------------------------------------------------------* | Tim Maher, PhD (206) 781-UNIX (866) DOC-PERL (866) DOC-UNIX | | tim at ( Consultix-Inc, TeachMePerl, or TeachMeUnix ) dot Com | *-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-* | UPCOMING CLASSES; 9/18: UNIX/Linux Fundamentals 10/9: Basic Perl | | * Check out my new book: "Minimal Perl for UNIX/Linux People" * | | See MinimalPerl.com for details, free chapters, and ordering | *-------------------------------------------------------------------* From krahnj at telus.net Thu Sep 7 20:58:45 2006 From: krahnj at telus.net (John W. Krahn) Date: Thu, 07 Sep 2006 20:58:45 -0700 Subject: SPUG: Minimal Perl book released today! In-Reply-To: <20060908010752.GA22334@jumpy.consultix-inc.com> References: <20060908010752.GA22334@jumpy.consultix-inc.com> Message-ID: <4500EA75.9060909@telus.net> Tim Maher wrote: > SPUGsters, > > My book on Perl is finally available. In fact, it's /so/ available > that you can even get two of its twelve chapters for free from the > publisher's web site! A couple of errata for your new book: :-) > Table 3.5 Compact character-class shortcuts > Shortcut metacharacter Name Equivalent character class a > \w Word character [a-zA-Z0-9_] > \W Non-word character [^a-zA-Z0-9_] > \s Whitespace character [\040\t\r\n\cJ\cL] > \S Non-whitespace character [^\040\t\r\n\cJ\cL] > \d Digit character [0-9] > \D Non-digit character [^0-9] > a. The backslashed sequences in the (square-bracketed) character classes are described in table 3.1. While not an error the "\n" character is included twice, once by the "\n" representation and once by the "\cJ" representation, and the character "\cL" could also be represented as "\f". Also the \w character class could include more than just a-zA-Z0-9_ if the current locale supports it. > 8.1.1 Defining defined > To help you appreciate the value of defined, we?ll first illustrate a common problem > that it can solve. Consider these lines from some-script, which might appear at the > top of a script that requires arguments: > $ARGV > 0 or warn "$0: No arguments!\n" and exit 255; > $pattern=$ARGV[0]; $ARGV > 0 Should be: @ARGV > 0 John -- use Perl; program fulfillment From tim at consultix-inc.com Thu Sep 7 21:46:50 2006 From: tim at consultix-inc.com (Tim Maher) Date: Thu, 7 Sep 2006 21:46:50 -0700 Subject: SPUG: Minimal Perl book released today! In-Reply-To: <4500EA75.9060909@telus.net> References: <20060908010752.GA22334@jumpy.consultix-inc.com> <4500EA75.9060909@telus.net> Message-ID: <20060908044650.GA25095@jumpy.consultix-inc.com> On Thu, Sep 07, 2006 at 08:58:45PM -0700, John W. Krahn wrote: > Tim Maher wrote: > > SPUGsters, > > > > My book on Perl is finally available. In fact, it's /so/ available > > that you can even get two of its twelve chapters for free from the > > publisher's web site! > > A couple of errata for your new book: :-) Thanks! (How these mistakes got by 37 reviewers is beyond me!) *-------------------------------------------------------------------* | Tim Maher, PhD (206) 781-UNIX (866) DOC-PERL (866) DOC-UNIX | | tim at ( Consultix-Inc, TeachMePerl, or TeachMeUnix ) dot Com | *-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-* | UPCOMING CLASSES; 9/18: UNIX/Linux Fundamentals 10/9: Basic Perl | | * Check out my new book: "Minimal Perl for UNIX/Linux People" * | | See MinimalPerl.com for details, free chapters, and ordering | *-------------------------------------------------------------------* From cos at indeterminate.net Fri Sep 8 15:16:58 2006 From: cos at indeterminate.net (John Costello) Date: Fri, 8 Sep 2006 15:16:58 -0700 (PDT) Subject: SPUG: Minimal Perl book released today! In-Reply-To: <20060908010752.GA22334@jumpy.consultix-inc.com> Message-ID: On Thu, 7 Sep 2006, Tim Maher wrote: > SPUGsters, > > My book on Perl is finally available. In fact, it's /so/ available > that you can even get two of its twelve chapters for free from the > publisher's web site! Excellent! I was just recommending it to someone last week and was wondering when it would be released. Congrats! From MichaelRWolf at att.net Mon Sep 11 10:19:48 2006 From: MichaelRWolf at att.net (Michael R. Wolf) Date: Mon, 11 Sep 2006 10:19:48 -0700 Subject: SPUG: September meeting? Message-ID: It's not on seattleperl.org. Is it on the radar yet? -- Michael R. Wolf All mammals learn by playing! MichaelRWolf at att.net From jerry.gay at gmail.com Mon Sep 11 11:38:43 2006 From: jerry.gay at gmail.com (jerry gay) Date: Mon, 11 Sep 2006 11:38:43 -0700 Subject: SPUG: September meeting? In-Reply-To: <4505a955.7b6cb55d.41d9.787bSMTPIN_ADDED@mx.gmail.com> References: <1d9a3f400609111034q1766c788k9de937874b7d072c@mail.gmail.com> <4505a955.7b6cb55d.41d9.787bSMTPIN_ADDED@mx.gmail.com> Message-ID: <1d9a3f400609111138g68d9fc01y23f0c7edbe57dca9@mail.gmail.com> On 9/11/06, Michael R. Wolf wrote: > > why yes, it is. the meeting will be on the usual third tuesday, 18 > > september. > > I'm assuming a typo, and that you meant Tuesday, 19 September. If not, > please repost a correction. > > yes, tuesday, 19 sep, my mistake. > > chromatic (o'reilly technical editor and scary perl hacker) > > will be joining us. > > Way cool!!! > > > From jerry.gay at gmail.com Mon Sep 11 10:34:57 2006 From: jerry.gay at gmail.com (jerry gay) Date: Mon, 11 Sep 2006 10:34:57 -0700 Subject: SPUG: September meeting? In-Reply-To: <20060911172033.24ACB17811@x6.develooper.com> References: <20060911172033.24ACB17811@x6.develooper.com> Message-ID: <1d9a3f400609111034q1766c788k9de937874b7d072c@mail.gmail.com> On 9/11/06, Michael R. Wolf wrote: > It's not on seattleperl.org. Is it on the radar yet? > why yes, it is. the meeting will be on the usual third tuesday, 18 september. chromatic (o'reilly technical editor and scary perl hacker) will be joining us. i'm still working out the details with him, but expect them to be posted soon. you're right, the seattleperl.org website isn't up-to-date, but i do try to keep the wiki current (http://wiki.seattleperl.org/.) see you there! ~jerry From scratchcomputing at gmail.com Mon Sep 11 16:42:45 2006 From: scratchcomputing at gmail.com (Eric Wilhelm) Date: Mon, 11 Sep 2006 16:42:45 -0700 Subject: SPUG: September meeting? In-Reply-To: <1d9a3f400609111138g68d9fc01y23f0c7edbe57dca9@mail.gmail.com> References: <1d9a3f400609111034q1766c788k9de937874b7d072c@mail.gmail.com> <4505a955.7b6cb55d.41d9.787bSMTPIN_ADDED@mx.gmail.com> <1d9a3f400609111138g68d9fc01y23f0c7edbe57dca9@mail.gmail.com> Message-ID: <200609111642.45282.ewilhelm@cpan.org> # from jerry gay # on Monday 11 September 2006 11:38 am: >yes, tuesday, 19 sep, my mistake. > >> > chromatic (o'reilly technical editor and scary perl hacker) >> > will be joining us. And just in case waiting that long is too nerve-wracking, you can take a trip to Portland and get an early dose of Perl Mongers here. Hey, you might even catch a glimpse of chromatic in his native habitat (though I can't promise anything -- not having paid his standard "plaster my name on your promotional material" fee.) A Panel on Craftsmanship Sept 13th, 6:53pm, 1731 SE 10th Ave., Portland, OR http://pdx.pm.org/kwiki/ Okay, so it's more like "if you happen to be in town" :-) --Eric -- perl -e 'srand; print join(" ",sort({rand() < 0.5} qw(sometimes it is important to be consistent)));' --------------------------------------------------- http://scratchcomputing.com --------------------------------------------------- From cos at indeterminate.net Mon Sep 11 19:57:25 2006 From: cos at indeterminate.net (John Costello) Date: Mon, 11 Sep 2006 19:57:25 -0700 (PDT) Subject: SPUG: September meeting? In-Reply-To: <200609111642.45282.ewilhelm@cpan.org> Message-ID: On Mon, 11 Sep 2006, Eric Wilhelm wrote: > And just in case waiting that long is too nerve-wracking, you can take a > trip to Portland and get an early dose of Perl Mongers here. Hey, you > might even catch a glimpse of chromatic in his native habitat (though I > can't promise anything -- not having paid his standard "plaster my name > on your promotional material" fee.) > > A Panel on Craftsmanship > Sept 13th, 6:53pm, 1731 SE 10th Ave., Portland, OR > http://pdx.pm.org/kwiki/ > > Okay, so it's more like "if you happen to be in town" :-) I thought the address was familiar. The event is being held at Free Geek, . If you have finally decided to get rid of that PDP-11, why not donate it to Free Geek. (There's a branch in Olympia, too.) Donations are tax deductible, and they use the hardware to train people on computer hardware maintenance and Linux. All-in-all, a very nice organization. They will charge for recyling of certain hardware (monitors). The Lucky Lab Brewing Company is a fine place for beer near there, though you should like dogs (or at least not be afraid of them). If anyone wants tips on other places in the area, email me on list or off. I used to live a few blocks away, and I still know quite a bit about the neighborhood (food, caffiene, breakfast, lovely gardens for walks, etc.). John From cos at indeterminate.net Tue Sep 12 09:00:42 2006 From: cos at indeterminate.net (John Costello) Date: Tue, 12 Sep 2006 09:00:42 -0700 (PDT) Subject: SPUG: Old hardware (was Re: September meeting? In-Reply-To: Message-ID: On Mon, 11 Sep 2006, John Costello wrote: > I thought the address was familiar. The event is being held at Free Geek, > . If you have finally decided to get rid of > that PDP-11, why not donate it to Free Geek. (There's a branch in > Olympia, too.) Donations are tax deductible, and they use the hardware to If you are just looking to recycle old monitors or electronics and don't want to go south, Re-PC on S 4th (near the King Dome) accepts electronics. They charge for certain items (monitors, PCs) but not others (old boom boxes). Their computer museum is fun to meander through. I hadn't seen a Commodore PET in 20 years. John From andrew at sweger.net Wed Sep 13 12:45:35 2006 From: andrew at sweger.net (Andrew Sweger) Date: Wed, 13 Sep 2006 12:45:35 -0700 (PDT) Subject: SPUG: chromatic in print Message-ID: There are some O'Reilly books (including some written by chromatic, our guest next week) on their way to us. So, there's even more to look forward to next Tuesday. -- Andrew B. Sweger -- The great thing about multitasking is that several things can go wrong at once. From jerry.gay at gmail.com Wed Sep 13 22:39:02 2006 From: jerry.gay at gmail.com (jerry gay) Date: Wed, 13 Sep 2006 22:39:02 -0700 Subject: SPUG: Meeting Announcement -- chromatic -- 19 September 2006 Message-ID: <1d9a3f400609132239w7464e2b6h9941f77f2d7cf4f9@mail.gmail.com> September 2006 Seattle Perl Users Group (SPUG) Meeting ======================= ============================ Title: Perl Hacks You Might Not Know Speaker: chromatic Meeting Date: Tuesday, 19 September 2006 Meeting Time: 6:30 - 8:30 p.m. Location: Whitepages.com offices, downtown Seattle Cost: Admission is free and open to the public Info: http://seattleperl.org/ =================================================== Please join us Tuesday evening on 19 September 2006 at the regular monthly meeting of the Seattle Perl Users Group. Like a one-man Penn & Teller show, chromatic will reveal the magic behind some scary Perl hacks. Thank you to our hosts at Whitepages.com for giving us a great place to hold our meetings and presentations, to the SPUG-Workers list for making speaker arrangements, to all the SPUG members that show up at meetings or participate on the list to make the group worthwhile in the first place, and all the JAPHs out there for just being. See below for more information on... - Speaker Background - Presentation Description - Meeting Location Speaker Background ================== chromatic -------------------------------- chromatic is the technical editor of the O'Reilly Network, covering open source and free software. In his spare time, he writes books. In his other spare time, he writes software, including Perl 5, Perl 6, Parrot, and other projects that don't necessarily start with a P. He hopes to receive spare time as presents later in the year to do more writing and programming and eventually pick up normal human hobbies, such as sleeping and eating. Presentation Description ======================== Perl Hacks You Might Not Know ---------------------------------- Perl is a powerful language with many secrets. It's no wonder that we call the true masters of Perl gurus ? they have studied and discovered arcane knowledge and arcana. In this talk, Perl Hacks lead author chromatic will show off several hacks you probably didn't even know existed. Some are practical. Some are disgusting. Every one is worth learning for when you find a problem you just can't solve any other way. Even if you've heard of them before, he'll show how they work ? so you can create your own practical mayhem! Potential hacks include: * Source filtering without source filters * Using shared libraries without a compiler * Creating truly private methods * Reading and writing lexicals without permission * Controlling the runloop from pure Perl 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.271.9267 From jobs-noreply at seattleperl.org Thu Sep 14 16:32:23 2006 From: jobs-noreply at seattleperl.org (SPUG Jobs) Date: Thu, 14 Sep 2006 16:32:23 -0700 (PDT) Subject: SPUG: JOB: mid-level Perl downtown via recruiter Message-ID: Needed, mid-level Perl / Python developer for Tools Engineer position. Downtown location, Permanent placement. Pay in the $70's/yr. Additional requirements include Unix shell scripting, and C++. Very familiar with Unix / Linux operating systems. Qualified applicants please send resume's and questions to Travis at Travis.Winegardner at harveynashusa.com . Harvey Nash is a third party staffing agency, and this position is with one of our clients. Travis J Winegardner Sr IT Recruiter | Harvey Nash USA 2505 2nd Ave; Suite 705 Seattle, WA 98121 D: 1 (206) 956-9200 F: 1 (206) 956-0474 travis.winegardner at harveynashusa.com From MichaelRWolf at att.net Fri Sep 15 17:04:00 2006 From: MichaelRWolf at att.net (Michael R. Wolf) Date: Fri, 15 Sep 2006 17:04:00 -0700 Subject: SPUG: English-speak about Perl-speak "for" loops Message-ID: I've started seeing more code that uses 'for' for both kinds of loops. for(init; entry-condition; iteration) { block } for loop-variable (list) { block } I know it doesn't confuse the compiler to use 'for' or 'foreach' in either case, but it sure does make it harder to speak about. For that reason, I always used to write (and speak) "for" to refer to the C-style 'for' loop and "foreach" to refer to the other one. If you use "for" for both Perl-speak styles, how do you English-speak about it to avoid ambiguity? -- Michael R. Wolf All mammals learn by playing! MichaelRWolf at att.net From jack at foys.net Fri Sep 15 17:49:27 2006 From: jack at foys.net (Jack Foy) Date: Fri, 15 Sep 2006 17:49:27 -0700 Subject: SPUG: English-speak about Perl-speak "for" loops In-Reply-To: <20060916000434.72AFE17A03@x6.develooper.com> References: <20060916000434.72AFE17A03@x6.develooper.com> Message-ID: <20060916004927.GR21755@foys.net> Michael R. Wolf wrote: > for(init; entry-condition; iteration) { block } > for loop-variable (list) { block } ... > If you use "for" for both Perl-speak styles, how do you English-speak about > it to avoid ambiguity? Simple: don't use the first form. :-) I assert that using the C-style for-loop is un-Perlish. In most cases, if you're numerically indexing your arrays, you're missing a better way of expressing the code. -- Jack Foy From ingy at ttul.org Fri Sep 15 23:34:43 2006 From: ingy at ttul.org (Ingy dot Net) Date: Fri, 15 Sep 2006 23:34:43 -0700 Subject: SPUG: English-speak about Perl-speak "for" loops In-Reply-To: <20060916004927.GR21755@foys.net> References: <20060916000434.72AFE17A03@x6.develooper.com> <20060916004927.GR21755@foys.net> Message-ID: <20060916063443.GA7533@ttul.org> On 15/09/06 17:49 -0700, Jack Foy wrote: > Michael R. Wolf wrote: > > for(init; entry-condition; iteration) { block } > > for loop-variable (list) { block } > ... > > If you use "for" for both Perl-speak styles, how do you English-speak about > > it to avoid ambiguity? > > Simple: don't use the first form. :-) > > I assert that using the C-style for-loop is un-Perlish. In most cases, > if you're numerically indexing your arrays, you're missing a better way > of expressing the code. How would you better express: for (my $i = 0; $i < @array - 1; $i++) { $array->[$i + 1] += $array[$i]; } The C style loop has its place in Perl. Cheers, Ingy > -- > Jack Foy > _____________________________________________________________ > 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 jack at foys.net Sat Sep 16 01:24:51 2006 From: jack at foys.net (Jack Foy) Date: Sat, 16 Sep 2006 01:24:51 -0700 Subject: SPUG: English-speak about Perl-speak "for" loops In-Reply-To: <20060916063443.GA7533@ttul.org> References: <20060916000434.72AFE17A03@x6.develooper.com> <20060916004927.GR21755@foys.net> <20060916063443.GA7533@ttul.org> Message-ID: <20060916082451.GS21755@foys.net> Ingy dot Net wrote: > Jack Foy wrote: > > I assert that using the C-style for-loop is un-Perlish. In most cases, > > if you're numerically indexing your arrays, you're missing a better way > > of expressing the code. > > How would you better express: > > for (my $i = 0; $i < @array - 1; $i++) { > $array->[$i + 1] += $array[$i]; > } > > The C style loop has its place in Perl. Granted -- as do numerically indexed arrays! I'll clarify the assertion a little: for most code written by most people, foreach semantics provide a much more natural means of expression than do C-style loops on a numeric index. When we refactor code during reviews, this is one of the first points of style I notice; it consistently provides a high rate of return in clarity gained versus effort spent. It also frequently reveals that the entire operation further reduces cleanly to a map or grep statement, which a traditional for-loop can obscure. Thinking about Michael's original question: I might read the statement for my $element (@list) { as "for my dollar element in at list open block", while for (my $i = 0; $i < @list; ++$i) { might read "for open paren my dollar i gets zero, loop while dollar i less than at list, plus plus dollar i close paren open block". That's wordy and leaves some syntax implied, but I use the construct so seldom it hasn't been of benefit to optimize it. -- Jack Foy From jarich at perltraining.com.au Sun Sep 17 18:34:22 2006 From: jarich at perltraining.com.au (Jacinta Richardson) Date: Mon, 18 Sep 2006 11:34:22 +1000 Subject: SPUG: English-speak about Perl-speak "for" loops In-Reply-To: <20060916000441.3412F17A07@x6.develooper.com> References: <20060916000441.3412F17A07@x6.develooper.com> Message-ID: <450DF79E.5000502@perltraining.com.au> Michael R. Wolf wrote: > I've started seeing more code that uses 'for' for both kinds of loops. > > for(init; entry-condition; iteration) { block } > for loop-variable (list) { block } > > I know it doesn't confuse the compiler to use 'for' or 'foreach' in either > case, but it sure does make it harder to speak about. For that reason, I > always used to write (and speak) "for" to refer to the C-style 'for' loop > and "foreach" to refer to the other one. > > If you use "for" for both Perl-speak styles, how do you English-speak about > it to avoid ambiguity? I almost always use "foreach" instead of "for" when I could be lazy and leave off the four extra chars. However I speak it as: for my $element (@list) { for/foreach my element in @list do .... for (my $i = 0; $i < @list; ++$i) { for my i is zero, i is less than @list, pre-increment i; do .... I assume that the person I'm talking to knows enough syntax to guess the missing bits. All the best, J -- ("`-''-/").___..--''"`-._ | Jacinta Richardson | `6_ 6 ) `-. ( ).`-.__.`) | Perl Training Australia | (_Y_.)' ._ ) `._ `. ``-..-' | +61 3 9354 6001 | _..`--'_..-_/ /--'_.' ,' | contact at perltraining.com.au | (il),-'' (li),' ((!.-' | www.perltraining.com.au | From cos at indeterminate.net Mon Sep 18 09:38:10 2006 From: cos at indeterminate.net (John Costello) Date: Mon, 18 Sep 2006 09:38:10 -0700 (PDT) Subject: SPUG: English-speak about Perl-speak "for" loops In-Reply-To: <20060916063443.GA7533@ttul.org> Message-ID: On Fri, 15 Sep 2006, Ingy dot Net wrote: > How would you better express: > > for (my $i = 0; $i < @array - 1; $i++) { > $array->[$i + 1] += $array[$i]; > } use Acme::Lingua::Pirate::Perl; Perhaps not, but Tuesday's meeting falls on Talk Like a Pirate Day. Arr. From jerry.gay at gmail.com Mon Sep 18 09:51:59 2006 From: jerry.gay at gmail.com (jerry gay) Date: Mon, 18 Sep 2006 09:51:59 -0700 Subject: SPUG: English-speak about Perl-speak "for" loops In-Reply-To: <20060916000435.64617179D7@x6.develooper.com> References: <20060916000435.64617179D7@x6.develooper.com> Message-ID: <1d9a3f400609180951p36b5e2c7rf7e30c7191760e76@mail.gmail.com> On 9/15/06, Michael R. Wolf wrote: > I've started seeing more code that uses 'for' for both kinds of loops. > > for(init; entry-condition; iteration) { block } > for loop-variable (list) { block } > > I know it doesn't confuse the compiler to use 'for' or 'foreach' in either > case, but it sure does make it harder to speak about. For that reason, I > always used to write (and speak) "for" to refer to the C-style 'for' loop > and "foreach" to refer to the other one. > > If you use "for" for both Perl-speak styles, how do you English-speak about > it to avoid ambiguity? > firstly, i never write 'foreach' in perl code. it's not worth the four extra characters, as 'for' is enough to tell the compiler to do the right thing. in order to distinguish them when using english, i relate c-style 'for' to 'while', which is what perl relates it to internally anyway. perl-style 'for' is the same as map in void context, with syntax that's arguably easier on the eyes. looking forward to perl6, 'for' can only be used for perl-style 'for' loops. in order to express a c-style loop, you must use the 'loop' keyword. as perl-style looping is far more common in perl code than is c-style looping, and fewer characters are required to express the more common case, it is said that this syntax is properly huffmanized. i think perl6 gets this right. ~jerry From andrew at sweger.net Mon Sep 18 10:03:04 2006 From: andrew at sweger.net (Andrew Sweger) Date: Mon, 18 Sep 2006 10:03:04 -0700 (PDT) Subject: SPUG: English-speak about Perl-speak "for" loops In-Reply-To: <1d9a3f400609180951p36b5e2c7rf7e30c7191760e76@mail.gmail.com> Message-ID: On Mon, 18 Sep 2006, jerry gay wrote: > ... it is said that this syntax is properly huffmanized. ... I haven't heard this expression before. Is this refering to Huffman coding? That's a clever way to describe it. But I can't help thinking of all those inscruitable one-liners. I guess those would be improperly Huffmanized. -- Andrew B. Sweger -- The great thing about multitasking is that several things can go wrong at once. From benb at speakeasy.net Mon Sep 18 10:47:36 2006 From: benb at speakeasy.net (BenRifkah Bergsten-Buret) Date: Mon, 18 Sep 2006 10:47:36 -0700 Subject: SPUG: English-speak about Perl-speak "for" loops In-Reply-To: <20060916063443.GA7533@ttul.org> References: <20060916000434.72AFE17A03@x6.develooper.com> <20060916004927.GR21755@foys.net> <20060916063443.GA7533@ttul.org> Message-ID: <450EDBB8.3090906@speakeasy.net> Ingy dot Net wrote: > How would you better express: > for (my $i = 0; $i < @array - 1; $i++) { > $array->[$i + 1] += $array[$i]; > } > > The C style loop has its place in Perl. > This: for (my $i = 0; $i < @array - 1; $i++) becomes this: for my $i (0 .. $#array) regardless of whether you intended to use 'array' as the name of two different variables or had a typo. -- Ben From lmzaldivar at gmail.com Mon Sep 18 17:01:50 2006 From: lmzaldivar at gmail.com (luis medrano) Date: Mon, 18 Sep 2006 17:01:50 -0700 Subject: SPUG: XML::RSS error Message-ID: <50aeae6f0609181701s14e9da1dk55b85ff652245dbc@mail.gmail.com> I trying to run this code: my $rss=XML::RSS->new(); my $data=get($url); $rss->parse($data); but at the moment when I run this code I have this error: no element found at line 1, column 0, byte -1 at /usr/lib/perl5/vendor_perl/5.8.6/i386-linux-thread-multi/XML/Parser.pm line 187 $ vi /usr/lib/perl5/vendor_perl/5.8.6/i386-linux-thread-multi/XML/Parser.pm $ vi /usr/lib/perl5/vendor_perl/5.8.6/i386-linux-thread-multi/XML/Parser.pm -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mail.pm.org/pipermail/spug-list/attachments/20060918/ed9a2897/attachment.html From kahn at cpan.org Mon Sep 18 17:41:55 2006 From: kahn at cpan.org (Jeremy G. Kahn) Date: Mon, 18 Sep 2006 17:41:55 -0700 Subject: SPUG: XML::RSS error In-Reply-To: <50aeae6f0609181701s14e9da1dk55b85ff652245dbc@mail.gmail.com> References: <50aeae6f0609181701s14e9da1dk55b85ff652245dbc@mail.gmail.com> Message-ID: <450F3CD3.6090600@cpan.org> It appears that your $data is probably empty or not valid XML. put in some warnings after line 2 of your exmaple? or maybe post an entire test script? -jeremy luis medrano wrote: > I trying to run this code: > > my $rss=XML::RSS->new(); > my $data=get($url); > $rss->parse($data); > > but at the moment when I run this code I have this error: > > no element found at line 1, column 0, byte -1 at > /usr/lib/perl5/vendor_perl/5.8.6/i386-linux-thread-multi/XML/Parser.pm > line 187 > $ vi > /usr/lib/perl5/vendor_perl/5.8.6/i386-linux-thread-multi/XML/Parser.pm > $ vi > /usr/lib/perl5/vendor_perl/5.8.6/i386-linux-thread-multi/XML/Parser.pm > ------------------------------------------------------------------------ > > _____________________________________________________________ > 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 MichaelRWolf at att.net Tue Sep 19 06:06:01 2006 From: MichaelRWolf at att.net (Michael R. Wolf) Date: Tue, 19 Sep 2006 06:06:01 -0700 Subject: SPUG: pre-meeting dinner tonight? Message-ID: Anyone want to get together for a quick dinner before tonight's meeting? If so, RSVP here. Bon apetit! P.S. If such a thing happens, could you inform me on 206-789-7941. No more email for me today. -- Michael R. Wolf All mammals learn by playing! MichaelRWolf at att.net From kevin-spug at fink.com Tue Sep 19 08:41:03 2006 From: kevin-spug at fink.com (Kevin Fink) Date: Tue, 19 Sep 2006 08:41:03 -0700 Subject: SPUG: pre-meeting dinner tonight? In-Reply-To: <20060919130644.10E9C177FE@x6.develooper.com> References: <20060919130644.10E9C177FE@x6.develooper.com> Message-ID: <45100F8F.6050602@fink.com> I'm in. Most places right around our office are closed at that hour, but Rock Bottom is open and close, although not particularly quick. This is the first meeting I've been able to attend in quite some time, so I'm not sure if people have found a better place nearby? Kevin Michael R. Wolf wrote: > Anyone want to get together for a quick dinner before tonight's meeting? > > If so, RSVP here. > > Bon apetit! > > > P.S. If such a thing happens, could you inform me on 206-789-7941. No more > email for me today. > From andrew at sweger.net Tue Sep 19 09:42:46 2006 From: andrew at sweger.net (Andrew Sweger) Date: Tue, 19 Sep 2006 09:42:46 -0700 (PDT) Subject: SPUG: Avast, ye mateys! O'Reilly plunder! Message-ID: Ahoy, SPUGgers! [0] Captain O'Reilly has sent us (by way of one of his more fair looking ship hands with no less a mind) a treasure chest full of plunder, says I. Thar be doling out o' the loot at tonight's meeting of SPUGgery. A pair of Caribbean blue "Code matters" tee-shirts fit for an extra large mongrel, a quintet o' Perl Hacks[1], a leash of Perl Testing Developer's Notebooks[2], and one mighty tome o' Mastering Regular Expressions 3rd Edition[3] (like "Yar", "Avast!", and "Ahoy!"). So, I be seeing e'er one of ye that what wants a chance to take part of this generous plunder. And remember, use Acme::Lingua::Pirate::Perl; # [4] Keep yer Jolly Rogers flyin' and yer barrrrrrnacles swimmin'! [0] - http://www.talklikeapirate.com/ [1] - http://www.oreilly.com/catalog/perlhks/index.html [2] - http://www.oreilly.com/catalog/perltestingadn/index.html [3] - http://www.oreilly.com/catalog/regex3/index.html [4] - http://search.cpan.org/~emartin/Acme-Lingua-Pirate-Perl-0.12/lib/Acme/Lingua/Pirate/Perl.pm -- Andrew B. Sweger -- The great thing about multitasking is that several things can go wrong at once. From mjk at lucidoc.com Tue Sep 19 09:40:31 2006 From: mjk at lucidoc.com (Martin Knowles) Date: Tue, 19 Sep 2006 09:40:31 -0700 Subject: SPUG: pre-meeting dinner tonight? In-Reply-To: <45100F8F.6050602@fink.com> Message-ID: <001501c6dc0a$528ca310$e082a8c0@egeria> I'm in tentatively, depending on when/where it's being held and how nasty traffic from the greater Redmond area is today. -= Martin Knowles, Director of Development - Lucidoc Corporation -= mjk at lucidoc.com - http://www.lucidoc.com/ -----Original Message----- From: spug-list-bounces+mjk=lucidoc.com at pm.org [mailto:spug-list-bounces+mjk=lucidoc.com at pm.org] On Behalf Of Kevin Fink Sent: Tuesday, September 19, 2006 8:41 AM To: spug-list at pm.org Subject: Re: SPUG: pre-meeting dinner tonight? I'm in. Most places right around our office are closed at that hour, but Rock Bottom is open and close, although not particularly quick. This is the first meeting I've been able to attend in quite some time, so I'm not sure if people have found a better place nearby? Kevin Michael R. Wolf wrote: > Anyone want to get together for a quick dinner before tonight's meeting? > > If so, RSVP here. > > Bon apetit! > > > P.S. If such a thing happens, could you inform me on 206-789-7941. > No more email for me today. > _____________________________________________________________ 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 lmzaldivar at gmail.com Tue Sep 19 09:54:42 2006 From: lmzaldivar at gmail.com (luis medrano) Date: Tue, 19 Sep 2006 09:54:42 -0700 Subject: SPUG: XML::RSS error In-Reply-To: <450F3CD3.6090600@cpan.org> References: <50aeae6f0609181701s14e9da1dk55b85ff652245dbc@mail.gmail.com> <450F3CD3.6090600@cpan.org> Message-ID: <50aeae6f0609190954h5b0c322dl17c5476408858fa0@mail.gmail.com> Here is the funny thing. I ran the script this morning and I didn't have any errors of any kind. My question is why this error is showing yesterday and not today. Here is the script: #!/usr/bin/perl use strict; use LWP::Simple; use XML::RSS; my @feeds; #yahoo_rss is a file with rss url such as this: #http://news.search.yahoo.com/news/rss?p=mac&ei=UTF-8&fl=0&x=wrt my $file_list="yahoo_rss.txt"; open (FILE,$file_list) or die; my @list=; close(FILE); foreach my $line (@list){ chomp($line); my ($tmp,$yahoo)=split(/\t/,$line); push @feeds, $yahoo; } foreach my $url (@feeds){ my $rss=XML::RSS->new(); my $data=get($url); $rss->parse($data); my $channel=$rss->{channel}; my $image=$rss->{image}; foreach my $item(@{$rss->{items}}){ my ($tmp,$link)=split(/\*/,$$item{link}); $link=~s/\%3A/\:/g; print qq|

$$item{title}



$$item{description}

|; } } On 9/18/06, Jeremy G. Kahn wrote: > > It appears that your $data is probably empty or not valid XML. put in > some warnings after line 2 of your exmaple? > > or maybe post an entire test script? > > -jeremy > > luis medrano wrote: > > I trying to run this code: > > > > my $rss=XML::RSS->new(); > > my $data=get($url); > > $rss->parse($data); > > > > but at the moment when I run this code I have this error: > > > > no element found at line 1, column 0, byte -1 at > > /usr/lib/perl5/vendor_perl/5.8.6/i386-linux-thread-multi/XML/Parser.pm > > line 187 > > $ vi > > /usr/lib/perl5/vendor_perl/5.8.6/i386-linux-thread-multi/XML/Parser.pm > > $ vi > > /usr/lib/perl5/vendor_perl/5.8.6/i386-linux-thread-multi/XML/Parser.pm > > ------------------------------------------------------------------------ > > > > _____________________________________________________________ > > 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/20060919/7b8e2f3b/attachment.html From tcaine at cac.washington.edu Tue Sep 19 10:07:38 2006 From: tcaine at cac.washington.edu (tcaine at cac.washington.edu) Date: Tue, 19 Sep 2006 10:07:38 -0700 (PDT) Subject: SPUG: XML::RSS error In-Reply-To: <50aeae6f0609190954h5b0c322dl17c5476408858fa0@mail.gmail.com> References: <50aeae6f0609181701s14e9da1dk55b85ff652245dbc@mail.gmail.com> <450F3CD3.6090600@cpan.org> <50aeae6f0609190954h5b0c322dl17c5476408858fa0@mail.gmail.com> Message-ID: The HTTP GET request may have failed. The SYNOPSIS for LWP::Simple has an example of testing the return value of the get() call. my $content = get($url); die "Couldn't get it!" unless defined $content; On Tue, 19 Sep 2006, luis medrano wrote: > Here is the funny thing. I ran the script this morning and I didn't have any > errors of any kind. My question is why this error is showing yesterday and > not today. > > Here is the script: > > #!/usr/bin/perl > use strict; > use LWP::Simple; > use XML::RSS; > my @feeds; > #yahoo_rss is a file with rss url such as this: > #http://news.search.yahoo.com/news/rss?p=mac&ei=UTF-8&fl=0&x=wrt > my $file_list="yahoo_rss.txt"; > open (FILE,$file_list) or die; > my @list=; > close(FILE); > foreach my $line (@list){ > chomp($line); > my ($tmp,$yahoo)=split(/\t/,$line); > push @feeds, $yahoo; > } > > > > > foreach my $url (@feeds){ > my $rss=XML::RSS->new(); > my $data=get($url); > $rss->parse($data); > my $channel=$rss->{channel}; > my $image=$rss->{image}; > foreach my $item(@{$rss->{items}}){ > my ($tmp,$link)=split(/\*/,$$item{link}); > $link=~s/\%3A/\:/g; > print qq|

="$link">$$item{title}



$$item{description}

|; > } > > } > > > > On 9/18/06, Jeremy G. Kahn wrote: >> >> It appears that your $data is probably empty or not valid XML. put in >> some warnings after line 2 of your exmaple? >> >> or maybe post an entire test script? >> >> -jeremy >> >> luis medrano wrote: >> > I trying to run this code: >> > >> > my $rss=XML::RSS->new(); >> > my $data=get($url); >> > $rss->parse($data); >> > >> > but at the moment when I run this code I have this error: >> > >> > no element found at line 1, column 0, byte -1 at >> > /usr/lib/perl5/vendor_perl/5.8.6/i386-linux-thread-multi/XML/Parser.pm >> > line 187 >> > $ vi >> > /usr/lib/perl5/vendor_perl/5.8.6/i386-linux-thread-multi/XML/Parser.pm >> > $ vi >> > /usr/lib/perl5/vendor_perl/5.8.6/i386-linux-thread-multi/XML/Parser.pm >> > ------------------------------------------------------------------------ >> > >> > _____________________________________________________________ >> > 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 lmzaldivar at gmail.com Tue Sep 19 10:20:17 2006 From: lmzaldivar at gmail.com (luis medrano) Date: Tue, 19 Sep 2006 10:20:17 -0700 Subject: SPUG: BD::mysql::st execute failed: Message-ID: <50aeae6f0609191020v6d6bf71clc40e22bface0b466@mail.gmail.com> Hey List, I have a problem I'm trying to run this piece of code inserting values to a row in a mysql database where "post_content" is type longtext: my $sth1=$dbh->prepare("INSERT INTO wp_posts(post_author, post_date, post_date_gmt, p ost_content,post_title, post_status, comment_status, ping_status,post_name, post_modified, po st_modified_gmt,guid) VALUES('$post_author','$post_date','$post_date_gmt','@post_content','$post_title','$p ost_status','$comment_status','$ping_status','$post_name','$post_modified','$post_modified_gm t','$guid')") or die; # "Couldnt prepare statement: " . dbh->errstr; my $rv1 = $sth1->execute(); But I'm trying to insert text file to post_content and showing this error when I ran the script: BD::mysql::st execute failed: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 't know what a CHM file isNULL Just think of the Help program that comes up when ' at line 2 at posting.pl line 75. But if replace the text file for a string on @post_content I have no error running the script. Any ideas or suggestions of what I'm doing wrong? Thanks, Luis -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mail.pm.org/pipermail/spug-list/attachments/20060919/3148d2a5/attachment.html From ext-spug at jope.net Tue Sep 19 10:25:30 2006 From: ext-spug at jope.net (JP Montagnet) Date: Tue, 19 Sep 2006 10:25:30 -0700 (PDT) Subject: SPUG: pre-meeting dinner tonight? In-Reply-To: <45100F8F.6050602@fink.com> References: <20060919130644.10E9C177FE@x6.develooper.com> <45100F8F.6050602@fink.com> Message-ID: Whoa. The rarely-seen Man Behind the Curtain! Elephant & Castle, a half-block north on 5th, is another option. -jp On Tue, 19 Sep 2006, Kevin Fink wrote: > I'm in. Most places right around our office are closed at that hour, > but Rock Bottom is open and close, although not particularly quick. This > is the first meeting I've been able to attend in quite some time, so I'm > not sure if people have found a better place nearby? > > Kevin > > Michael R. Wolf wrote: >> Anyone want to get together for a quick dinner before tonight's meeting? >> >> If so, RSVP here. [...] From tcaine at cac.washington.edu Tue Sep 19 10:31:46 2006 From: tcaine at cac.washington.edu (tcaine at cac.washington.edu) Date: Tue, 19 Sep 2006 10:31:46 -0700 (PDT) Subject: SPUG: BD::mysql::st execute failed: In-Reply-To: <50aeae6f0609191020v6d6bf71clc40e22bface0b466@mail.gmail.com> References: <50aeae6f0609191020v6d6bf71clc40e22bface0b466@mail.gmail.com> Message-ID: One of your variables has a ' in it. Use placeholders and bind values. Try reading the perldoc for DBI, particularly the "Placeholders and Bind Values" section. On Tue, 19 Sep 2006, luis medrano wrote: > Hey List, > > I have a problem I'm trying to run this piece of code inserting values to a > row in a mysql database where "post_content" is type longtext: > > my $sth1=$dbh->prepare("INSERT INTO wp_posts(post_author, post_date, > post_date_gmt, p > ost_content,post_title, post_status, comment_status, ping_status,post_name, > post_modified, po > st_modified_gmt,guid) > > VALUES('$post_author','$post_date','$post_date_gmt','@post_content','$post_title','$p > ost_status','$comment_status','$ping_status','$post_name','$post_modified','$post_modified_gm > t','$guid')") or die; # "Couldnt prepare statement: " . dbh->errstr; > my $rv1 = $sth1->execute(); > > But I'm trying to insert text file to post_content and showing this error > when I ran the script: > > > BD::mysql::st execute failed: You have an error in your SQL syntax; check > the > manual that corresponds to your MySQL server version for the right syntax to > use near 't know what a CHM file isNULL Just think of the Help program that > comes up when ' at line 2 at posting.pl line 75. > > > But if replace the text file for a string on @post_content I have no error > running the script. Any ideas or suggestions of what I'm doing wrong? > > Thanks, > Luis > From pdarley at kinesis-cem.com Tue Sep 19 11:39:56 2006 From: pdarley at kinesis-cem.com (Peter Darley) Date: Tue, 19 Sep 2006 11:39:56 -0700 Subject: SPUG: BD::mysql::st execute failed: In-Reply-To: Message-ID: Hi, Alternately, if the mysql DBD has a quote function like the postgresql one, you can use it to make sure that the data can't change the sql statement. This can make it a lot simpler to debug queries because you can just print the query string and see the data in place instead of trying to match up the content of the bind values. For example I often have things like: $Query = "INSERT INTO HTML_Pages (Page_ID, Type, Entity, Name, Title, Content) VALUES (" . Quote($Args{PageID}) . ", " . Quote($Args{Type}) . ", " . Quote($Args{Entity}) . ", " . Quote($Args{Name}) . ", " . Quote($Args{Title}) . ", " . Quote($Args{Content}) . ")"; $Neo::DB::Shopper->do($Query) || die "Bad Query!\n\t$Query"; This is kinda tough to read because it's a bit long... Thanks, Peter Darley -----Original Message----- From: spug-list-bounces+pdarley=kinesis-cem.com at pm.org [mailto:spug-list-bounces+pdarley=kinesis-cem.com at pm.org]On Behalf Of tcaine at cac.washington.edu Sent: Tuesday, September 19, 2006 10:32 AM To: luis medrano Cc: spug-list at pm.org Subject: Re: SPUG: BD::mysql::st execute failed: One of your variables has a ' in it. Use placeholders and bind values. Try reading the perldoc for DBI, particularly the "Placeholders and Bind Values" section. On Tue, 19 Sep 2006, luis medrano wrote: > Hey List, > > I have a problem I'm trying to run this piece of code inserting values to a > row in a mysql database where "post_content" is type longtext: > > my $sth1=$dbh->prepare("INSERT INTO wp_posts(post_author, post_date, > post_date_gmt, p > ost_content,post_title, post_status, comment_status, ping_status,post_name, > post_modified, po > st_modified_gmt,guid) > > VALUES('$post_author','$post_date','$post_date_gmt','@post_content','$post_t itle','$p > ost_status','$comment_status','$ping_status','$post_name','$post_modified',' $post_modified_gm > t','$guid')") or die; # "Couldnt prepare statement: " . dbh->errstr; > my $rv1 = $sth1->execute(); > > But I'm trying to insert text file to post_content and showing this error > when I ran the script: > > > BD::mysql::st execute failed: You have an error in your SQL syntax; check > the > manual that corresponds to your MySQL server version for the right syntax to > use near 't know what a CHM file isNULL Just think of the Help program that > comes up when ' at line 2 at posting.pl line 75. > > > But if replace the text file for a string on @post_content I have no error > running the script. Any ideas or suggestions of what I'm doing wrong? > > Thanks, > Luis > _____________________________________________________________ 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 jerry.gay at gmail.com Tue Sep 19 11:53:24 2006 From: jerry.gay at gmail.com (jerry gay) Date: Tue, 19 Sep 2006 11:53:24 -0700 Subject: SPUG: pre-meeting dinner tonight? In-Reply-To: <20060919130653.28B6D17878@x6.develooper.com> References: <20060919130653.28B6D17878@x6.develooper.com> Message-ID: <1d9a3f400609191153t54aeae01seac81ee879a6b144@mail.gmail.com> On 9/19/06, Michael R. Wolf wrote: > Anyone want to get together for a quick dinner before tonight's meeting? > > If so, RSVP here. > chromatic and guest and i are in, but i'm too busy to coordinate. > P.S. If such a thing happens, could you inform me on 206-789-7941. No more > email for me today. > once a time (~5:30?) and place is selected, please somebody let everyone know, and be sure to call michael, who's without email today. see you soon! ~jerry From MichaelRWolf at att.net Tue Sep 19 14:06:37 2006 From: MichaelRWolf at att.net (Michael R. Wolf) Date: Tue, 19 Sep 2006 14:06:37 -0700 Subject: SPUG: pre-meeting dinner tonight? In-Reply-To: <20060919130624.4CC2217796@x6.develooper.com> Message-ID: [[I lied. I have email access.]] E&C sounds like a SPUGish grog spot. Elephant & Castle Pub & Restaurant, E&C, British, Eat, Drink, Enjoy! http://www.elephantcastle.com/content/locations/seattle First cap'n there, scout out a table for 8 "Perl Pirates" and run a flag up the mainstay. The rest of the crew will rally 'round when favorable winds allow landfall. Arrgh. Arg. ARGV.... -- Michael R. Wolf All mammals learn by playing! MichaelRWolf at att.net From cwilkes-spug at ladro.com Tue Sep 19 14:36:36 2006 From: cwilkes-spug at ladro.com (Chris Wilkes) Date: Tue, 19 Sep 2006 14:36:36 -0700 Subject: SPUG: pre-meeting dinner tonight? In-Reply-To: <20060919210718.6ED1317953@x6.develooper.com> References: <20060919130624.4CC2217796@x6.develooper.com> <20060919210718.6ED1317953@x6.develooper.com> Message-ID: <20060919213636.GA3623@www2.ladro.com> On Tue, Sep 19, 2006 at 02:06:37PM -0700, Michael R. Wolf wrote: > [[I lied. I have email access.]] > > E&C sounds like a SPUGish grog spot. > > Elephant & Castle Pub & Restaurant, E&C, British, Eat, Drink, Enjoy! > http://www.elephantcastle.com/content/locations/seattle > > First cap'n there, scout out a table for 8 "Perl Pirates" and run a flag up > the mainstay. The rest of the crew will rally 'round when favorable winds > allow landfall. As a pirate that just got the keelhaul today I'll be setting my sights on the Red Lion for some grubbery tonight. Chris From cos at indeterminate.net Tue Sep 19 14:55:51 2006 From: cos at indeterminate.net (John Costello) Date: Tue, 19 Sep 2006 14:55:51 -0700 (PDT) Subject: SPUG: pre-meeting dinner tonight? In-Reply-To: <20060919210710.544E01791F@x6.develooper.com> Message-ID: On Tue, 19 Sep 2006, Michael R. Wolf wrote: > [[I lied. I have email access.]] Yar, ye be a clever rogue. > E&C sounds like a SPUGish grog spot. > > Elephant & Castle Pub & Restaurant, E&C, British, Eat, Drink, Enjoy! > http://www.elephantcastle.com/content/locations/seattle > > First cap'n there, scout out a table for 8 "Perl Pirates" and run a flag up > the mainstay. The rest of the crew will rally 'round when favorable winds > allow landfall. Possibly 9. > Michael R. Wolf > All mammals learn by playing! > MichaelRWolf at att.net John "Curiosity killed the cat. Satisfaction brought him back." From cos at indeterminate.net Tue Sep 19 15:31:04 2006 From: cos at indeterminate.net (John Costello) Date: Tue, 19 Sep 2006 15:31:04 -0700 (PDT) Subject: SPUG: Meeting Announcement -- chromatic -- 19 September 2006 In-Reply-To: <1d9a3f400609132239w7464e2b6h9941f77f2d7cf4f9@mail.gmail.com> Message-ID: On Wed, 13 Sep 2006, jerry gay wrote: > We look forward to seeing you! > > [1] - http://www.whitepagesinc.com/locations/ I just noticed that the White Pages URL is dead. The Red Lion Hotel is nearby, and their website has MapQuest links for tracing your way to the hotel. Elephant & Castle (pre-event dinner) is in the Red Lion. Also, if you look at the map on the URL, the Rainier Square building is just right on the map (south, direction-wise). John From kevin-spug at fink.com Tue Sep 19 15:47:30 2006 From: kevin-spug at fink.com (Kevin Fink) Date: Tue, 19 Sep 2006 15:47:30 -0700 Subject: SPUG: Meeting Announcement -- chromatic -- 19 September 2006 In-Reply-To: References: Message-ID: <45107382.8010504@fink.com> Whoops - sorry about that. The URL should not have the trailing slash. Kevin John Costello wrote: > On Wed, 13 Sep 2006, jerry gay wrote: >> We look forward to seeing you! >> >> [1] - http://www.whitepagesinc.com/locations/ > > I just noticed that the White Pages URL is dead. > > The Red Lion Hotel is nearby, and their website has MapQuest links for > tracing your way to the hotel. > > > > Elephant & Castle (pre-event dinner) is in the Red Lion. Also, if you > look at the map on the URL, the Rainier Square building is just right on > the map (south, direction-wise). > > John > > _____________________________________________________________ > 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 lmzaldivar at gmail.com Tue Sep 19 17:08:16 2006 From: lmzaldivar at gmail.com (luis medrano) Date: Tue, 19 Sep 2006 17:08:16 -0700 Subject: SPUG: number inside of a number Message-ID: <50aeae6f0609191708h50048d43xf1f27d3cceedfadd@mail.gmail.com> List, I have a question, I need a variable where is holding a value (number) but I need to check and verify the last digit. For example : My $number=98765; if ($number last digit is 5) I really appreciate you help. Thanks, Luis -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mail.pm.org/pipermail/spug-list/attachments/20060919/35492ec7/attachment.html From kevin-spug at fink.com Tue Sep 19 17:10:55 2006 From: kevin-spug at fink.com (Kevin Fink) Date: Tue, 19 Sep 2006 17:10:55 -0700 Subject: SPUG: number inside of a number In-Reply-To: <50aeae6f0609191708h50048d43xf1f27d3cceedfadd@mail.gmail.com> References: <50aeae6f0609191708h50048d43xf1f27d3cceedfadd@mail.gmail.com> Message-ID: <4510870F.9000005@fink.com> if(substr($number,-1,1) == 5) luis medrano wrote: > List, > > I have a question, I need a variable where is holding a value (number) > but I need to check and verify the last digit. For example : > My $number=98765; > > if ($number last digit is 5) > > I really appreciate you help. > > Thanks, > Luis > > > ------------------------------------------------------------------------ > > _____________________________________________________________ > 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 Tue Sep 19 17:13:51 2006 From: cxreg at pobox.com (Dave O) Date: Tue, 19 Sep 2006 19:13:51 -0500 (CDT) Subject: SPUG: number inside of a number In-Reply-To: <4510870F.9000005@fink.com> References: <50aeae6f0609191708h50048d43xf1f27d3cceedfadd@mail.gmail.com> <4510870F.9000005@fink.com> Message-ID: Or, avoid the number-to-string-to-number conversion: if($number % 10 == 5) On Tue, 19 Sep 2006, Kevin Fink wrote: > if(substr($number,-1,1) == 5) > > > luis medrano wrote: > > List, > > > > I have a question, I need a variable where is holding a value (number) > > but I need to check and verify the last digit. For example : > > My $number=98765; > > > > if ($number last digit is 5) > > > > I really appreciate you help. > > > > Thanks, > > Luis > > > > > > ------------------------------------------------------------------------ > > > > _____________________________________________________________ > > 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/ > > > From charles.e.derykus at boeing.com Tue Sep 19 18:28:00 2006 From: charles.e.derykus at boeing.com (DeRykus, Charles E) Date: Tue, 19 Sep 2006 18:28:00 -0700 Subject: SPUG: number inside of a number In-Reply-To: Message-ID: Perhaps $number won't always be an integer though... -- Charles DeRykus -----Original Message----- From: Dave O [mailto:cxreg at pobox.com] Sent: Tuesday, September 19, 2006 5:14 PM To: Kevin Fink Cc: luis medrano; spug-list at pm.org Subject: Re: SPUG: number inside of a number Or, avoid the number-to-string-to-number conversion: if($number % 10 == 5) On Tue, 19 Sep 2006, Kevin Fink wrote: > if(substr($number,-1,1) == 5) > > > luis medrano wrote: > > List, > > > > I have a question, I need a variable where is holding a value > > (number) but I need to check and verify the last digit. For example : > > My $number=98765; > > > > if ($number last digit is 5) > > > > I really appreciate you help. > > > > Thanks, > > Luis > > > > > > -------------------------------------------------------------------- > > ---- > > > > _____________________________________________________________ > > 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/ > > > _____________________________________________________________ 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 jerry.gay at gmail.com Tue Sep 19 21:36:59 2006 From: jerry.gay at gmail.com (jerry gay) Date: Tue, 19 Sep 2006 21:36:59 -0700 Subject: SPUG: number inside of a number In-Reply-To: <50aeae6f0609191708h50048d43xf1f27d3cceedfadd@mail.gmail.com> References: <50aeae6f0609191708h50048d43xf1f27d3cceedfadd@mail.gmail.com> Message-ID: <1d9a3f400609192136h1620c46ek6b0ece3f1a59f1b3@mail.gmail.com> On 9/19/06, luis medrano wrote: > List, > > I have a question, I need a variable where is holding a value (number) but I > need to check and verify the last digit. For example : > My $number=98765; > > if ($number last digit is 5) > > I really appreciate you help. > if( '5' eq chop $number ) { ... } From jerry.gay at gmail.com Tue Sep 19 21:47:47 2006 From: jerry.gay at gmail.com (jerry gay) Date: Tue, 19 Sep 2006 21:47:47 -0700 Subject: SPUG: number inside of a number In-Reply-To: <1d9a3f400609192136h1620c46ek6b0ece3f1a59f1b3@mail.gmail.com> References: <50aeae6f0609191708h50048d43xf1f27d3cceedfadd@mail.gmail.com> <1d9a3f400609192136h1620c46ek6b0ece3f1a59f1b3@mail.gmail.com> Message-ID: <1d9a3f400609192147r16ff9cb3l248ed548e0308f8e@mail.gmail.com> On 9/19/06, jerry gay wrote: > if( '5' eq chop $number ) { ... } > sorry, i hit 'send' too soon. this hack deserves explanation. as it compares strings, it doesn't suffer from the "what if it's not a number" problem, but *WARNING* it is destructive. 'chop' *removes* the last character from $number and returns it, which is probably not what you expect. so, if( '5' eq substr $number, -1 ) { ... } # using string comparison or if( 5 == $number % 10 ) { ... } # using numeric comparison both of which were previously mentioned, are better ways to do it. the % hack is neat, but i think i'd stick with substr, which will work properly if $number doesn't contain a number. ~jerry From dblanchard at gmail.com Wed Sep 20 12:41:05 2006 From: dblanchard at gmail.com (Duane Blanchard) Date: Wed, 20 Sep 2006 12:41:05 -0700 Subject: SPUG: Command for refreshing the active Emacs buffer? Message-ID: Hi, Not exclusive to perl, but is there a command to refresh the active Emacs buffer short of retouching the file and confirming that I want to reread from the file? Thx, D -- Duane Blanchard 206.280.1263 There are 10 kinds of people in the world; those who know binary and those who don't. From jazzdev at gmail.com Wed Sep 20 12:59:37 2006 From: jazzdev at gmail.com (JD Brennan) Date: Wed, 20 Sep 2006 12:59:37 -0700 Subject: SPUG: Command for refreshing the active Emacs buffer? In-Reply-To: References: Message-ID: META-x revert-buffer On 9/20/06, Duane Blanchard wrote: > > Hi, > > Not exclusive to perl, but is there a command to refresh the active > Emacs buffer short of retouching the file and confirming that I want > to reread from the file? > > Thx, > > D > > -- > Duane Blanchard > 206.280.1263 > > There are 10 kinds of people in the world; > those who know binary and those who don't. > _____________________________________________________________ > 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/20060920/dffeadb7/attachment.html From Eric.D.Peterson at alltel.com Wed Sep 20 13:39:29 2006 From: Eric.D.Peterson at alltel.com (Eric.D.Peterson at alltel.com) Date: Wed, 20 Sep 2006 15:39:29 -0500 Subject: SPUG: meetings Message-ID: <8476CE21F2E6E543851495D6AB09F2A401F3AC2C@scarlitnt642.alltel.com> Greetings It seems that I am unable to consistently make it to the Tuesday monthly meetings. things keep popping up for me on that night. Any thought to a different night? Monday or Wednesday would be slightly better then me. Unless my boss sends me to Little Rock for the week. :) (again) How was this last meeting? Did chromatic use a presentation that could be made available to those of us unable to attend? Thanks Eric ****************************************************************************************** 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 kahn at cpan.org Wed Sep 20 14:45:41 2006 From: kahn at cpan.org (Jeremy G. Kahn) Date: Wed, 20 Sep 2006 14:45:41 -0700 Subject: SPUG: Command for refreshing the active Emacs buffer? In-Reply-To: References: Message-ID: <4511B685.7050504@cpan.org> This is such a common issue for me that I have bound a function key for it: > grep revert-buffer ~/.emacs (global-set-key [f9] 'revert-buffer) --jeremy JD Brennan wrote: > META-x revert-buffer > > On 9/20/06, *Duane Blanchard* > wrote: > > Hi, > > Not exclusive to perl, but is there a command to refresh the active > Emacs buffer short of retouching the file and confirming that I want > to reread from the file? > > Thx, > > D > > -- > Duane Blanchard > 206.280.1263 > > There are 10 kinds of people in the world; > those who know binary and those who don't. > _____________________________________________________________ > 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/ From mjk at lucidoc.com Wed Sep 20 16:13:56 2006 From: mjk at lucidoc.com (Martin Knowles) Date: Wed, 20 Sep 2006 16:13:56 -0700 Subject: SPUG: JOB: Perl Web Applications Developer Message-ID: <001201c6dd0a$7254cf50$e082a8c0@egeria> We're looking for a Perl developer to maintain and extend our core Perl-based web-based compliance documentation management system and related technologies. You will: * Do lots of interesting and, hopefully, fun Perl coding! * Develop and maintain software in response to customer and market needs * Ensure high product quality through internal testing * Perform maintenance and enhancements to existing systems You need: * Proficiency with object-oriented Perl a must; familiarity with object-oriented (e.g. C++, Java) development and/or with object-functional languages (Lisp/CLOS, Scheme) and development techniques an asset * Practical knowledge of Oracle, SQL Server, and/or other database systems * Understanding and experience with web development languages and technologies including JavaScript, DHTML, XML, and CSS * Comfort with agile development methodologies (e.g. Scrum, Extreme Programming, etc.) * Familiarity with the OpenOffice backend interface would be useful * Experience with and understanding of AJAX technologies and Web Services in general an asset About the position: This is a permanent (W-2) position. We're an 8-person company located in Redmond, and have been developing and deploying the Lucidoc system for 6 years. You'd be working in a small team with a mostly mature code framework running on object-oriented Perl and Apache, with interface code running in Perl-backed XML and JavaScript. About us: We are a privately held corporation, founded in 2000. Our ground-breaking technology offers a proven solution that enables an organization's geographically dispersed users to instantly access centralized knowledge from a living database that includes complex, changing information. Historically, the complexity of changing, updating and auditing operational and process-based information made it virtually impossible to guarantee data integrity and quality standards. Because tools weren't available to solve this problem securely and efficiently, new software was pioneered in partnership with NASA's Jet Propulsion Laboratory. The result is the first living repository for thousands of documents, contracts and procedures. A living repository enables an organization to manage the complete lifecycle of information. Companies dealing with government regulation, shared quality standards and constant process changes are demanding advanced information management capabilities to ensure that their information is accurate and auditable in order to mitigate regulatory and compliance exposure and keep staff informed. Feel free to contact me directly at mjk at lucidoc.com. Thanks! -= Martin Knowles, Director of Development - Lucidoc Corporation -= mjk at lucidoc.com - http://www.lucidoc.com/ From jarich at perltraining.com.au Wed Sep 20 19:22:10 2006 From: jarich at perltraining.com.au (Jacinta Richardson) Date: Thu, 21 Sep 2006 12:22:10 +1000 Subject: SPUG: English-speak about Perl-speak "for" loops In-Reply-To: <450EDBB8.3090906@speakeasy.net> References: <20060916000434.72AFE17A03@x6.develooper.com> <20060916004927.GR21755@foys.net> <20060916063443.GA7533@ttul.org> <450EDBB8.3090906@speakeasy.net> Message-ID: <4511F752.4080606@perltraining.com.au> BenRifkah Bergsten-Buret wrote: > This: > for (my $i = 0; $i < @array - 1; $i++) > > becomes this: > for my $i (0 .. $#array) > > regardless of whether you intended to use 'array' as the name of two > different variables or had a typo. Actually, I think you'll find that the first example up there is the same as : for my $i (0 .. ($#array - 1) ) because you've used < *and* @array-1. Had you written: for (my $i = 0; $i <= @array - 1; $i++) or for (my $i = 0; $i < @array; $i++ ) then they would have been equivalent to your second example. All the best, Jacinta From m3047 at inwa.net Wed Sep 20 21:59:49 2006 From: m3047 at inwa.net (Fred Morris) Date: Wed, 20 Sep 2006 21:59:49 -0700 Subject: SPUG: overdone Re: JOB: Perl Web Applications Developer In-Reply-To: <001201c6dd0a$7254cf50$e082a8c0@egeria> References: <001201c6dd0a$7254cf50$e082a8c0@egeria> Message-ID: <200609202159.49943.m3047@inwa.net> Hey I worked for a company named Blueridge, now Mindwrap. I have no continuing business relationship with them (altho' I know their sekret namez and can talk to them). I am not going to belabour the fun places I visited while working for Blueridge (now Mindwrap), but we had a TCP based client-server document management (with redacts)/workflow system back in '95-'96. In fact I still have a crufty but people will not let it die page about workflow management from those times here: http://www.inwa.net/~m3047/wf-selection.html I'm happy for you I guess.. but something is missing in this charming narrative. I have some guesses about what's missing. Happy to talk about it, but maybe not on the SPUG list. Some kind of political forum might be more appropriate... or a beer in a quiet location. On Wednesday 20 September 2006 16:13, Martin Knowles wrote: > [...] > Our ground-breaking > technology offers a proven solution that enables an organization's > geographically dispersed users to instantly access centralized knowledge > from a living database that includes complex, changing information. > Historically, the complexity of changing, updating and auditing operational > and process-based information made it virtually impossible to guarantee > data integrity and quality standards. Because tools weren't available to > solve this problem securely and efficiently, new software was pioneered in > partnership with NASA's Jet Propulsion Laboratory. The result is the first > living repository for thousands of documents, contracts and procedures. A > living repository enables an organization to manage the complete lifecycle > of information. Companies dealing with government regulation, shared > quality standards and constant process changes are demanding advanced > information management capabilities to ensure that their information is > accurate and auditable in order to mitigate regulatory and compliance > exposure and keep staff informed. -- Fred Morris zabba-dabba-doo at this.is.not.the.right.address 206.297.6344 From james at banshee.com Thu Sep 21 08:07:39 2006 From: james at banshee.com (James Moore) Date: Thu, 21 Sep 2006 08:07:39 -0700 Subject: SPUG: Command for refreshing the active Emacs buffer? In-Reply-To: <4511B685.7050504@cpan.org> Message-ID: <00cc01c6dd8f$adf87180$6501a8c0@BansheeSoftware.local> Emacs will hit the button for you if you ask: M-x auto-revert-buffer - James Moore From MichaelRWolf at att.net Thu Sep 21 13:35:14 2006 From: MichaelRWolf at att.net (Michael R. Wolf) Date: Thu, 21 Sep 2006 13:35:14 -0700 Subject: SPUG: number Message-ID: Of course, regular expressions could help.. if ( $number =~ /5$/ ) { } I forget that there are other "core" utilities (Damian calls them "non-builtin built-ins" -- Scalar::Util, List::Util, List::MoreUtils). If you had to do work to figure out that it is a number, you could try this (untested) code. use Scalar::Util; $is_numish = looks_like_number($string); if ($is_numish && $string =~ /5$/) { body.... } -- Michael R. Wolf All mammals learn by playing! MichaelRWolf at att.net ________________________________________ From: spug-list-bounces+michaelrwolf=att.net at pm.org [mailto:spug-list-bounces+michaelrwolf=att.net at pm.org] On Behalf Of luis medrano Sent: Tuesday, September 19, 2006 5:08 PM To: spug-list at pm.org Subject: SPUG: number inside of a number List, I have a question, I need a variable where is holding a value (number) but I need to check and verify the last digit. For example : My $number=98765; if ($number last digit is 5) I really appreciate you help. Thanks, Luis From jarich at perltraining.com.au Sat Sep 23 18:44:36 2006 From: jarich at perltraining.com.au (Jacinta Richardson) Date: Sun, 24 Sep 2006 11:44:36 +1000 Subject: SPUG: BD::mysql::st execute failed: In-Reply-To: References: Message-ID: <4515E304.8060105@perltraining.com.au> Peter Darley wrote: > $Query = "INSERT INTO HTML_Pages (Page_ID, Type, Entity, Name, Title, > Content) VALUES (" . Quote($Args{PageID}) . ", " . Quote($Args{Type}) . ", " > . Quote($Args{Entity}) . ", " . Quote($Args{Name}) . ", " . > Quote($Args{Title}) . ", " . Quote($Args{Content}) . ")"; > > $Neo::DB::Shopper->do($Query) || die "Bad Query!\n\t$Query"; It's still a better solution to use placeholders: my @values = ($post_author, $post_date, $post_date_gmt, "@post_content", $post_title, $post_status, $comment_status, $ping_status, $post_name, $post_modified, $post_modified_gmt, $guid); my $sth1 = $dbh->prepare("INSERT INTO wp_posts (post_author, post_date, post_date_gmt, post_content, post_title, post_status, comment_status, ping_status, post_name, post_modified, post_modified_gmt, guid) VALUES(?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?)") or die $dbh->errstr; my $rv1 = $sth->execute(@values); As it says in the documentation, using place holders allows the database engine to be more efficient as well as ensuring that your values are properly quoted for whichever database engine you are using (and if your underlying database engine changes, then that's handled too! You may also find it useful to look into SQL::Abstract as it makes these large inserts and updates much easier. Of course there's always Class::DBI/DBIx::Class if you want to take it a step further than that too. my %fieldvars = ( post_author => $post_author, post_date => $post_date, ... guid => $guid, ); use SQL::Abstract; my $sql = SQL::Abstract->new; my($stmt, @bind) = $sql->insert("wp_posts", \%fieldvals); my $sth = $dbh->prepare($stmt); $sth->execute(@bind); All the 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 jarich at perltraining.com.au Sun Sep 24 00:40:42 2006 From: jarich at perltraining.com.au (Jacinta Richardson) Date: Sun, 24 Sep 2006 17:40:42 +1000 Subject: SPUG: Intro to DBI, SQL::Abstract, Class::DBI and other coolness In-Reply-To: <4515E304.8060105@perltraining.com.au> References: <4515E304.8060105@perltraining.com.au> Message-ID: <4516367A.9060705@perltraining.com.au> I thought I should also point out that if you want a good place to start with respect to learning the above modules Perl Training Australia's full course notes are available online: http://perltraining.com.au/notes.html Feedback is always appreciated. All the best, J -- ("`-''-/").___..--''"`-._ | Jacinta Richardson | `6_ 6 ) `-. ( ).`-.__.`) | Perl Training Australia | (_Y_.)' ._ ) `._ `. ``-..-' | +61 3 9354 6001 | _..`--'_..-_/ /--'_.' ,' | contact at perltraining.com.au | (il),-'' (li),' ((!.-' | www.perltraining.com.au | From lmzaldivar at gmail.com Tue Sep 26 14:52:48 2006 From: lmzaldivar at gmail.com (luis medrano) Date: Tue, 26 Sep 2006 14:52:48 -0700 Subject: SPUG: XML::RSS help Message-ID: <50aeae6f0609261452ka2ad3e1xc3cf2e941c1959d4@mail.gmail.com> I have this script: foreach my $url (@list_of_rss_url){ my $rss=XML::RSS->new(); my $data=get($url)or die "Couldn't get it!";# unless defined $data; $rss->parse($data); foreach my $item (@{$rss->{items}}){ my $link=$$item{link}; my $title=$$item{title}; print "$link, $title \n"; } } but my problem is I don't want the script to die if the rss is not valid or not available when I call it. Any of you knows how can I make this work? Thanks, Luis -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mail.pm.org/pipermail/spug-list/attachments/20060926/7ffd5cbf/attachment.html From jerry.gay at gmail.com Tue Sep 26 15:03:12 2006 From: jerry.gay at gmail.com (jerry gay) Date: Tue, 26 Sep 2006 15:03:12 -0700 Subject: SPUG: XML::RSS help In-Reply-To: <50aeae6f0609261452ka2ad3e1xc3cf2e941c1959d4@mail.gmail.com> References: <50aeae6f0609261452ka2ad3e1xc3cf2e941c1959d4@mail.gmail.com> Message-ID: <1d9a3f400609261503k43ae4805ic684a607edfe6fb5@mail.gmail.com> On 9/26/06, luis medrano wrote: > I have this script: > > foreach my $url (@list_of_rss_url){ > > my $rss=XML::RSS->new(); > my $data=get($url)or die "Couldn't get it!";# unless defined $data; > $rss->parse($data); > foreach my $item (@{$rss->{items}}){ > my $link=$$item{link}; > my $title=$$item{title}; > print "$link, $title \n"; > } > } > > but my problem is I don't want the script to die if the rss is not valid or > not available when I call it. > so, don't C! ... my $data= get($url); unless($data) { warn qq{warning: couldn't get "$url"}; next; } ... ~jerry From scratchcomputing at gmail.com Tue Sep 26 15:09:28 2006 From: scratchcomputing at gmail.com (Eric Wilhelm) Date: Tue, 26 Sep 2006 15:09:28 -0700 Subject: SPUG: XML::RSS help In-Reply-To: <50aeae6f0609261452ka2ad3e1xc3cf2e941c1959d4@mail.gmail.com> References: <50aeae6f0609261452ka2ad3e1xc3cf2e941c1959d4@mail.gmail.com> Message-ID: <200609261509.28877.ewilhelm@cpan.org> # from luis medrano # on Tuesday 26 September 2006 02:52 pm: >I don't want the script to die if the rss is not valid or >not available when I call it. As Jerry said, don't die. Also, you may want to look at `perldoc -f eval`. >$rss->parse($data); eval { $rss->parse($data) }; if($@) { warn "something wrong with parse: $@"; # now try again or recover and/or exit gracefully } --Eric -- Consumers want choice, consumers want openness. --Rob Glaser --------------------------------------------------- http://scratchcomputing.com --------------------------------------------------- From sbaylis at gmail.com Tue Sep 26 15:09:45 2006 From: sbaylis at gmail.com (Steve Baylis) Date: Tue, 26 Sep 2006 15:09:45 -0700 Subject: SPUG: XML::RSS help In-Reply-To: <1d9a3f400609261503k43ae4805ic684a607edfe6fb5@mail.gmail.com> References: <50aeae6f0609261452ka2ad3e1xc3cf2e941c1959d4@mail.gmail.com> <1d9a3f400609261503k43ae4805ic684a607edfe6fb5@mail.gmail.com> Message-ID: I've never used XML::RSS but it's possible that it could die if you try to parse bad XML. If it does, you may want to also do: eval { $rss->parse($data); }; if ( $@ ) { warn "Could not parse data\n"; } -Steve On 9/26/06, jerry gay wrote: > > On 9/26/06, luis medrano wrote: > > I have this script: > > > > foreach my $url (@list_of_rss_url){ > > > > my $rss=XML::RSS->new(); > > my $data=get($url)or die "Couldn't get it!";# unless defined > $data; > > $rss->parse($data); > > foreach my $item (@{$rss->{items}}){ > > my $link=$$item{link}; > > my $title=$$item{title}; > > print "$link, $title \n"; > > } > > } > > > > but my problem is I don't want the script to die if the rss is not valid > or > > not available when I call it. > > > so, don't C! > > ... > my $data= get($url); > unless($data) { > warn qq{warning: couldn't get "$url"}; > next; > } > ... > > ~jerry > _____________________________________________________________ > 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/20060926/3c51a2aa/attachment.html From pdarley at kinesis-cem.com Wed Sep 27 08:20:39 2006 From: pdarley at kinesis-cem.com (Peter Darley) Date: Wed, 27 Sep 2006 08:20:39 -0700 Subject: SPUG: BD::mysql::st execute failed: In-Reply-To: <4515E304.8060105@perltraining.com.au> Message-ID: Jacinta, I don't agree. Anything that hides the actual SQL statement is bad bad bad. If there wasn't an alternative it would be worth putting up with the place holders, but since you can get the same protection without hiding the exact query, I don't think it's a very good practice. Things like SQL::Abstract make me cringe. :) Thanks, Peter -----Original Message----- From: spug-list-bounces+pdarley=kinesis-cem.com at pm.org [mailto:spug-list-bounces+pdarley=kinesis-cem.com at pm.org]On Behalf Of Jacinta Richardson Sent: Saturday, September 23, 2006 6:45 PM To: spug-list at pm.org Cc: luis medrano Subject: Re: SPUG: BD::mysql::st execute failed: Peter Darley wrote: > $Query = "INSERT INTO HTML_Pages (Page_ID, Type, Entity, Name, Title, > Content) VALUES (" . Quote($Args{PageID}) . ", " . Quote($Args{Type}) . ", " > . Quote($Args{Entity}) . ", " . Quote($Args{Name}) . ", " . > Quote($Args{Title}) . ", " . Quote($Args{Content}) . ")"; > > $Neo::DB::Shopper->do($Query) || die "Bad Query!\n\t$Query"; It's still a better solution to use placeholders: my @values = ($post_author, $post_date, $post_date_gmt, "@post_content", $post_title, $post_status, $comment_status, $ping_status, $post_name, $post_modified, $post_modified_gmt, $guid); my $sth1 = $dbh->prepare("INSERT INTO wp_posts (post_author, post_date, post_date_gmt, post_content, post_title, post_status, comment_status, ping_status, post_name, post_modified, post_modified_gmt, guid) VALUES(?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?)") or die $dbh->errstr; my $rv1 = $sth->execute(@values); As it says in the documentation, using place holders allows the database engine to be more efficient as well as ensuring that your values are properly quoted for whichever database engine you are using (and if your underlying database engine changes, then that's handled too! You may also find it useful to look into SQL::Abstract as it makes these large inserts and updates much easier. Of course there's always Class::DBI/DBIx::Class if you want to take it a step further than that too. my %fieldvars = ( post_author => $post_author, post_date => $post_date, ... guid => $guid, ); use SQL::Abstract; my $sql = SQL::Abstract->new; my($stmt, @bind) = $sql->insert("wp_posts", \%fieldvals); my $sth = $dbh->prepare($stmt); $sth->execute(@bind); All the 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 | _____________________________________________________________ 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 AEH at akc.org Wed Sep 27 08:30:57 2006 From: AEH at akc.org (Adrian Hands) Date: Wed, 27 Sep 2006 11:30:57 -0400 Subject: SPUG: BD::mysql::st execute failed: References: Message-ID: <862E491E88FFFE44846C445B4881DD7C737767@PUG.ad.akc.org> Generally speaking, If you use placeholders, the driver will use db bind variables and the db will be able to cache the statement and avoid reparsing on each execution. If you don't use placeholders, particularly in a loop, you'll pollute the db's statement cache. On the other hand, the statement analyzer will determine the execution plan BEFORE the vars are bound, so it won't have the benefit of knowing the value and will assume the worst. This becomes an issue with statements like: where foo_col LIKE ? (if the bind-var is 'foo%', for example, an index on foo_col will likely be very useful, but if the bind-var is '%foo', for example, the index will be useless) YMMV depending on the db, db version and driver. -----Original Message----- From: spug-list-bounces+aeh=akc.org at pm.org on behalf of Peter Darley Sent: Wed 9/27/2006 11:20 AM To: Jacinta Richardson; spug-list at pm.org Cc: luis medrano Subject: Re: SPUG: BD::mysql::st execute failed: Jacinta, I don't agree. Anything that hides the actual SQL statement is bad bad bad. If there wasn't an alternative it would be worth putting up with the place holders, but since you can get the same protection without hiding the exact query, I don't think it's a very good practice. Things like SQL::Abstract make me cringe. :) Thanks, Peter -----Original Message----- From: spug-list-bounces+pdarley=kinesis-cem.com at pm.org [mailto:spug-list-bounces+pdarley=kinesis-cem.com at pm.org]On Behalf Of Jacinta Richardson Sent: Saturday, September 23, 2006 6:45 PM To: spug-list at pm.org Cc: luis medrano Subject: Re: SPUG: BD::mysql::st execute failed: Peter Darley wrote: > $Query = "INSERT INTO HTML_Pages (Page_ID, Type, Entity, Name, Title, > Content) VALUES (" . Quote($Args{PageID}) . ", " . Quote($Args{Type}) . ", " > . Quote($Args{Entity}) . ", " . Quote($Args{Name}) . ", " . > Quote($Args{Title}) . ", " . Quote($Args{Content}) . ")"; > > $Neo::DB::Shopper->do($Query) || die "Bad Query!\n\t$Query"; It's still a better solution to use placeholders: my @values = ($post_author, $post_date, $post_date_gmt, "@post_content", $post_title, $post_status, $comment_status, $ping_status, $post_name, $post_modified, $post_modified_gmt, $guid); my $sth1 = $dbh->prepare("INSERT INTO wp_posts (post_author, post_date, post_date_gmt, post_content, post_title, post_status, comment_status, ping_status, post_name, post_modified, post_modified_gmt, guid) VALUES(?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?)") or die $dbh->errstr; my $rv1 = $sth->execute(@values); As it says in the documentation, using place holders allows the database engine to be more efficient as well as ensuring that your values are properly quoted for whichever database engine you are using (and if your underlying database engine changes, then that's handled too! You may also find it useful to look into SQL::Abstract as it makes these large inserts and updates much easier. Of course there's always Class::DBI/DBIx::Class if you want to take it a step further than that too. my %fieldvars = ( post_author => $post_author, post_date => $post_date, ... guid => $guid, ); use SQL::Abstract; my $sql = SQL::Abstract->new; my($stmt, @bind) = $sql->insert("wp_posts", \%fieldvals); my $sth = $dbh->prepare($stmt); $sth->execute(@bind); All the 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 | _____________________________________________________________ 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/20060927/a3aa95f0/attachment-0001.html From pdarley at kinesis-cem.com Wed Sep 27 08:40:14 2006 From: pdarley at kinesis-cem.com (Peter Darley) Date: Wed, 27 Sep 2006 08:40:14 -0700 Subject: SPUG: BD::mysql::st execute failed: In-Reply-To: <862E491E88FFFE44846C445B4881DD7C737767@PUG.ad.akc.org> Message-ID: RE: SPUG: BD::mysql::st execute failed:Adrian, That's a good point. I find that with our database the query planning doesn't take much of the execute time, unless it's a huge query, which probably would suffer more from poor planning than from having to plan multiple times. I also find that I don't do queries in loops, so my experience may not be typical. Thanks, Peter -----Original Message----- From: spug-list-bounces+pdarley=kinesis-cem.com at pm.org [mailto:spug-list-bounces+pdarley=kinesis-cem.com at pm.org]On Behalf Of Adrian Hands Sent: Wednesday, September 27, 2006 8:31 AM To: spug-list at pm.org Subject: Re: SPUG: BD::mysql::st execute failed: Generally speaking, If you use placeholders, the driver will use db bind variables and the db will be able to cache the statement and avoid reparsing on each execution. If you don't use placeholders, particularly in a loop, you'll pollute the db's statement cache. On the other hand, the statement analyzer will determine the execution plan BEFORE the vars are bound, so it won't have the benefit of knowing the value and will assume the worst. This becomes an issue with statements like: where foo_col LIKE ? (if the bind-var is 'foo%', for example, an index on foo_col will likely be very useful, but if the bind-var is '%foo', for example, the index will be useless) YMMV depending on the db, db version and driver. -----Original Message----- From: spug-list-bounces+aeh=akc.org at pm.org on behalf of Peter Darley Sent: Wed 9/27/2006 11:20 AM To: Jacinta Richardson; spug-list at pm.org Cc: luis medrano Subject: Re: SPUG: BD::mysql::st execute failed: Jacinta, I don't agree. Anything that hides the actual SQL statement is bad bad bad. If there wasn't an alternative it would be worth putting up with the place holders, but since you can get the same protection without hiding the exact query, I don't think it's a very good practice. Things like SQL::Abstract make me cringe. :) Thanks, Peter -----Original Message----- From: spug-list-bounces+pdarley=kinesis-cem.com at pm.org [mailto:spug-list-bounces+pdarley=kinesis-cem.com at pm.org]On Behalf Of Jacinta Richardson Sent: Saturday, September 23, 2006 6:45 PM To: spug-list at pm.org Cc: luis medrano Subject: Re: SPUG: BD::mysql::st execute failed: Peter Darley wrote: > $Query = "INSERT INTO HTML_Pages (Page_ID, Type, Entity, Name, Title, > Content) VALUES (" . Quote($Args{PageID}) . ", " . Quote($Args{Type}) . ", " > . Quote($Args{Entity}) . ", " . Quote($Args{Name}) . ", " . > Quote($Args{Title}) . ", " . Quote($Args{Content}) . ")"; > > $Neo::DB::Shopper->do($Query) || die "Bad Query!\n\t$Query"; It's still a better solution to use placeholders: my @values = ($post_author, $post_date, $post_date_gmt, "@post_content", $post_title, $post_status, $comment_status, $ping_status, $post_name, $post_modified, $post_modified_gmt, $guid); my $sth1 = $dbh->prepare("INSERT INTO wp_posts (post_author, post_date, post_date_gmt, post_content, post_title, post_status, comment_status, ping_status, post_name, post_modified, post_modified_gmt, guid) VALUES(?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?)") or die $dbh->errstr; my $rv1 = $sth->execute(@values); As it says in the documentation, using place holders allows the database engine to be more efficient as well as ensuring that your values are properly quoted for whichever database engine you are using (and if your underlying database engine changes, then that's handled too! You may also find it useful to look into SQL::Abstract as it makes these large inserts and updates much easier. Of course there's always Class::DBI/DBIx::Class if you want to take it a step further than that too. my %fieldvars = ( post_author => $post_author, post_date => $post_date, ... guid => $guid, ); use SQL::Abstract; my $sql = SQL::Abstract->new; my($stmt, @bind) = $sql->insert("wp_posts", \%fieldvals); my $sth = $dbh->prepare($stmt); $sth->execute(@bind); All the 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 | _____________________________________________________________ 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/20060927/23018fdb/attachment.html From lmzaldivar at gmail.com Fri Sep 29 10:20:06 2006 From: lmzaldivar at gmail.com (luis medrano) Date: Fri, 29 Sep 2006 10:20:06 -0700 Subject: SPUG: perl modules on mac os x Message-ID: <50aeae6f0609291020h45416107lb03832246dcb865a@mail.gmail.com> I'm sorry about that, there is anything I can do? List, I'm trying to install some modules on mac os x (10.4.7), but everytime I try do so it looks shows the same error "Can't test without successful make". any one knows a work around or how to make this work? Thanks, Luis P.S. this part of the output message whrt Removing previously used /var/root/.cpan/build/XML-RSS-1.10 CPAN.pm: Going to build A/AB/ABH/XML-RSS-1.10.tar.gz Checking if your kit is complete... Looks good Warning: prerequisite Test::Manifest 0.9 not found. Warning: prerequisite XML::Parser 2.23 not found. Writing Makefile for XML::RSS -- NOT OK Running make test Can't test without successful make Running make install make had returned bad status, install seems impossible install LWP::Simple Running install for module LWP::Simple Running make for G/GA/GAAS/libwww-perl-5.805.tar.gz Is already unwrapped into directory /var/root/.cpan/build/libwww- perl-5.805 Has already been processed within this session Running make test Can't test without successful make Running make install make had returned bad status, install seems impossible Checking if your kit is complete... Looks good Writing Makefile for LWP -- NOT OK Running make test Can't test without successful make Running make install make had returned bad status, install seems impossible -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mail.pm.org/pipermail/spug-list/attachments/20060929/f1e8c458/attachment.html From aaron at activox.com Fri Sep 29 10:48:48 2006 From: aaron at activox.com (aaron salo) Date: Fri, 29 Sep 2006 10:48:48 -0700 Subject: SPUG: perl modules on mac os x In-Reply-To: <50aeae6f0609291020h45416107lb03832246dcb865a@mail.gmail.com> References: <50aeae6f0609291020h45416107lb03832246dcb865a@mail.gmail.com> Message-ID: <451D5C80.20205@activox.com> > Warning: prerequisite Test::Manifest 0.9 not found. > Warning: prerequisite XML::Parser 2.23 not found. Sounds like your CPAN is not configured to follow dependencies. Try manually installing the above mods before XML::RSS. ~!a luis medrano wrote: > I'm trying to install some modules on mac os x (10.4.7), but everytime > I try do so it looks shows the same error "Can't test without > successful make". any one knows a work around or how to make this work? > From trey+spug at lopsa.org Fri Sep 29 13:18:34 2006 From: trey+spug at lopsa.org (Trey Harris) Date: Fri, 29 Sep 2006 13:18:34 -0700 (PDT) Subject: SPUG: perl modules on mac os x In-Reply-To: <50aeae6f0609291020h45416107lb03832246dcb865a@mail.gmail.com> References: <50aeae6f0609291020h45416107lb03832246dcb865a@mail.gmail.com> Message-ID: <20060929131716.K56371@bowser.eecs.harvard.edu> It looks to me like you didn't install the developer tools, and so you don't have a developer toolchain. Insert your OS X DVD and go into "Xcode Tools" and double-click on the Xcode bundle. Prior to that, you will also want the BSD toolchain since many CPAN modules with XS code will make use of things there. Just search the DVD for packages containing "BSD" in their names and install them, and then install Xcode. Trey In a message dated Fri, 29 Sep 2006, luis medrano writes: > I'm sorry about that, there is anything I can do? > > > List, > > I'm trying to install some modules on mac os x (10.4.7), but everytime I try > do so it looks shows the same error "Can't test without successful make". > any one knows a work around or how to make this work? > > Thanks, > Luis > > P.S. this part of the output message whrt > > > > Removing previously used /var/root/.cpan/build/XML-RSS-1.10 > > CPAN.pm: Going to build A/AB/ABH/XML-RSS-1.10.tar.gz > > Checking if your kit is complete... > Looks good > Warning: prerequisite Test::Manifest 0.9 not found. > Warning: prerequisite XML::Parser 2.23 not found. > Writing Makefile for XML::RSS > -- NOT OK > Running make test > Can't test without successful make > Running make install > make had returned bad status, install seems impossible > > > install LWP::Simple > Running install for module LWP::Simple > Running make for G/GA/GAAS/libwww-perl-5.805.tar.gz > Is already unwrapped into directory /var/root/.cpan/build/libwww- > perl-5.805 > Has already been processed within this session > Running make test > Can't test without successful make > Running make install > make had returned bad status, install seems impossible > > > > Checking if your kit is complete... > Looks good > Writing Makefile for LWP > -- NOT OK > Running make test > Can't test without successful make > Running make install > make had returned bad status, install seems impossible > -- From jazzdev at gmail.com Fri Sep 29 13:26:27 2006 From: jazzdev at gmail.com (JD Brennan) Date: Fri, 29 Sep 2006 13:26:27 -0700 Subject: SPUG: perl modules on mac os x In-Reply-To: <20060929131716.K56371@bowser.eecs.harvard.edu> References: <50aeae6f0609291020h45416107lb03832246dcb865a@mail.gmail.com> <20060929131716.K56371@bowser.eecs.harvard.edu> Message-ID: You can also download the Dev Tools from apple.com if you can't find your OS X DVD (I never can.) Takes a long time to download, though... JD On 9/29/06, Trey Harris wrote: > It looks to me like you didn't install the developer tools, and so you > don't have a developer toolchain. > > Insert your OS X DVD and go into "Xcode Tools" and double-click on the > Xcode bundle. Prior to that, you will also want the BSD toolchain since > many CPAN modules with XS code will make use of things there. Just search > the DVD for packages containing "BSD" in their names and install them, and > then install Xcode. > > Trey > > In a message dated Fri, 29 Sep 2006, luis medrano writes: > > > I'm sorry about that, there is anything I can do? > > > > > > List, > > > > I'm trying to install some modules on mac os x (10.4.7), but everytime I try > > do so it looks shows the same error "Can't test without successful make". > > any one knows a work around or how to make this work? > > > > Thanks, > > Luis > > > > P.S. this part of the output message whrt > > > > > > > > Removing previously used /var/root/.cpan/build/XML-RSS-1.10 > > > > CPAN.pm: Going to build A/AB/ABH/XML-RSS-1.10.tar.gz > > > > Checking if your kit is complete... > > Looks good > > Warning: prerequisite Test::Manifest 0.9 not found. > > Warning: prerequisite XML::Parser 2.23 not found. > > Writing Makefile for XML::RSS > > -- NOT OK > > Running make test > > Can't test without successful make > > Running make install > > make had returned bad status, install seems impossible > > > > > > install LWP::Simple > > Running install for module LWP::Simple > > Running make for G/GA/GAAS/libwww-perl-5.805.tar.gz > > Is already unwrapped into directory /var/root/.cpan/build/libwww- > > perl-5.805 > > Has already been processed within this session > > Running make test > > Can't test without successful make > > Running make install > > make had returned bad status, install seems impossible > > > > > > > > Checking if your kit is complete... > > Looks good > > Writing Makefile for LWP > > -- NOT OK > > Running make test > > Can't test without successful make > > Running make install > > make had returned bad status, install seems impossible > > > > -- > _____________________________________________________________ > 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 billw at onedrous.org Sat Sep 30 12:54:02 2006 From: billw at onedrous.org (Bill Warner) Date: Sat, 30 Sep 2006 12:54:02 -0700 Subject: SPUG: B::Deparse and syntax tree documentation? Message-ID: <451ECB5A.60208@onedrous.org> Hi all, I'm reading through B::Deparse and I'm wondering if there is any documentation out there are on the structure of perl's syntax tree. Anyone know of anything? Thanks, -Bill From billw at onedrous.org Sat Sep 30 15:39:56 2006 From: billw at onedrous.org (Bill Warner) Date: Sat, 30 Sep 2006 15:39:56 -0700 Subject: SPUG: B::Deparse and syntax tree documentation? In-Reply-To: <451ECB5A.60208@onedrous.org> References: <451ECB5A.60208@onedrous.org> Message-ID: <451EF23C.4050409@onedrous.org> It looks like perlguts is what I've been looking for. Also, B::Concise ain't bad. Thanks, -Bill Bill Warner wrote: > Hi all, > > I'm reading through B::Deparse and I'm wondering if there is any > documentation out there are on the structure of perl's syntax tree. > Anyone know of anything? > > Thanks, > > -Bill > _____________________________________________________________ > 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/ > >