From jkeroes at eli.net Sat Mar 1 18:47:52 2003 From: jkeroes at eli.net (Joshua Keroes) Date: Mon Aug 2 21:34:18 2004 Subject: [Pdx-pm] March Meeting Message-ID: <20030302004752.GO27535@eli.net> It's... social meeting time! The next Portland Perl Monger meeting is in two Wedsnesdays, on Mar 12. That gives us almost two whole weeks to decide where to go! Where shall we go? I'll start us out with these ideas: Wonderland Avalon - nickel video games on SE Belmont (all ages) Rialto - downtown poolhall with some pinball machines (21+) A McMenamins Where else would you like to go? -J From perl at sonofhans.net Sun Mar 2 16:26:12 2003 From: perl at sonofhans.net (Randall) Date: Mon Aug 2 21:34:18 2004 Subject: [Pdx-pm] March Meeting In-Reply-To: <20030302004752.GO27535@eli.net> Message-ID: > It's... social meeting time! > Where else would you like to go? i haven't been to the wonderland for nearly a decade, so that would be fun for me. the rialto i don't like as well (too smoky as i recall). a McM would be fine; tavern & pool on NW 23rd & thurman (?) is quieter than most others and caters well to groups. they have 1 (one) pool table. um ... the lucky lab's pretty loud ... nowhere outdoors is safe this time of year ... i don't have other immediate ideas. it's hard 'cause i don't know where most people live. what i consider "centrally located" is a fair hike for some. r From jhoblitt at ifa.hawaii.edu Mon Mar 3 21:16:11 2003 From: jhoblitt at ifa.hawaii.edu (Joshua Hoblitt) Date: Mon Aug 2 21:34:18 2004 Subject: [Pdx-pm] bit conversion brain-teaser Message-ID: I have a 7-bit digital I/O module that outputs the state of it's channels via an ascii hex value. For example: normal state : 7F channel 0 to V- : 7E channel 6 to V- : 3F . . What I need to get out of this is the state of each channel. I thought it would be pretty simple to do a hex -> per bit conversion but I ended up resorting to to heavy weapons. This is my solution: use Bit::Vector; my $vector = Bit::Vector->new_Hex( '7', "7F" ); for ( 0 .. 6 ) { print $vector->contains( $_ ), "\n"; } This probably shows that I'm ignorant of bit fiddling in general but it seems to me there should be a simple way to do this with unpack? Or a way to treat a binary int like a stack and pop each bit off? Anyways I thought some of you might find this a fun problem to solve. Cheers, -J -- From merlyn at stonehenge.com Mon Mar 3 21:36:16 2003 From: merlyn at stonehenge.com (Randal L. Schwartz) Date: Mon Aug 2 21:34:18 2004 Subject: [Pdx-pm] bit conversion brain-teaser In-Reply-To: References: Message-ID: <864r6jvm4v.fsf@red.stonehenge.com> >>>>> "Joshua" == Joshua Hoblitt writes: Joshua> I have a 7-bit digital I/O module that outputs the state of it's channels via an ascii hex value. Joshua> For example: Joshua> normal state : 7F Joshua> channel 0 to V- : 7E Joshua> channel 6 to V- : 3F Joshua> . Joshua> . Joshua> What I need to get out of this is the state of each channel. Joshua> I thought it would be pretty simple to do a hex -> per bit Joshua> conversion perl -le 'print unpack "B*", pack "H*", "3F";' => 00111111 -- Randal L. Schwartz - Stonehenge Consulting Services, Inc. - +1 503 777 0095 Perl/Unix/security consulting, Technical writing, Comedy, etc. etc. See PerlTraining.Stonehenge.com for onsite and open-enrollment Perl training! From jhoblitt at ifa.hawaii.edu Mon Mar 3 21:42:18 2003 From: jhoblitt at ifa.hawaii.edu (Joshua Hoblitt) Date: Mon Aug 2 21:34:18 2004 Subject: [Pdx-pm] bit conversion brain-teaser In-Reply-To: <864r6jvm4v.fsf@red.stonehenge.com> Message-ID: > perl -le 'print unpack "B*", pack "H*", "3F";' > > => > > 00111111 DOH! (smacks forehead with hand). :) -J -- From tkil at scrye.com Tue Mar 4 00:48:14 2003 From: tkil at scrye.com (Tkil) Date: Mon Aug 2 21:34:18 2004 Subject: [Pdx-pm] bit conversion brain-teaser In-Reply-To: <864r6jvm4v.fsf@red.stonehenge.com> References: <864r6jvm4v.fsf@red.stonehenge.com> Message-ID: >>>>> "Randal" == Randal L Schwartz writes: Randal> perl -le 'print unpack "B*", pack "H*", "3F";' Randal> => Randal> 00111111 Am I the only person who finds the "H" template to be "backwards" to some extent? I guess I could remember that I'm "packing" two nybbles into one byte, but I can't get over the fact that "pack 'H*'" is "decoding" something, which I mentally assign to be "unpack"'s job. And if that made no sense, then it just means that I need to drink more before posting. t. From mikeraz at PATCH.COM Tue Mar 4 08:49:38 2003 From: mikeraz at PATCH.COM (mikeraz@PATCH.COM) Date: Mon Aug 2 21:34:18 2004 Subject: [Pdx-pm] bit conversion brain-teaser In-Reply-To: <864r6jvm4v.fsf@red.stonehenge.com>; from merlyn@stonehenge.com on Mon, Mar 03, 2003 at 07:36:16PM -0800 References: <864r6jvm4v.fsf@red.stonehenge.com> Message-ID: <20030304064938.A29575@patch.com> Hey Randal - at least give us some time to puzzle with it before providing the answer! :) On Mon, Mar 03, 2003 at 07:36:16PM -0800, Randal L. Schwartz typed: > > perl -le 'print unpack "B*", pack "H*", "3F";' > > => > > 00111111 > -- Michael Rasmussen aka mikeraz Be appropriate && Follow your curiosity http://www.patch.com/ http://wiki.patch.com/ http://blog.patch.com/sandbox/ The fortune cookie says: You are in a maze of little twisting passages, all alike. From merlyn at stonehenge.com Tue Mar 4 08:52:04 2003 From: merlyn at stonehenge.com (Randal L. Schwartz) Date: Mon Aug 2 21:34:18 2004 Subject: [Pdx-pm] bit conversion brain-teaser In-Reply-To: <20030304064938.A29575@patch.com> References: <864r6jvm4v.fsf@red.stonehenge.com> <20030304064938.A29575@patch.com> Message-ID: <86isuztca3.fsf@red.stonehenge.com> >>>>> "mikeraz" == mikeraz writes: mikeraz> Hey Randal - at least give us some time to puzzle with it before mikeraz> providing the answer! :) Sorry, I didn't realize it needed a spoiler warning. :) -- Randal L. Schwartz - Stonehenge Consulting Services, Inc. - +1 503 777 0095 Perl/Unix/security consulting, Technical writing, Comedy, etc. etc. See PerlTraining.Stonehenge.com for onsite and open-enrollment Perl training! From ptkwt at aracnet.com Tue Mar 4 02:08:00 2003 From: ptkwt at aracnet.com (Phil Tomson) Date: Mon Aug 2 21:34:18 2004 Subject: [Pdx-pm] March PDX.rb Meeting Message-ID: <1046765283.5202.41.camel@traveller.home.com> Rubyists (and those curious about Ruby): We'll be having our monthly meeting this coming Monday March 10th at 7PM. This time we'll meet on the East side at: The Lucky Lab At SE Hawthorne and 10th (north side of the street). This month we'll have a presentation by Lennon Day-Reynolds on his yet unamed database binding library discussed in a recent post to ruby-talk. From josh at joshheumann.com Tue Mar 4 15:31:20 2003 From: josh at joshheumann.com (Josh Heumann) Date: Mon Aug 2 21:34:18 2004 Subject: [Pdx-pm] Perl-driven site Message-ID: <1977.66.167.253.227.1046813480.squirrel@www.joshheumann.com> Hi all, I just finished and launched a site, http://viewfrommywindow.com, which was written in object-oriented perl, modeled on the mvc. If you haven't used the mvc, and I'm looking at all you people who write cigs in one big file, you should give it a try. I was thinking of abstracting the modules as much as possible, pod-izing the documentation, etc, and posting it to cpan. Joshua Keroes pointed out that someone just posted one (http://search.cpan.org/author/MUENALAN/Class- MVC-0.01.06/MVC.pm)(darn you, Murat Uenalan, darn you to heck), but hey, there's always another way to do things, so if anyone wants to give a relatively new programmer on the scene a hand at some new stuff, I'd be more than ecstatic to work with you. Oh, and post some vmfws to the site. Josh _______________________________ Show us your view: post pics at http://www.viewfrommywindow.com From dora.raymaker at xo.com Tue Mar 4 16:24:32 2003 From: dora.raymaker at xo.com (Raymaker, Dora) Date: Mon Aug 2 21:34:18 2004 Subject: [Pdx-pm] Next PP Meeting: What's Your Favorite Tool? Message-ID: <9A0E9E976A6EBC4299764038209E49833C18FE@ILCHICVEXC002.mail.inthosts.net> Hello all, the next Pragmatic Programmers meeting is: When: Thursday 6 March 6:30pm Where: 707 SW Washington St How: Tell security in the lobby you're there for the Pragmatic Programmer's Meeting What: Do you have a favorite text editor? Shell? Source control system? One that makes your life easier? One that really truly sucks? We'll discuss Chapter 3, sections 14, 15, 16, 17; or, in "plain text": 3 The Basic Tools: 14 The Power of Plain text 15 Shell Games 16 Power Editing 17 Source Code Control For more info, contact dora.raymaker@xo.com or lady_d@attbi.com . -D. -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mail.pm.org/pipermail/pdx-pm-list/attachments/20030304/a738e129/attachment.htm From jhoblitt at ifa.hawaii.edu Tue Mar 4 18:56:39 2003 From: jhoblitt at ifa.hawaii.edu (Joshua Hoblitt) Date: Mon Aug 2 21:34:18 2004 Subject: [Pdx-pm] bit conversion brain-teaser In-Reply-To: <200303042333.h24NXGu32467@westhost39.westhost.net> Message-ID: > How about something like this?: > > > #!/usr/bin/perl -w > > use strict; > > my $hex = '6'; > my $bin = sprintf("%b", $hex); > > print "bin is: $bin\nhex is: $hex\n"; Your close but "%b" is expecting a binary int. So you need to add a hex -> decimal conversion so perl will store the value internaly as an int. Your example works because the number 6 is already in decimal (and has the same value as 0x6). It however wouldn't work with any hex value > 0x9. -- my $hex = hex( '7F' ); # -OR- my $hex = 0x7F; my $bin = sprintf("%b", $hex); print "bin is: $bin\n"; -- Good idea. -J __ From jhoblitt at ifa.hawaii.edu Tue Mar 4 19:05:58 2003 From: jhoblitt at ifa.hawaii.edu (Joshua Hoblitt) Date: Mon Aug 2 21:34:18 2004 Subject: [Pdx-pm] bit conversion brain-teaser In-Reply-To: Message-ID: Btw - Either your MTA is mis-configured or your mx records are incorrect. Cheers, -J ----- The following addresses had permanent fatal errors ----- (reason: 550 5.7.1 ... Relaying denied) ----- Transcript of session follows ----- ... while talking to mail.throwingbones.com.: >>> RCPT To: <<< 550 5.7.1 ... Relaying denied 550 5.1.1 ... User unkno From jhoblitt at ifa.hawaii.edu Tue Mar 4 19:10:28 2003 From: jhoblitt at ifa.hawaii.edu (Joshua Hoblitt) Date: Mon Aug 2 21:34:18 2004 Subject: [Pdx-pm] bit conversion brain-teaser In-Reply-To: Message-ID: In case anyone is wondering why I sent that... I'm hoping that he reads the list with a different email account and will see my message. -J -- On Tue, 4 Mar 2003, Joshua Hoblitt wrote: > Btw - Either your MTA is mis-configured or your mx records are incorrect. > > Cheers, > > -J > > ----- The following addresses had permanent fatal errors ----- (reason: 550 5.7.1 ... Relaying denied) ----- Transcript of session follows ----- ... while talking to mail.throwingbones.com.: >>> RCPT To: <<< 550 5.7.1 ... Relaying denied 550 5.1.1 ... User unkno > > _______________________________________________ > Pdx-pm-list mailing list > Pdx-pm-list@mail.pm.org > http://mail.pm.org/mailman/listinfo/pdx-pm-list > From jkeroes at eli.net Wed Mar 5 15:33:15 2003 From: jkeroes at eli.net (Joshua Keroes) Date: Mon Aug 2 21:34:18 2004 Subject: [Pdx-pm] Remove Perl Message-ID: <20030305213315.GA27535@eli.net> Friend installed Perl 5.8.0 over Debian's 5.6.1 package. He changed his mind and went back to the package when he realized that apt-get would give him problems after his install. How does he completely remove the 5.8.0 install? Thanks, J From bprew at logiccloud.com Wed Mar 5 17:42:53 2003 From: bprew at logiccloud.com (Ben Prew) Date: Mon Aug 2 21:34:18 2004 Subject: [Pdx-pm] (no subject) Message-ID: <200303052343.h25Nh1B15761@westhost39.westhost.net> Thanks, I don't read the list with another account, I had to check the archives. Which brings up a good question, I'm thinking about getting a colo and was wondering if anyone had anyone they would recommend? Lastly, thanks for the sprintf tip. -- Ben bprew@logiccloud.com (hopefully) http://www.logiccloud.com >In case anyone is wondering why I sent that... I'm hoping that he reads the list with a different email account and will see my message. > >-J > >-- > >On Tue, 4 Mar 2003, Joshua Hoblitt wrote: > >> Btw - Either your MTA is mis-configured or your mx records are incorrect. >> >> Cheers, >> >> -J >> >> ----- The following addresses had permanent fatal errors ----- (reason: 550 5.7.1 ... Relaying denied) ----- Transcript of session follows ----- ... while talking to mail.throwingbones.com.: >>> RCPT To: <<< 550 5.7.1 ... Relaying denied 550 5.1.1 ... User unkno >> From carl at scripter.com Thu Mar 6 00:00:45 2003 From: carl at scripter.com (Carl Scripter) Date: Mon Aug 2 21:34:18 2004 Subject: [Pdx-pm] Remove Perl In-Reply-To: <20030305213315.GA27535@eli.net> Message-ID: Haahahah... At first, I read this email message as Joshua trying to remove himself off the mailing list, and pulling the old majordomo "remove _list_" flub circa 1995. Made me laugh. Hi everyone, my name is Carl. __ __ / /\/ /\ / / / / / // Carl Scripter . / / /\ \ \ . . . . . . . . . . . . . . . . \ \ \/_/ / life: http://www.scripter.com \ \_\_\/ screaming: http://www.dlimitr.com \/_/ streaming: scripter.com:8888 -- Please note: All emails to and from me are filtered through SpamAssassin [http://www.spamassassin.org] and may be deleted automatically if they contain common spam phrases and/or falsified mail headers. From schwern at pobox.com Thu Mar 6 08:15:08 2003 From: schwern at pobox.com (schwern@pobox.com) Date: Mon Aug 2 21:34:18 2004 Subject: [Pdx-pm] Remove Perl In-Reply-To: <20030305213315.GA27535@eli.net>; from jkeroes@eli.net on Wed, Mar 05, 2003 at 01:33:15PM -0800 References: <20030305213315.GA27535@eli.net> Message-ID: <20030306061508.D22769@ttul.org> On Wed, Mar 05, 2003 at 01:33:15PM -0800, Joshua Keroes wrote: > Friend installed Perl 5.8.0 over Debian's 5.6.1 package. > He changed his mind and went back to the package when > he realized that apt-get would give him problems after > his install. > > How does he completely remove the 5.8.0 install? Step -1: Install Perl in /usr/local/perl5.8.0 Step 0: Symlink /usr/local/perl5.8.0/bin/* to /usr/bin Step 1: Remove above symlinks Step 2: Hard link /usr/bin/perl to /usr/bin/perl5.6.1 Step 2a: Alternatively, simply reinstall the Debian perl-base package. Step 3: rm -rf /usr/local/perl5.8.0/ If you follow these easy steps, there's no problem uninstalling Perl. Or you could make a dpkg out of 5.8.0 the same as Debian does in unstable. Or you could use something like GNU stow. If you skipped step -1 and installed it straight into /usr, well... go to remedial sysadmin school. There is one way out. Re-run 'make install' for 5.8.0, capture the output. In that output should be the paths of everything which was installed. Remove all that. Reinstall the Debian package. From dstillwa at xprt.net Thu Mar 6 19:55:40 2003 From: dstillwa at xprt.net (Daniel C. Stillwaggon) Date: Mon Aug 2 21:34:18 2004 Subject: [Pdx-pm] March Meeting In-Reply-To: <20030302004752.GO27535@eli.net> Message-ID: On Saturday, Mar 1, 2003, at 16:47 US/Pacific, Joshua Keroes wrote: > Wonderland Avalon - nickel video games on SE Belmont (all ages) This has got my vote! > Rialto - downtown poolhall with some pinball machines (21+) > A McMenamins I don't know the Rialto. MM would allow beer (always a plus). --------------------------------------------------------------------- Daniel C. Stillwaggon From perl at sonofhans.net Thu Mar 6 20:39:15 2003 From: perl at sonofhans.net (Randall Hansen) Date: Mon Aug 2 21:34:18 2004 Subject: [Pdx-pm] failed tests on module install Message-ID: folks ~ i guess i've been lucky, spoiled by debian, or not adventurous enough, but it's not 'til today that i've encountered failed tests on perl module installation. old hat for most of you, no doubt, but it's got me all in a tizzy. several modules are failing, but here's one detailed example: in HTML::Parser's 'headparser.t', test #3 fails. the point of failure is comparing one string written into and then parsed from an HTML file: Å v?re eller å ikke v?re with another string: ? v?re eller ? ikke v?re these should be equivalent, for properly-parsed HTML. the test works fine on my debian, freebsd, and win2k machines, but is failing under RH8 (using another OS for this install isn't an option). the text returned from the file is very similar, but it's not correctly reading the '?'. if this test were the only one failing i'd probably force the install and ask around HTML::Parser land to see if anyone had any ideas (or maybe it's RH's unicode handling, or something else unrelated to the module, but that's all beside my main point). the main point is - what i'm installing is Bundle::Slash, and dozens of tests on numerous modules are failing (fewer than 1% of the total subtests, but that's still a large number). i barely know where to start, but what i /don't/ want to do is manually tear apart each of these tests (as above) and hunt down the cause - it would take a week. is there a better option? it's likely that few suggestions are too newb-ish to be helpful :) TIA, the other randall From aj at linuxaid.org Thu Mar 6 22:14:40 2003 From: aj at linuxaid.org (A.J. Weinzettel) Date: Mon Aug 2 21:34:18 2004 Subject: [Pdx-pm] Shopping Cart Logic Message-ID: <1047010480.4188.92.camel@desktop> I am building a custom shopping cart for a customer and I am trying to find a better way to add / delete products from the cart. Here is my logic: 1. Customer adds an item to the cart 2. Check the presence of a cookie a. If no cookie set a unique cookie using time goto 3 b. If cookie present goto 3 3. Insert a record into the database with the unique id and product info a. If customer checks out goto 4 b. If customer keeps on shopping goto 1 4. Customer checks out and records from shopping_cart table get transferred to products_ordered table. My problem is when a customer does not check out the records in the shopping_cart table get abandoned. I really don't like this idea. I could write a cron to delete the records that are x days old, but I am wanting something that does not require an outside process. What other ways can I keep the database nice and clean? Thanks, A.J. Weinzettel http://ajscomputerbug.com From wcooley at nakedape.cc Thu Mar 6 23:22:52 2003 From: wcooley at nakedape.cc (Wil Cooley) Date: Mon Aug 2 21:34:18 2004 Subject: [Pdx-pm] failed tests on module install In-Reply-To: References: Message-ID: <1047014572.4560.33.camel@denk.nakedape.priv> On Thu, 2003-03-06 at 18:39, Randall Hansen wrote: > folks ~ > > i guess i've been lucky, spoiled by debian, or not adventurous enough, but > it's not 'til today that i've encountered failed tests on perl module > installation. old hat for most of you, no doubt, but it's got me all in a > tizzy. > > several modules are failing, but here's one detailed example: in > HTML::Parser's 'headparser.t', test #3 fails. the point of failure is > comparing one string written into and then parsed from an HTML file: > > Å v?re eller å ikke v?re > > with another string: > > ? v?re eller ? ikke v?re > > these should be equivalent, for properly-parsed HTML. the test works fine > on my debian, freebsd, and win2k machines, but is failing under RH8 (using > another OS for this install isn't an option). the text returned from the > file is very similar, but it's not correctly reading the '?'. if this test > were the only one failing i'd probably force the install and ask around > HTML::Parser land to see if anyone had any ideas (or maybe it's RH's unicode > handling, or something else unrelated to the module, but that's all beside > my main point). > > the main point is - what i'm installing is Bundle::Slash, and dozens of > tests on numerous modules are failing (fewer than 1% of the total subtests, > but that's still a large number). i barely know where to start, but what i > /don't/ want to do is manually tear apart each of these tests (as above) and > hunt down the cause - it would take a week. > > is there a better option? it's likely that few suggestions are too newb-ish > to be helpful :) RH 8 defaults to Unicode for everything. Try setting 'export LC_ALL=C' before installing the modules or wait for me to do it tomorrow :) Wil -- Wil Cooley wcooley@nakedape.cc Naked Ape Consulting http://nakedape.cc * * * * Linux, UNIX, Networking and Security Solutions * * * * QCSNet http://www.qcsn.com * * * * T1, Frame Relay, DSL, Dial-up, and Web Hosting * * * * * My GPG key recently expired. It's updated on the key * * servers. Please update if you're using GPG/PGP. * -------------- next part -------------- A non-text attachment was scrubbed... Name: not available Type: application/pgp-signature Size: 189 bytes Desc: This is a digitally signed message part Url : http://mail.pm.org/pipermail/pdx-pm-list/attachments/20030306/0b83516b/attachment.bin From tkil at scrye.com Fri Mar 7 00:31:56 2003 From: tkil at scrye.com (Tkil) Date: Mon Aug 2 21:34:18 2004 Subject: [Pdx-pm] Shopping Cart Logic In-Reply-To: <1047010480.4188.92.camel@desktop> References: <1047010480.4188.92.camel@desktop> Message-ID: >>>>> "AJ" == A J Weinzettel writes: AJ> What other ways can I keep the database nice and clean? Assuming that you'll get a steady flow of customers, you could clean up the list of active carts every time you create a new one. Offhand, I'd use a timestamp for each cookie, and keep an index on the time stamp. That should make it quite fast to find all timestamps older than a certain time. (Assuming that an index is necessary at all -- try it without one first, and see if it is fast enough.) Since you're inserting a new value into the table at this time, you're going to have to lock the table (or at least a part of it) anyway, so cart+cookie creation time seems a good time to cull old cookies. t. From merlyn at stonehenge.com Fri Mar 7 05:45:24 2003 From: merlyn at stonehenge.com (Randal L. Schwartz) Date: Mon Aug 2 21:34:18 2004 Subject: [Pdx-pm] Shopping Cart Logic In-Reply-To: <1047010480.4188.92.camel@desktop> References: <1047010480.4188.92.camel@desktop> Message-ID: <863clzjt7v.fsf@red.stonehenge.com> >>>>> "A" == A J Weinzettel writes: A> I am building a custom shopping cart for a customer and I am trying to A> find a better way to add / delete products from the cart. Here is my A> logic: A> 1. Customer adds an item to the cart A> 2. Check the presence of a cookie A> a. If no cookie set a unique cookie using time goto 3 A> b. If cookie present goto 3 A> 3. Insert a record into the database with the unique id and product info A> a. If customer checks out goto 4 A> b. If customer keeps on shopping goto 1 A> 4. Customer checks out and records from shopping_cart table get A> transferred to products_ordered table. A> My problem is when a customer does not check out the records in the A> shopping_cart table get abandoned. I really don't like this idea. I A> could write a cron to delete the records that are x days old, but I am A> wanting something that does not require an outside process. What other A> ways can I keep the database nice and clean? You can require registration before purchase... and associate the shopping cart with the person, not the session. Put up a notice that items left in shopping cart over 30 days are recycled. This is the Amazon model. Works pretty well. -- Randal L. Schwartz - Stonehenge Consulting Services, Inc. - +1 503 777 0095 Perl/Unix/security consulting, Technical writing, Comedy, etc. etc. See PerlTraining.Stonehenge.com for onsite and open-enrollment Perl training! From carl at scripter.com Fri Mar 7 10:53:01 2003 From: carl at scripter.com (Carl Scripter) Date: Mon Aug 2 21:34:18 2004 Subject: [Pdx-pm] Shopping Cart Logic In-Reply-To: <1047010480.4188.92.camel@desktop> Message-ID: > My problem is when a customer does not check out the records in the > shopping_cart table get abandoned. I really don't like this idea. I > could write a cron to delete the records that are x days old, but I am > wanting something that does not require an outside process. What other > ways can I keep the database nice and clean? I would think that most shopping cart websites are best if a customer's cart contents stay active .. forever. Yes, this creates a bloated database -- but you can do so much more... Are you implimenting user sessions? If so, when a session expires, flag the user record as "busy." This infers that the user has gone away to think about the purchase .. for however long it takes :) Also, at the next login, you could perform queries on dated cart items: "Welcome back, it looks like you had some items in your cart that we no longer carry .. but CLICK HERE FOR SOMETHING BETTER." I know bad example -- but you get the idea. If you are absolutely against stale records in the database, keep all the cart information in a cookie -- at least there's a /good/ chance the user sees them again. I like the first idea -- flag the old contents as old, but still potentially active. Maybe it's the salesperson in me :) __ __ / /\/ /\ / / / / / // Carl Scripter . / / /\ \ \ . . . . . . . . . . . . . . . . \ \ \/_/ / life: http://www.scripter.com \ \_\_\/ screaming: http://www.dlimitr.com \/_/ streaming: scripter.com:8888 -- Please note: All emails to and from me are filtered through SpamAssassin [http://www.spamassassin.org] and may be deleted automatically if they contain common spam phrases and/or falsified mail headers. From poec at yahoo.com Fri Mar 7 11:34:10 2003 From: poec at yahoo.com (Ovid) Date: Mon Aug 2 21:34:18 2004 Subject: [Pdx-pm] Shopping Cart Logic In-Reply-To: Message-ID: <20030307173410.88668.qmail@web40409.mail.yahoo.com> --- Carl Scripter wrote: > If you are absolutely against stale records in the database, keep all the > cart information in a cookie -- at least there's a /good/ chance the user > sees them again. With all due respect, you don't want to do that. A cookie should *typically* be an apparently random piece of data (a session) that ties the external user-agent to an internal record. Yes, maybe storing a bit of data such as "the user wants this stylesheet" in a cookie is okay for a small site, but if you're doing anything serious, you shouldn't be abusing cookies. Limitations of cookies: * 300 total cookies * 4 kilobytes per cookie, where the name and the OPAQUE_STRING combine to form the 4 kilobyte limit. * 20 cookies per server or domain. (note that completely specified hosts and domains are treated as separate entities and have a 20 cookie limitation for each, not combined) While not all user agents obey this, it's what the server should assume. Thus, if you store important info (such as the shopping cart) in the cookie, it gets removed once your prolific surfer racks up another 300 cookies. Further, if they had a long shopping cart list, no matter how good your compression algorithm, you could exceed that limit (and then the cookie gets truncated and your data could be corrupted). Finally, when Web developers get in the habit of storing important information in a cookie, they often store information in that cookie that *should not be changed* (such as prices). Then they have to go to the trouble of creating an MD5 digest (or similar mechanism) to verify the integrity of the cookie, but in reality that doesn't happen. In other words, using cookies inappropriately is a constant source of bugs. As there are readily available session mechanisms available, why not avail yourself of them? The applications will be more professional, you will discover that you have greater flexibility in how you interact with a client and, most importantly, you will less dependent on the user agent behavior! Side note: never rely on the 'expires' attribute to time out a cookie. If the computer's clock is wrong, you could be very upset. Just set the cookie with a session ID and check the time against the session information cached on the server. (I seem to recall someone alluding to something like that, so I thought I would toss this out there.) Cheers, Ovid ===== "Ovid" on http://www.perlmonks.org/ Web Programming with Perl: http://users.easystreet.com/ovid/cgi_course/ Silence Is Evil: http://users.easystreet.com/ovid/philosophy/decency.txt __________________________________________________ Do you Yahoo!? Yahoo! Tax Center - forms, calculators, tips, more http://taxes.yahoo.com/ From merlyn at stonehenge.com Fri Mar 7 12:06:19 2003 From: merlyn at stonehenge.com (Randal L. Schwartz) Date: Mon Aug 2 21:34:18 2004 Subject: [Pdx-pm] Shopping Cart Logic In-Reply-To: <20030307173410.88668.qmail@web40409.mail.yahoo.com> References: <20030307173410.88668.qmail@web40409.mail.yahoo.com> Message-ID: <86heafgig4.fsf@red.stonehenge.com> >>>>> "Ovid" == Ovid writes: Ovid> --- Carl Scripter wrote: >> If you are absolutely against stale records in the database, keep >> all the cart information in a cookie -- at least there's a /good/ >> chance the user sees them again. Ovid> With all due respect, you don't want to do that. A cookie should Ovid> *typically* be an apparently random piece of data (a session) that Ovid> ties the external user-agent to an internal record. Yes, maybe Ovid> storing a bit of data such as "the user wants this stylesheet" in a Ovid> cookie is okay for a small site, but if you're doing anything serious, Ovid> you shouldn't be abusing cookies. A useful bookmark: -- Randal L. Schwartz - Stonehenge Consulting Services, Inc. - +1 503 777 0095 Perl/Unix/security consulting, Technical writing, Comedy, etc. etc. See PerlTraining.Stonehenge.com for onsite and open-enrollment Perl training! From aj at ajscomputerbug.com Fri Mar 7 12:45:24 2003 From: aj at ajscomputerbug.com (A.J. Weinzettel) Date: Mon Aug 2 21:34:18 2004 Subject: [Pdx-pm] Shopping Cart Logic In-Reply-To: <1047062165.5654.17.camel@desktop> References: <20030307173410.88668.qmail@web40409.mail.yahoo.com> <86heafgig4.fsf@red.stonehenge.com> <1047062165.5654.17.camel@desktop> Message-ID: <1047062724.5654.24.camel@desktop> > On Fri, 2003-03-07 at 10:06, Randal L. Schwartz wrote: > A useful bookmark: > > > Thanks for all the input!! A.J. Weinzettel http://ajscomputerbug.com From robb at empire2.com Fri Mar 7 13:25:23 2003 From: robb at empire2.com (Rob Bloodgood) Date: Mon Aug 2 21:34:18 2004 Subject: [Pdx-pm] Shopping Cart Logic In-Reply-To: References: Message-ID: <75946942140.20030307112523@empire2.com> Hello Carl, Friday, March 7, 2003, 8:53:01 AM, you wrote: >> My problem is when a customer does not check out the records in the >> shopping_cart table get abandoned. I really don't like this idea. I >> could write a cron to delete the records that are x days old, but I am >> wanting something that does not require an outside process. What other >> ways can I keep the database nice and clean? CS> I would think that most shopping cart websites are best if a customer's CS> cart contents stay active .. forever. Yes, this creates a bloated CS> database -- but you can do so much more... Are you implimenting user CS> sessions? If so, when a session expires, flag the user record as "busy." CS> This infers that the user has gone away to think about the purchase .. for CS> however long it takes :) Also, at the next login, you could perform CS> queries on dated cart items: CS> "Welcome back, it looks like you had some items in your cart that we no CS> longer carry .. but CLICK HERE FOR SOMETHING BETTER." I know bad example CS> -- but you get the idea. CS> If you are absolutely against stale records in the database, keep all the CS> cart information in a cookie -- at least there's a /good/ chance the user CS> sees them again. I dunno, I got tired of a large, inscrutable session table in my database too, and eventually switched my Apache::Session backed to File instead of Oracle. That way, the session_id is still the only information in the cookie, I take advantage of the optimizations in the filesystem access & caching w/o worrying about database time, and expiring old sessions is a simple cron/find/rm job. But I've got sessions from all the way to last Dec (last time I cleaned). I have 3300 session files, and they take a total of 13MB. Messy to look at, sure, but it's all in one folder, and most are <100 bytes! A shopping cart should (IMHO) hold the items you have flagged, with the session_id cookie itself having a LONG LONG timeout (years is ok with me!). Then you can look in the session data itself, expire old items, then keep working. L8r, Rob From cp at onsitetech.com Fri Mar 7 17:40:59 2003 From: cp at onsitetech.com (Curtis Poe) Date: Mon Aug 2 21:34:18 2004 Subject: [Pdx-pm] Wildly OT (ASP question) Message-ID: <000b01c2e503$01f5e530$1f01a8c0@ot.onsitetech.com> Hi all, Sorry for the wildly OT (off topic) question, but can someone suggest a good forum for asking, gulp, ASP questions? One of our clients has a miserable application that uses ASP with Excel for the database and -- surprise! -- it doesn't work very well. Regrettably, my ASP knowledge is very limited, but my searches on the 'net don't seem very fruitful. Cheers, Ovid From jkeroes at eli.net Mon Mar 10 13:55:19 2003 From: jkeroes at eli.net (Joshua Keroes) Date: Mon Aug 2 21:34:18 2004 Subject: [Pdx-pm] March Meeting In-Reply-To: <20030302004752.GO27535@eli.net> References: <20030302004752.GO27535@eli.net> Message-ID: <20030310195519.GE18755@eli.net> The people have spoken. This month's meeting will be at... ...drum roll please... [badda-drumma-bomma-badda-badda] ...The Wunderland Avalon! < http://www.wunderlandgames.com/ > The Avalon has lots of games for a nickel; some less, some more. They have pinball, ski-ball, videogames, maybe some pool tables, probably air hockey, etc. Want to come? Follow these Quik-n-EZ In-struc-ti-on-es: 1. Meet at It's a Beautiful Pizza this Weds between 6 and 7pm for tasty beverages and big, fat hippy pizza. It's A Beautiful Pizza 3342 SE Belmont St, Portland, OR 97214 Map: http://snurl.com/xhn 2. At 7, we'll traipse across the street to the Avalon and play some games. It will cost you $2.25 in admission to get in so don't forget to bring cash for admission and games! Wunderland Avalon 3451 SE Belmont Portland OR, 97214 Map: http://snurl.com/xhf See you there! Joshua PS Warning: once you're inside the Avalon, there is *NO READMITTANCE*. You go in; you stay in. If you leave, they'll make you pay another $2.25 to get back in. From perl at sonofhans.net Mon Mar 10 14:33:54 2003 From: perl at sonofhans.net (Randall Hansen) Date: Mon Aug 2 21:34:18 2004 Subject: [Pdx-pm] March Meeting In-Reply-To: <20030310195519.GE18755@eli.net> Message-ID: > The people have spoken. This month's meeting ... will not be televised : http://pdx.pm.org/ r From jkeroes at eli.net Mon Mar 10 14:38:21 2003 From: jkeroes at eli.net (Joshua Keroes) Date: Mon Aug 2 21:34:18 2004 Subject: [Pdx-pm] March Meeting In-Reply-To: References: <20030310195519.GE18755@eli.net> Message-ID: <20030310203821.GJ18755@eli.net> On (Mon, Mar 10 12:33), Randall Hansen wrote: > > The people have spoken. This month's meeting ... > > will not be televised : http://pdx.pm.org/ Hrm, pdx.pm.org has the last month's stuff; portland.pm.org has the new. Virtual server issue maybe? -J From perl at sonofhans.net Mon Mar 10 14:46:16 2003 From: perl at sonofhans.net (Randall Hansen) Date: Mon Aug 2 21:34:18 2004 Subject: [Pdx-pm] March Meeting In-Reply-To: <20030310203821.GJ18755@eli.net> Message-ID: Quoth Joshua: > Hrm, pdx.pm.org has the last month's stuff ... Virtual server issue maybe? browser cache maybe? i just checked http://pdx.pm.org from a remote machine and it's updated. but the first time i checked it while updating i had to force refresh. maybe we (i.e. christian) should expire the pages sooner. r From jkeroes at eli.net Mon Mar 10 16:55:25 2003 From: jkeroes at eli.net (Joshua Keroes) Date: Mon Aug 2 21:34:18 2004 Subject: [Pdx-pm] O'Reilly Books Message-ID: <20030310225525.GP27035@eli.net> To those who ordered O'Reilly books: FYI: I have received everybody's book wishlists and cash. The list has been forwarded on to Randal. -Joshua From Fabio45K at netscape.net Tue Mar 11 19:12:07 2003 From: Fabio45K at netscape.net (Fabio45K@netscape.net) Date: Mon Aug 2 21:34:18 2004 Subject: [Pdx-pm] sharing threads Message-ID: <069936DB.4FA6FA60.00707BF5@netscape.net> have any of you guys ever used threading? if so, do you know how to go about sharing a scalar variable among the threads? __________________________________________________________________ Try AOL and get 1045 hours FREE for 45 days! http://free.aol.com/tryaolfree/index.adp?375380 Get AOL Instant Messenger 5.1 for FREE! Download Now! http://aim.aol.com/aimnew/Aim/register.adp?promos=380455 From chromatic at wgz.org Tue Mar 11 19:21:47 2003 From: chromatic at wgz.org (chromatic) Date: Mon Aug 2 21:34:18 2004 Subject: [Pdx-pm] sharing threads In-Reply-To: <069936DB.4FA6FA60.00707BF5@netscape.net> References: <069936DB.4FA6FA60.00707BF5@netscape.net> Message-ID: <200303111721.47824.chromatic@wgz.org> On Tuesday 11 March 2003 17:12, Fabio45K@netscape.net wrote: > have any of you guys ever used threading? if so, do you know how to go > about sharing a scalar variable among the threads? Provided you have a Perl 5.8 compiled with ithreads, see threads::shared: use threads; use threads::shared; my $var : shared; (shamelessly stolen from the synopsis of that module) -- c From perl-pm at joshheumann.com Tue Mar 11 19:52:55 2003 From: perl-pm at joshheumann.com (perl-pm) Date: Mon Aug 2 21:34:18 2004 Subject: [Pdx-pm] php for perl programmers Message-ID: <34330.66.167.137.93.1047433975.squirrel@www.joshheumann.com> I need to learn php quickly. Every time I've played with it, it's looked remarkably similar to perl, but I'm finding a few things that are really weird. Does anyone know of any good resources for perl programmers wanting to learn php? Josh _______________________________ Hey, two dot coms worth a look: http://www.joshheumann.com and http://www.viewfrommywindow.com From Fabio45K at netscape.net Tue Mar 11 20:49:14 2003 From: Fabio45K at netscape.net (Fabio45K@netscape.net) Date: Mon Aug 2 21:34:18 2004 Subject: [Pdx-pm] (no subject) Message-ID: <1BB9A85F.22AD745D.00707BF5@netscape.net> maybe you guys can help with this, here is some code i wrote for a server that i want to multithread, but i also want each client to be able to communicate. so i thought that sharing the $client variable would make it global to all threads and be able to have communication between threads, here is the code. #!/usr/bin/perl use strict; use threads; #using threads instead of fork! use threads::shared; use IO::Socket::INET; $| ++; #making the socket and server my $listener = IO::Socket::INET->new ( LocalPort => 1337, Listen => 5, Reuse => 1 ) || die "Cannot create socket\n"; warn "server up and ready for connections...... \n"; my $client : shared; my $client_num : shared; my $client_num = 0; lock $client; #create the threads while (1) { my $client = $listener->accept; threads->create(\&start_thread, $client, ++ $client_num); } sub start_thread { my @grab; my ($client, $client_num) = @_; print "thread created for client $client_num\n"; push @grab, $client; print @grab; print $client "Welcome to the Kamran's Test server! \n"; &begin; return; } sub begin { while(my $line = <$client>){ print $line; print $client $line; } } __________________________________________________________________ Try AOL and get 1045 hours FREE for 45 days! http://free.aol.com/tryaolfree/index.adp?375380 Get AOL Instant Messenger 5.1 for FREE! Download Now! http://aim.aol.com/aimnew/Aim/register.adp?promos=380455 From schwern at pobox.com Wed Mar 12 06:10:37 2003 From: schwern at pobox.com (schwern@pobox.com) Date: Mon Aug 2 21:34:18 2004 Subject: [Pdx-pm] php for perl programmers In-Reply-To: <34330.66.167.137.93.1047433975.squirrel@www.joshheumann.com>; from perl-pm@joshheumann.com on Tue, Mar 11, 2003 at 05:52:55PM -0800 References: <34330.66.167.137.93.1047433975.squirrel@www.joshheumann.com> Message-ID: <20030312041037.L26610@ttul.org> On Tue, Mar 11, 2003 at 05:52:55PM -0800, perl-pm wrote: > I need to learn php quickly. Every time I've played with it, it's looked > remarkably similar to perl, but I'm finding a few things that are really > weird. Does anyone know of any good resources for perl programmers wanting > to learn php? Brigitte Jellinek gave a nice talk at the German Perl Workshop about the differences between PHP and Perl (mostly what PHP gets wrong) entitled "PHP - Eine Ann?aherung". As you may have guessed, its in German. If you happen to read German, I have a copy of the GPW proceedings you could borrow. Even if you don't read German (I don't) you can get quite a lot from looking at the code comparisons. From perl-pm at joshheumann.com Wed Mar 12 12:39:45 2003 From: perl-pm at joshheumann.com (Josh Heumann) Date: Mon Aug 2 21:34:18 2004 Subject: [Pdx-pm] php for perl programmers In-Reply-To: <20030312041037.L26610@ttul.org> References: <20030312041037.L26610@ttul.org> Message-ID: <32798.68.165.76.242.1047494385.squirrel@www.joshheumann.com> > Brigitte Jellinek gave a nice talk at the German Perl Workshop about > the differences between PHP and Perl (mostly what PHP gets wrong) > entitled "PHP - Eine Ann?aherung". As you may have guessed, its in > German. If you happen to read German, I have a copy of the GPW > proceedings you could borrow. Even if you don't read German (I don't) > you can get quite a lot from looking at the code comparisons. I don't know German, but the code samples would be nice. If anyone else wants them (anyone? Beuller?), go ahead and post them to the list. Otherwise, just send them straight to me. Thanks, Schwern. Josh _______________________________ Hey, two dot coms worth a look: http://www.joshheumann.com and http://www.viewfrommywindow.com From jkeroes at eli.net Wed Mar 12 14:23:01 2003 From: jkeroes at eli.net (Joshua Keroes) Date: Mon Aug 2 21:34:18 2004 Subject: [Pdx-pm] March Meeting - TONIGHT Message-ID: <20030312202300.GJ1816@eli.net> Reminder: this is *tonight*. See you there! -J --- The people have spoken. This month's meeting will be at... ...drum roll please... [badda-drumma-bomma-badda-badda] ...The Wunderland Avalon! < http://www.wunderlandgames.com/ > The Avalon has lots of games for a nickel; some less, some more. They have pinball, ski-ball, videogames, maybe some pool tables, probably air hockey, etc. Want to come? Follow these Quik-n-EZ In-struc-ti-on-es: 1. Meet at It's a Beautiful Pizza this Weds between 6 and 7pm for tasty beverages and big, fat hippy pizza. It's A Beautiful Pizza 3342 SE Belmont St, Portland, OR 97214 Map: http://snurl.com/xhn 2. At 7, we'll traipse across the street to the Avalon and play some games. It will cost you $2.25 in admission to get in so don't forget to bring cash for admission and games! Wunderland Avalon 3451 SE Belmont Portland OR, 97214 Map: http://snurl.com/xhf See you there! Joshua PS Warning: once you're inside the Avalon, there is *NO READMITTANCE*. You go in; you stay in. If you leave, they'll make you pay another $2.25 to get back in. ----- End forwarded message ----- From schwern at pobox.com Wed Mar 12 14:58:09 2003 From: schwern at pobox.com (schwern@pobox.com) Date: Mon Aug 2 21:34:18 2004 Subject: [Pdx-pm] php for perl programmers In-Reply-To: <32798.68.165.76.242.1047494385.squirrel@www.joshheumann.com>; from perl-pm@joshheumann.com on Wed, Mar 12, 2003 at 10:39:45AM -0800 References: <20030312041037.L26610@ttul.org> <32798.68.165.76.242.1047494385.squirrel@www.joshheumann.com> Message-ID: <20030312125809.A922@ttul.org> On Wed, Mar 12, 2003 at 10:39:45AM -0800, Josh Heumann wrote: > > Brigitte Jellinek gave a nice talk at the German Perl Workshop about > > the differences between PHP and Perl (mostly what PHP gets wrong) > > entitled "PHP - Eine Ann?aherung". As you may have guessed, its in > > German. If you happen to read German, I have a copy of the GPW > > proceedings you could borrow. Even if you don't read German (I don't) > > you can get quite a lot from looking at the code comparisons. > > I don't know German, but the code samples would be nice. If anyone else > wants them (anyone? Beuller?), go ahead and post them to the list. > Otherwise, just send them straight to me. Thanks, Schwern Ok, we've got to get together to swap games anyway. I found it quite funny watching the talk. Even though I couldn't understand what was being said I found that if I simply assumed that the PHP code would work in the worst way possible I'd be able to follow along. From poec at yahoo.com Wed Mar 12 15:07:51 2003 From: poec at yahoo.com (Ovid) Date: Mon Aug 2 21:34:18 2004 Subject: [Pdx-pm] php for perl programmers In-Reply-To: <20030312125809.A922@ttul.org> Message-ID: <20030312210751.88285.qmail@web40402.mail.yahoo.com> --- schwern@pobox.com wrote: > I found it quite funny watching the talk. Even though I couldn't > understand what was being said I found that if I simply assumed that > the PHP code would work in the worst way possible I'd be able to follow > along. That reminds me of an Amsterdam.pm meeting I was at. The person leading the talk asked if there was anyone in the room who didn't speak Dutch. Of course, he asked the question in Dutch. Cheers, Ovid ===== "Ovid" on http://www.perlmonks.org/ Web Programming with Perl: http://users.easystreet.com/ovid/cgi_course/ Silence Is Evil: http://users.easystreet.com/ovid/philosophy/decency.txt __________________________________________________ Do you Yahoo!? Yahoo! Web Hosting - establish your business online http://webhosting.yahoo.com From kyle_hayes at speakeasy.net Wed Mar 12 22:46:06 2003 From: kyle_hayes at speakeasy.net (Kyle Hayes) Date: Mon Aug 2 21:34:18 2004 Subject: [Pdx-pm] php for perl programmers In-Reply-To: <20030312210751.88285.qmail@web40402.mail.yahoo.com> References: <20030312210751.88285.qmail@web40402.mail.yahoo.com> Message-ID: <200303122046.06310.kyle_hayes@speakeasy.net> On Wednesday March 12, 2003 13:07, Ovid wrote: > --- schwern@pobox.com wrote: > > I found it quite funny watching the talk. Even though I couldn't > > understand what was being said I found that if I simply assumed that > > the PHP code would work in the worst way possible I'd be able to > > follow along. > > That reminds me of an Amsterdam.pm meeting I was at. The person leading > the talk asked if there was anyone in the room who didn't speak Dutch. > Of course, he asked the question in Dutch. En, waarom niet? Nederlands is een goede taal! Groetjes, Kyle From chiller at eldorado.elsewhere.org Mon Mar 17 17:01:01 2003 From: chiller at eldorado.elsewhere.org (Christopher M. Hiller) Date: Mon Aug 2 21:34:18 2004 Subject: [Pdx-pm] DBD::Oracle error Message-ID: Hi, I was wondering if someone here could give me a hand with this problem. I have searched google, google groups and PerlMonks and have not found anything worthwhile. Here is some working code, albeit really slow: ---snip--- _walk($root); sub _walk { my $root = shift; my $sql = qq{ SELECT prodcat_cd_for, prodcat_cd_in FROM prod_cat_cmpnts WHERE prodcat_cd_for = :p_cat }; my $sth = $dbh->prepare($sql); $sth->bind_param(':p_cat', $root); $sth->execute; while (my @row = $sth->fetchrow_array()) { print "$row[1]\n"; _walk($row[1]); } } ---snip--- Here is what I'd like to do since I think it'd be quicker: ---snip--- my $sql = qq{ SELECT prodcat_cd_for, prodcat_cd_in FROM prod_cat_cmpnts WHERE prodcat_cd_for = :p_cat }; my $sth = $dbh->prepare($sql); _walk($root); sub _walk { my $root = shift; $sth->bind_param(':p_cat', $root); $sth->execute; while (my @row = $sth->fetchrow_array()) { print "$row[1]\n"; _walk($row[1]); } } ---snip--- However, Oracle returns the first row of the statement, then freaks: DBD::Oracle::st fetchrow_array failed: ERROR no statement executing (perhaps you need to call execute first) What am I doing wrong? Do I need to prepare() when binding a new parameter every time? Would this really make things quicker? The first one is really quite slow... Thanks for your help, Chris From poec at yahoo.com Mon Mar 17 17:21:24 2003 From: poec at yahoo.com (Ovid) Date: Mon Aug 2 21:34:18 2004 Subject: [Pdx-pm] DBD::Oracle error In-Reply-To: Message-ID: <20030317232124.15970.qmail@web40404.mail.yahoo.com> What it looks like to me is that the first example is quite slow because you're repreparing the SQL every time. The second example doesn't work (this is a guess) because the scope of the statement handle is such that you're trying to prepare a statement handle that you haven't finished. I generally don't prepare statement handles inside of a loop, so I don't get such error messages often. To speed up your first example, try prepare_cashed(). If you pass it the same arguments, it will fetch the statement handle from a cache rather than repreparing it. That's much faster. Also, the ':p_cat' method of specifying a placeholder is less common and not very portable. If you can switch to '?' for a placeholder, I think people would find it easier to read: Also, what are you returning? This function doesn't appear to return anything (or I could just be blind). sub _walk { my $root = shift; my $sql = qq{ SELECT prodcat_cd_for, prodcat_cd_in FROM prod_cat_cmpnts WHERE prodcat_cd_for = ? }; my $sth = $dbh->prepare_cached($sql); $sth->bind_param(1, $root); $sth->execute; while (my @row = $sth->fetchrow_array()) { print "$row[1]\n"; _walk($row[1]); } } Cheers, Ovid --- "Christopher M. Hiller" wrote: > Hi, I was wondering if someone here could give me a hand with this > problem. I have searched google, google groups and PerlMonks and have not > found anything worthwhile. > > Here is some working code, albeit really slow: > > ---snip--- > > _walk($root); > > sub _walk { > my $root = shift; > my $sql = qq{ SELECT prodcat_cd_for, prodcat_cd_in FROM > prod_cat_cmpnts WHERE prodcat_cd_for = :p_cat }; > my $sth = $dbh->prepare($sql); > > $sth->bind_param(':p_cat', $root); > $sth->execute; > > while (my @row = $sth->fetchrow_array()) { > print "$row[1]\n"; > _walk($row[1]); > } > } > > ---snip--- > > Here is what I'd like to do since I think it'd be quicker: > > ---snip--- > > my $sql = qq{ SELECT prodcat_cd_for, prodcat_cd_in FROM prod_cat_cmpnts > WHERE prodcat_cd_for = :p_cat }; > my $sth = $dbh->prepare($sql); > > _walk($root); > > sub _walk { > my $root = shift; > > $sth->bind_param(':p_cat', $root); > $sth->execute; > > while (my @row = $sth->fetchrow_array()) { > print "$row[1]\n"; > _walk($row[1]); > } > } > > ---snip--- > > However, Oracle returns the first row of the statement, then freaks: > > DBD::Oracle::st fetchrow_array failed: ERROR no statement executing > (perhaps you need to call execute first) > > What am I doing wrong? Do I need to prepare() when binding a new > parameter every time? Would this really make things quicker? The first > one is really quite slow... > > Thanks for your help, > Chris > > _______________________________________________ > Pdx-pm-list mailing list > Pdx-pm-list@mail.pm.org > http://mail.pm.org/mailman/listinfo/pdx-pm-list ===== "Ovid" on http://www.perlmonks.org/ Web Programming with Perl: http://users.easystreet.com/ovid/cgi_course/ Silence Is Evil: http://users.easystreet.com/ovid/philosophy/decency.txt __________________________________________________ Do you Yahoo!? Yahoo! Platinum - Watch CBS' NCAA March Madness, live on your desktop! http://platinum.yahoo.com From chiller at eldorado.elsewhere.org Mon Mar 17 17:35:53 2003 From: chiller at eldorado.elsewhere.org (Christopher M. Hiller) Date: Mon Aug 2 21:34:18 2004 Subject: [Pdx-pm] DBD::Oracle error In-Reply-To: <20030317232124.15970.qmail@web40404.mail.yahoo.com> Message-ID: Ovid _walk() doesn't return anything, it just prints out a bunch of stuff--I trimmed a lot of it out, instead it prints a HTML heirarchy of the data using
    's. I like to use the ':foo' method for placeholders if I end up using many placeholders (referring to them by # can be confusing) or if I want to use a placeholder more than once in my query. But otherwise I would use ?, I guess I am just used to it... I am trying to use prepare_cached() and get the following errors: .prepare_cached( SELECT prodcat_cd_for, prodcat_cd_in FROM arestab.prod_cat_cmpnts WHERE prodcat_cd_for = :p_cat ) statement handle DBI::st=HASH(0x8260104) was still active at cat_tree.pl line 56 DBD::Oracle::st fetchrow_array failed: ERROR no statement executing (perhaps you need to call execute first) at cat_tree.pl line 62. So I looked at the docs, and tried to make a call to $sth->prepare_cached($sql, undef, 1) (and likewise '2' for the third param) which just gives me the original error I complained about! This is using the code with the $sth definition inside of my subroutine. Ugh, I have always tried to keep what I'm doing with DBI very straightforward and I don't have that great of a grasp of what is *really* going on behind the scenes... Thanks, Chris On Mon, 17 Mar 2003, Ovid wrote: > What it looks like to me is that the first example is quite slow because you're repreparing the > SQL every time. The second example doesn't work (this is a guess) because the scope of the > statement handle is such that you're trying to prepare a statement handle that you haven't > finished. I generally don't prepare statement handles inside of a loop, so I don't get such error > messages often. To speed up your first example, try prepare_cashed(). If you pass it the same > arguments, it will fetch the statement handle from a cache rather than repreparing it. That's > much faster. > > Also, the ':p_cat' method of specifying a placeholder is less common and not very portable. If > you can switch to '?' for a placeholder, I think people would find it easier to read: > > Also, what are you returning? This function doesn't appear to return anything (or I could just be > blind). > > sub _walk { > my $root = shift; > my $sql = qq{ > SELECT prodcat_cd_for, prodcat_cd_in > FROM prod_cat_cmpnts > WHERE prodcat_cd_for = ? > }; > my $sth = $dbh->prepare_cached($sql); > $sth->bind_param(1, $root); > $sth->execute; > > while (my @row = $sth->fetchrow_array()) { > print "$row[1]\n"; > _walk($row[1]); > } > } From poec at yahoo.com Mon Mar 17 18:47:48 2003 From: poec at yahoo.com (Ovid) Date: Mon Aug 2 21:34:18 2004 Subject: [Pdx-pm] DBD::Oracle error In-Reply-To: Message-ID: <20030318004748.56491.qmail@web40408.mail.yahoo.com> --- "Christopher M. Hiller" wrote: > Ovid > > _walk() doesn't return anything, it just prints out a bunch of stuff--I > trimmed a lot of it out, instead it prints a HTML heirarchy of the data > using
      's. > > I like to use the ':foo' method for placeholders if I end up using many > placeholders (referring to them by # can be confusing) or if I want to use > a placeholder more than once in my query. But otherwise I would use ?, I > guess I am just used to it... > > I am trying to use prepare_cached() and get the following errors: > > .prepare_cached( SELECT prodcat_cd_for, prodcat_cd_in FROM > arestab.prod_cat_cmpnts WHERE prodcat_cd_for = :p_cat ) statement handle > DBI::st=HASH(0x8260104) was still active at cat_tree.pl line 56 > DBD::Oracle::st fetchrow_array failed: ERROR no statement executing > (perhaps you need to call execute first) at cat_tree.pl line 62. Okay, I feel very, very stupid. You should move the prepare outside of the recursive function. I just wasn't thinking. Cache the results of your select and then iterate over them to get subsequent results. Warning: you'll get a deep recursion error if prodcat_cd_in ever points back to a prodcat_cd_for value. my $sql = qq{ SELECT prodcat_cd_for, prodcat_cd_in FROM prod_cat_cmpnts WHERE prodcat_cd_for = ? }; my $sth = $dbh->prepare($sql); _walk($sth, 1); sub _walk { my ($sth,$root) = @_; $sth->execute($root); my @cd_in_vals; while (my @row = $sth->fetchrow_array()) { push @cd_in_vals => $row[1]; } foreach my $new_root (@cd_in_vals) { print "$new_root\n"; _walk($sth,$new_root); } } ===== "Ovid" on http://www.perlmonks.org/ Web Programming with Perl: http://users.easystreet.com/ovid/cgi_course/ Silence Is Evil: http://users.easystreet.com/ovid/philosophy/decency.txt __________________________________________________ Do you Yahoo!? Yahoo! Platinum - Watch CBS' NCAA March Madness, live on your desktop! http://platinum.yahoo.com From jkeroes at eli.net Tue Mar 18 01:25:30 2003 From: jkeroes at eli.net (Joshua Keroes) Date: Mon Aug 2 21:34:18 2004 Subject: [Pdx-pm] Tech Talks Message-ID: <20030318072529.GD20296@eli.net> Got ideas for a talk? Thought about a good one at the last meeting? I heard some good ones there and I'm sure we have plenty more out there. Send me your half-thought-out thoughts, your ideas awaiting fruition, your caffeinated carbonated full-bore carbureted [wait, bore?] lectures; your... future pdx.pm meetings. Yrs, Joshua PS Seriously, even if we talked at the last meeting, send me a note. I was under the weather all last week and a touch beer-addled for good measure. From nick2canz at yahoo.com Tue Mar 18 12:32:29 2003 From: nick2canz at yahoo.com (Nick Wehr) Date: Mon Aug 2 21:34:18 2004 Subject: [Pdx-pm] Perl and XS Message-ID: <20030318183229.39515.qmail@web10802.mail.yahoo.com> I've got a topic for conversation for you Perl Wizards out there. I'm interested in XS and what it can do for me. Have any of you wrote an XS extention? What was the motivation? Why did you choose the C library that you did? Say I wanted to make an extention for sockets. Where would I start? What documentation would I need to program it correctly. Where would I get those docs? Is it practical to use? I assume you have to build it, is that ever a problem? Any information from anyone would be appreciated. Thanks a bunch. -Nick __________________________________________________ Do you Yahoo!? Yahoo! Platinum - Watch CBS' NCAA March Madness, live on your desktop! http://platinum.yahoo.com From clapp at netscum.com Tue Mar 18 12:51:56 2003 From: clapp at netscum.com (Andrew S. Clapp) Date: Mon Aug 2 21:34:18 2004 Subject: [Pdx-pm] Perl and XS Message-ID: <200303181851.h2IIpus29059@meta.netscum.com> > I've got a topic for conversation for you Perl Wizards > out there. I'm interested in XS and what it can do for It will allow you to speed up something that is easily done in C, but less obviously done in perl. You could say, pass something out to C for heavy-heavy bit shifting, and get back the result. > me. Have any of you wrote an XS extention? What was > the motivation? Why did you choose the C library that The motivation though, was to pass data back and forth between apache's C API and perl talking to Oracle. We used SWIG, www.swig.org, but I believe XS has passed it since then as far as perl is concerned. > you did? Say I wanted to make an extention for > sockets. Where would I start? What documentation > would I need to program it correctly. Where would I > get those docs? Is it practical to use? I assume you > have to build it, is that ever a problem? Any > information from anyone would be appreciated. Thanks a > bunch. -Nick I don't suppose I follow you now. What's wrong with use Socket; ? -ASC Andrew S. Clapp - clapp at netscum dot com "Yes, I'd like a half order of magnitude and a side of PI, please?" From ingy at ttul.org Tue Mar 18 13:08:50 2003 From: ingy at ttul.org (Brian Ingerson) Date: Mon Aug 2 21:34:19 2004 Subject: [Pdx-pm] Perl and XS In-Reply-To: <20030318183229.39515.qmail@web10802.mail.yahoo.com>; from nick2canz@yahoo.com on Tue, Mar 18, 2003 at 10:32:29AM -0800 References: <20030318183229.39515.qmail@web10802.mail.yahoo.com> Message-ID: <20030318110850.A28089@ttul.org> On 18/03/03 10:32 -0800, Nick Wehr wrote: > I've got a topic for conversation for you Perl Wizards > out there. I'm interested in XS and what it can do for > me. Have any of you wrote an XS extention? What was > the motivation? Why did you choose the C library that > you did? Say I wanted to make an extention for > sockets. Where would I start? What documentation > would I need to program it correctly. Where would I > get those docs? Is it practical to use? I assume you > have to build it, is that ever a problem? Any > information from anyone would be appreciated. Thanks a > bunch. -Nick Have you tried the "Inline" module? Cheers, Brian From merlyn at stonehenge.com Tue Mar 18 13:10:01 2003 From: merlyn at stonehenge.com (Randal L. Schwartz) Date: Mon Aug 2 21:34:19 2004 Subject: [Pdx-pm] Perl and XS In-Reply-To: <20030318183229.39515.qmail@web10802.mail.yahoo.com> References: <20030318183229.39515.qmail@web10802.mail.yahoo.com> Message-ID: <86wuiw4hkm.fsf@red.stonehenge.com> >>>>> "Nick" == Nick Wehr writes: Nick> I've got a topic for conversation for you Perl Wizards Nick> out there. I'm interested in XS and what it can do for Nick> me. Have any of you wrote an XS extention? What was Nick> the motivation? Why did you choose the C library that Nick> you did? Say I wanted to make an extention for Nick> sockets. Where would I start? What documentation Nick> would I need to program it correctly. Where would I Nick> get those docs? Is it practical to use? I assume you Nick> have to build it, is that ever a problem? Any Nick> information from anyone would be appreciated. Thanks a Nick> bunch. -Nick I find Inline::C to be far more penetrable than XS. I have an article referencing Inline::C at . -- Randal L. Schwartz - Stonehenge Consulting Services, Inc. - +1 503 777 0095 Perl/Unix/security consulting, Technical writing, Comedy, etc. etc. See PerlTraining.Stonehenge.com for onsite and open-enrollment Perl training! From cp at onsitetech.com Tue Mar 18 13:31:14 2003 From: cp at onsitetech.com (Curtis Poe) Date: Mon Aug 2 21:34:19 2004 Subject: [Pdx-pm] Perl and XS References: <20030318183229.39515.qmail@web10802.mail.yahoo.com> <20030318110850.A28089@ttul.org> Message-ID: <000e01c2ed84$f0d6cc30$1f01a8c0@ot.onsitetech.com> ----- Original Message ----- From: "Brian Ingerson" > > Have you tried the "Inline" module? I also have a short Inline program, "The Ovidian Transform" (the title's a joke, I might add) at http://www.perlmonks.org/index.pl?node_id=135353 Cheers, Ovid From dora.raymaker at xo.com Tue Mar 18 14:49:11 2003 From: dora.raymaker at xo.com (Raymaker, Dora) Date: Mon Aug 2 21:34:19 2004 Subject: [Pdx-pm] PP Meeting cancelled this week Message-ID: <9A0E9E976A6EBC4299764038209E49833C1915@ILCHICVEXC002.mail.inthosts.net> Hello, I can't make it to the next Pragmatic Programmers meeting this Thursday and Mark is on vacation in New York, so there's no one to open the conference room. We'll meet the following week 27 March. Email me back if you have any questions dora.raymaker@xo.com , lady_d@attbi.com . -D. -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mail.pm.org/pipermail/pdx-pm-list/attachments/20030318/f607ec42/attachment.htm From nick2canz at yahoo.com Wed Mar 19 14:29:16 2003 From: nick2canz at yahoo.com (Nick Wehr) Date: Mon Aug 2 21:34:19 2004 Subject: [Pdx-pm] RE:Perl & XS Message-ID: <20030319202916.57266.qmail@web10801.mail.yahoo.com> Until yesterday, I hadn't heard of the Inline:: module. Thanks people. Now, I've studied C, but I never found just a library reference. How can I find out what libraries are available, and what their functions do? I'm really used to the CPAN and was wondering why there isn't a C counterpart. Am I just totally missing it? Is it right there in front of my eyes? Thanks. -nick __________________________________________________ Do you Yahoo!? Yahoo! Platinum - Watch CBS' NCAA March Madness, live on your desktop! http://platinum.yahoo.com From joe at oppegaard.net Wed Mar 19 15:27:54 2003 From: joe at oppegaard.net (Joe Oppegaard) Date: Mon Aug 2 21:34:19 2004 Subject: [Pdx-pm] RE:Perl & XS In-Reply-To: <20030319202916.57266.qmail@web10801.mail.yahoo.com> References: <20030319202916.57266.qmail@web10801.mail.yahoo.com> Message-ID: On Wed, 19 Mar 2003, Nick Wehr wrote: > Date: Wed, 19 Mar 2003 12:29:16 -0800 (PST) > From: Nick Wehr > To: pdx-pm-list@mail.pm.org > Subject: [Pdx-pm] RE:Perl & XS > > Until yesterday, I hadn't heard of the Inline:: module. > Thanks people. Now, I've studied C, but I never found > just a library reference. How can I find out what > libraries are available, and what their functions do? > I'm really used to the CPAN and was wondering why there > isn't a C counterpart. Am I just totally missing it? > Is it right there in front of my eyes? Thanks. > Funny you should bring that up. Where's Ingy? :) ___ Joe Oppegaard From schwern at pobox.com Wed Mar 19 15:25:25 2003 From: schwern at pobox.com (Michael G Schwern) Date: Mon Aug 2 21:34:19 2004 Subject: [Pdx-pm] RE:Perl & XS In-Reply-To: <20030319202916.57266.qmail@web10801.mail.yahoo.com> References: <20030319202916.57266.qmail@web10801.mail.yahoo.com> Message-ID: <20030319212525.GF12731@windhund.schwern.org> On Wed, Mar 19, 2003 at 12:29:16PM -0800, Nick Wehr wrote: > Until yesterday, I hadn't heard of the Inline:: module. > Thanks people. Now, I've studied C, but I never found > just a library reference. How can I find out what > libraries are available, and what their functions do? > I'm really used to the CPAN and was wondering why there > isn't a C counterpart. Am I just totally missing it? > Is it right there in front of my eyes? Thanks. Alas, no CPAN for C. There's the standard ANSI C libraries, POSIX and then Everything Else. A good source is to look through Debian's available library packages. -- ...and that, children, is how to clean and load a .38 revolver. Questions? From joe at oppegaard.net Wed Mar 19 15:44:07 2003 From: joe at oppegaard.net (Joe Oppegaard) Date: Mon Aug 2 21:34:19 2004 Subject: [Pdx-pm] RE:Perl & XS In-Reply-To: References: <20030319202916.57266.qmail@web10801.mail.yahoo.com> Message-ID: > > > Until yesterday, I hadn't heard of the Inline:: module. > > Thanks people. Now, I've studied C, but I never found > > just a library reference. How can I find out what > > libraries are available, and what their functions do? > > I'm really used to the CPAN and was wondering why there > > isn't a C counterpart. Am I just totally missing it? > > Is it right there in front of my eyes? Thanks. > > > > Funny you should bring that up. Where's Ingy? :) > While being cryptic above was fun: See the in development, though very exciting FreePAN: http://freepan.org ___ Joe Oppegaard From poec at yahoo.com Wed Mar 19 18:55:52 2003 From: poec at yahoo.com (Ovid) Date: Mon Aug 2 21:34:19 2004 Subject: [Pdx-pm] Tech Talks In-Reply-To: <20030318072529.GD20296@eli.net> Message-ID: <20030320005552.49949.qmail@web40409.mail.yahoo.com> --- Joshua Keroes wrote: > Got ideas for a talk? Thought about a good one at the last meeting? > I heard some good ones there and I'm sure we have plenty more out > there. > > Send me your half-thought-out thoughts, your ideas awaiting fruition, > your caffeinated carbonated full-bore carbureted [wait, bore?] lectures; > your... future pdx.pm meetings. Okay, I'm a blithering idiot (no surprise there, eh?), but I'll take the bait. If you don't have anything lined up, I'll commit to throwing together my talk: =head1 NAME use strict 'sql'; =head1 SYNOPSIS my $sql = 'SELECT *' and die "Don't do that!"; my $data = $sth->fetchrow_hashref and die "Or that!"; my $sql = 'SELECT this FROM that' and die "Still bad"; use base 'Class::DBI'; # much better =head1 OVERVIEW Many people misuse SQL. While some of the above can be fine for a short script, we should be careful about how SQL is used in a production environment. C will detail why the above constructs can lead to non-scalable code. First, we'll show some examples of bad SQL and then move on to better SQL with bad implementations (hint: I don't avoid C<&DBI::fetchrow_hashref> for performance reasons). We'll finish with a quick discussion of how object persistence modules can help lead us lead us out of the quagmire. =head1 NOTE I'll primarily focus on C for the object persistence, but I'll touch on some of the other OO Persistence modules such as Tangram and Alzabo. I'll also discuss what I think is a bit of a design issue with C (sorry Schwern!) and, by the end of the talk, you'll understand why I feel that way. Side note: despite the design issue I alluded to, C rocks! Joe Bob says "check it out!" =cut Cheers, Ovid ===== "Ovid" on http://www.perlmonks.org/ Web Programming with Perl: http://users.easystreet.com/ovid/cgi_course/ Silence Is Evil: http://users.easystreet.com/ovid/philosophy/decency.txt __________________________________________________ Do you Yahoo!? Yahoo! Platinum - Watch CBS' NCAA March Madness, live on your desktop! http://platinum.yahoo.com From ingy at ttul.org Wed Mar 19 19:28:29 2003 From: ingy at ttul.org (Brian Ingerson) Date: Mon Aug 2 21:34:19 2004 Subject: [Pdx-pm] RE:Perl & XS In-Reply-To: ; from joe@oppegaard.net on Wed, Mar 19, 2003 at 01:44:07PM -0800 References: <20030319202916.57266.qmail@web10801.mail.yahoo.com> Message-ID: <20030319172829.A12019@ttul.org> On 19/03/03 13:44 -0800, Joe Oppegaard wrote: > > > > > Until yesterday, I hadn't heard of the Inline:: module. > > > Thanks people. Now, I've studied C, but I never found > > > just a library reference. How can I find out what > > > libraries are available, and what their functions do? > > > I'm really used to the CPAN and was wondering why there > > > isn't a C counterpart. Am I just totally missing it? > > > Is it right there in front of my eyes? Thanks. > > > > > > > Funny you should bring that up. Where's Ingy? :) > > > > While being cryptic above was fun: > > See the in development, though very exciting FreePAN: > http://freepan.org FreePAN should definitely be extended to C. I think it require a little bit of design, but I'd really like to see it. It would be great to have a repository of C "modules", and I think it would be a great resource for people learning how to create sharable C libraries. Cheers, Brian From nforrett at wgz.com Wed Mar 19 21:19:49 2003 From: nforrett at wgz.com (forehead) Date: Mon Aug 2 21:34:19 2004 Subject: [Pdx-pm] RE:Perl & XS In-Reply-To: <20030319172829.A12019@ttul.org> Message-ID: On Wed, 19 Mar 2003, Brian Ingerson wrote: > On 19/03/03 13:44 -0800, Joe Oppegaard wrote: > > > > > > > Until yesterday, I hadn't heard of the Inline:: module. > > > > Thanks people. Now, I've studied C, but I never found > > > > just a library reference. How can I find out what > > > > libraries are available, and what their functions do? > > > > I'm really used to the CPAN and was wondering why there > > > > isn't a C counterpart. Am I just totally missing it? > > > > Is it right there in front of my eyes? Thanks. > > > > > > > > > > Funny you should bring that up. Where's Ingy? :) > > > > > > > While being cryptic above was fun: > > > > See the in development, though very exciting FreePAN: > > http://freepan.org > > FreePAN should definitely be extended to C. I think it require a little > bit of design, but I'd really like to see it. It would be great to have > a repository of C "modules", and I think it would be a great resource > for people learning how to create sharable C libraries. Wow. This is a pretty spiffy idea. It sure wouldn't be easy, though. Unlike Perl, Ruby, or other relatively "pure" languages, you have to deal with dozens of vendors, and decades of cruft and incompatibilities. And that's if you just limit yourself to Unix derivatives. Things get ever so much more interesting if you want to add in Win32, Classic Mac (it's probably safe enough to lump OSX with the *nix crowd), etc. 1. There should probably be a way to select a "module" and have it built from source and installed, or select an appropriate pre-compiled version. 2. There's got to be some fairly standard mechanisim to turn source into a binary. Perhaps auto(conf|make) would be appropriate. But you'd have to be take care that the FreePAN installed stuff either played well with the OS-supplied packages (which would be a virtual impossibility), or store the results in some FreePAN managed directory structure. 3. If the latter, it'd be nice to provide pkg-config like functionality to easily get the appropriate compiler / linker arguments. That'd require tracking dependency information sufficient to ensure that the linker arguments were ordered correctly. -lImlib before -lX11 and all is heaven. -lX11 before -lImlib and all is glib. 4. There are probably a thousand other details I'm missing.... -- Nick I don't have suspenders big enough for *those* disbelief pants. - chromatic From jkeroes at eli.net Thu Mar 27 16:29:02 2003 From: jkeroes at eli.net (Joshua Keroes) Date: Mon Aug 2 21:34:19 2004 Subject: [Pdx-pm] Perl organization Message-ID: <20030327222901.GO16695@eli.net> We're redeploying Perl at our company. Thus far we'll probably install Perl 5.8.0 into /opt/perl580 (and later versions into similar directories). We'll also start using ingy's only module for better testing and fallback support. A proposal about C libraries has also been launched about where to put the C libraries that the Perl modules rely on. This is the currently proposed setup: /opt/perl580 - perl prefix /opt/perl580/_only - only's base directory /opt/perl580/clib - C libraries used by this Perl. What are the pros and cons of putting C libraries under this directory? Would it be better to use a tool like Gnu stow instead? Moreover, is this a Good Idea, a Bad Idea or an Ugly Idea? Thanks, J From jkeroes at eli.net Thu Mar 27 16:33:45 2003 From: jkeroes at eli.net (Joshua Keroes) Date: Mon Aug 2 21:34:19 2004 Subject: [Pdx-pm] Books Are In! Message-ID: <20030327223345.GP16695@eli.net> To those who ordered O'Reilly books: They have arrived. I'll pick them up from Randal tonight and bring them to the next PDX.pm meeting on Weds 9 Apr 2003. If you want them sooner, maybe the lot of us could meet in some suitably lit place with a crowd. -J PS Randal may or may not have asked me to thank-you for your small non-sequentially ordered bills. From schwern at pobox.com Fri Mar 28 02:16:57 2003 From: schwern at pobox.com (Michael G Schwern) Date: Mon Aug 2 21:34:19 2004 Subject: [Pdx-pm] Perl organization In-Reply-To: <20030327222901.GO16695@eli.net> References: <20030327222901.GO16695@eli.net> Message-ID: <20030328081657.GG29966@windhund.schwern.org> On Thu, Mar 27, 2003 at 02:29:02PM -0800, Joshua Keroes wrote: > We're redeploying Perl at our company. Thus far we'll probably install > Perl 5.8.0 into /opt/perl580 (and later versions into similar > directories). We'll also start using ingy's only module for better > testing and fallback support. A proposal about C libraries has > also been launched about where to put the C libraries that the Perl > modules rely on. > > This is the currently proposed setup: > > /opt/perl580 - perl prefix > /opt/perl580/_only - only's base directory > /opt/perl580/clib - C libraries used by this Perl. > > What are the pros and cons of putting C libraries under this directory? > Would it be better to use a tool like Gnu stow instead? Moreover, is > this a Good Idea, a Bad Idea or an Ugly Idea? /opt/perl580/_only should probably be /opt/perl580/version/ or something more descriptive of what its for rather than what generated it. As for /opt/perl580/clib... Pros... can't really think of any. Cons... lots of other things may rely on the same C library (thus, a library) which means you either need two copies installed or have programs linking with /opt/perl580/clib which makes little sense. Probably better to use Stow and let it put links into the proper lib and include directories. Either that or use existing packages from your OS vendor... except that's Sun isn't it? Dunno how hard it is to make your own Solaris package. -- That you be hanged by the neck, but not until you are dead, but that you be taken down again, and whilst you are yet alive, your bowels be taken out and burnt before your face; and that afterwards your head be severed from your body and your body be divided into quarters. And may God Almighty have mercy on your soul. From jkeroes at eli.net Mon Mar 31 16:05:41 2003 From: jkeroes at eli.net (Joshua Keroes) Date: Mon Aug 2 21:34:19 2004 Subject: [Pdx-pm] book pickup Message-ID: <20030331220540.GG9011@eli.net> I'm working at home today. If you'd like to grab your books today give me a ring at 503-892-0123 and I can tell you how to get here. -J From chiller at eldorado.elsewhere.org Mon Mar 31 16:22:29 2003 From: chiller at eldorado.elsewhere.org (Christopher M. Hiller) Date: Mon Aug 2 21:34:19 2004 Subject: [Pdx-pm] book pickup In-Reply-To: <20030331220540.GG9011@eli.net> Message-ID: It's actually a little hectic today ... can we plan something for tomorrow? On Mon, 31 Mar 2003, Joshua Keroes wrote: > I'm working at home today. If you'd like to grab your books today > give me a ring at 503-892-0123 and I can tell you how to get here. > > -J > _______________________________________________ > Pdx-pm-list mailing list > Pdx-pm-list@mail.pm.org > http://mail.pm.org/mailman/listinfo/pdx-pm-list >