From jay at jays.net Wed Dec 1 22:42:08 2004 From: jay at jays.net (Jay Hannah) Date: Wed Dec 1 22:42:17 2004 Subject: [Omaha.pm] Re: Omaha PM In-Reply-To: <20041118173816.GD6598@petdance.com> References: <20041118173816.GD6598@petdance.com> Message-ID: <85E45D2E-441C-11D9-B9A6-000A95E317B8@jays.net> On Nov 18, 2004, at 11:38 AM, Andy Lester wrote: > So how's things in Omaha? Seems like you're a little wanting for > content? :-) Looks like the listserve is running around 25 posts a month. Not too bad. A lot more active than a lot of PM groups! Besides, I like having nice quite listserves on which I can talk to myself about Perl. -grin- > I'm always lookin' for PM groups to speak to. You're only about 8 > hours > from me in McHenry. I'd be glad to come talk to your group. > > See http://petdance.com/resume/ for some of the places I've talked. > > And I used to live in Milford, NE, about 1/2 hour west of Lincoln, so > when I saw you on the PM list, my ears perked up. That would be awesome! We've never had a celebrity speaker, and have only had 1 out-of-state visitor. (errr... unless you count Sioux City IA -grin-). Whenever you're around let me know! The Omaha Linux User Group is pretty active -- meetings are 20-50 people, so I could probably draw some folks off there too. Or we could rent out the new Qwest Center downtown. It seats 17,000 for your keynote. -grin- Which McHenry is yours? We played w/ a lat long thing at the last meeting: 1. McHenry, CA (US): 37n42, 121w0, California 2. McHenry, ID (US): 42n36, 114w03, Idaho 3. McHenry, IL (US): 42n21, 88w16, Illinois 4. McHenry, KY (US): 37n23, 86w55, Kentucky 5. McHenry, MD (US): 39n34, 79w21, Maryland 6. McHenry, MS (US): 30n42, 89w08, Mississippi 7. McHenry, ND (US): 47n35, 98w35, North Dakota 8. McHenry, PA (US): 41n24, 77w28, Pennsylvania 9. McHenry, VA (US): 38n10, 77w42, Virginia 10. McHenry Shores, IL (US): 42n19, 88w15, Illinois Thanks for the offer! Pin a date on me anytime and we'll make it happen! j Omaha.pm From jay at jays.net Wed Dec 1 22:47:23 2004 From: jay at jays.net (Jay Hannah) Date: Wed Dec 1 22:47:31 2004 Subject: [Omaha.pm] Re: Omaha PM In-Reply-To: <85E45D2E-441C-11D9-B9A6-000A95E317B8@jays.net> References: <20041118173816.GD6598@petdance.com> <85E45D2E-441C-11D9-B9A6-000A95E317B8@jays.net> Message-ID: <41E7DCBD-441D-11D9-B9A6-000A95E317B8@jays.net> On Dec 1, 2004, at 10:42 PM, Jay Hannah wrote: > On Nov 18, 2004, at 11:38 AM, Andy Lester wrote: >> So how's things in Omaha? Seems like you're a little wanting for >> content? :-) > > Looks like the listserve is running around 25 posts a month. Not too > bad. A lot more active than a lot of PM groups! Including, for example, Chicago-talk in November!! -nudge!- Grin, j From scott.l.miller at hp.com Thu Dec 2 10:46:06 2004 From: scott.l.miller at hp.com (Miller, Scott L (Omaha Networks)) Date: Thu Dec 2 10:46:10 2004 Subject: [Omaha.pm] Re: Omaha PM Message-ID: <1F7C0C8F4BD7C54A8BC55012FEF3DF6D0302E77E@omaexc11.americas.cpqcorp.net> 8 hours away @ 70 mile/hour average = 560 miles, I'd have to guess Illinois, Kentucky or North Dakota. I'm sure a more accurate distance estimator could be found or written in perl using the lat/long differences between Omaha and the various McHenry's . -Scott -----Original Message----- From: omaha-pm-bounces@mail.pm.org [mailto:omaha-pm-bounces@mail.pm.org]On Behalf Of Jay Hannah Sent: Wednesday, December 01, 2004 10:42 PM To: Andy Lester Cc: omaha-pm@pm.org Subject: [Omaha.pm] Re: Omaha PM On Nov 18, 2004, at 11:38 AM, Andy Lester wrote: > So how's things in Omaha? Seems like you're a little wanting for > content? :-) Looks like the listserve is running around 25 posts a month. Not too bad. A lot more active than a lot of PM groups! Besides, I like having nice quite listserves on which I can talk to myself about Perl. -grin- > I'm always lookin' for PM groups to speak to. You're only about 8 > hours > from me in McHenry. I'd be glad to come talk to your group. > > See http://petdance.com/resume/ for some of the places I've talked. > > And I used to live in Milford, NE, about 1/2 hour west of Lincoln, so > when I saw you on the PM list, my ears perked up. That would be awesome! We've never had a celebrity speaker, and have only had 1 out-of-state visitor. (errr... unless you count Sioux City IA -grin-). Whenever you're around let me know! The Omaha Linux User Group is pretty active -- meetings are 20-50 people, so I could probably draw some folks off there too. Or we could rent out the new Qwest Center downtown. It seats 17,000 for your keynote. -grin- Which McHenry is yours? We played w/ a lat long thing at the last meeting: 1. McHenry, CA (US): 37n42, 121w0, California 2. McHenry, ID (US): 42n36, 114w03, Idaho 3. McHenry, IL (US): 42n21, 88w16, Illinois 4. McHenry, KY (US): 37n23, 86w55, Kentucky 5. McHenry, MD (US): 39n34, 79w21, Maryland 6. McHenry, MS (US): 30n42, 89w08, Mississippi 7. McHenry, ND (US): 47n35, 98w35, North Dakota 8. McHenry, PA (US): 41n24, 77w28, Pennsylvania 9. McHenry, VA (US): 38n10, 77w42, Virginia 10. McHenry Shores, IL (US): 42n19, 88w15, Illinois Thanks for the offer! Pin a date on me anytime and we'll make it happen! j Omaha.pm _______________________________________________ Omaha-pm mailing list Omaha-pm@mail.pm.org http://www.pm.org/mailman/listinfo/omaha-pm From scott.l.miller at hp.com Thu Dec 2 10:46:06 2004 From: scott.l.miller at hp.com (Miller, Scott L (Omaha Networks)) Date: Thu Dec 2 10:46:33 2004 Subject: [Omaha.pm] Re: Omaha PM Message-ID: <1F7C0C8F4BD7C54A8BC55012FEF3DF6D0302E77E@omaexc11.americas.cpqcorp.net> 8 hours away @ 70 mile/hour average = 560 miles, I'd have to guess Illinois, Kentucky or North Dakota. I'm sure a more accurate distance estimator could be found or written in perl using the lat/long differences between Omaha and the various McHenry's . -Scott -----Original Message----- From: omaha-pm-bounces@mail.pm.org [mailto:omaha-pm-bounces@mail.pm.org]On Behalf Of Jay Hannah Sent: Wednesday, December 01, 2004 10:42 PM To: Andy Lester Cc: omaha-pm@pm.org Subject: [Omaha.pm] Re: Omaha PM On Nov 18, 2004, at 11:38 AM, Andy Lester wrote: > So how's things in Omaha? Seems like you're a little wanting for > content? :-) Looks like the listserve is running around 25 posts a month. Not too bad. A lot more active than a lot of PM groups! Besides, I like having nice quite listserves on which I can talk to myself about Perl. -grin- > I'm always lookin' for PM groups to speak to. You're only about 8 > hours > from me in McHenry. I'd be glad to come talk to your group. > > See http://petdance.com/resume/ for some of the places I've talked. > > And I used to live in Milford, NE, about 1/2 hour west of Lincoln, so > when I saw you on the PM list, my ears perked up. That would be awesome! We've never had a celebrity speaker, and have only had 1 out-of-state visitor. (errr... unless you count Sioux City IA -grin-). Whenever you're around let me know! The Omaha Linux User Group is pretty active -- meetings are 20-50 people, so I could probably draw some folks off there too. Or we could rent out the new Qwest Center downtown. It seats 17,000 for your keynote. -grin- Which McHenry is yours? We played w/ a lat long thing at the last meeting: 1. McHenry, CA (US): 37n42, 121w0, California 2. McHenry, ID (US): 42n36, 114w03, Idaho 3. McHenry, IL (US): 42n21, 88w16, Illinois 4. McHenry, KY (US): 37n23, 86w55, Kentucky 5. McHenry, MD (US): 39n34, 79w21, Maryland 6. McHenry, MS (US): 30n42, 89w08, Mississippi 7. McHenry, ND (US): 47n35, 98w35, North Dakota 8. McHenry, PA (US): 41n24, 77w28, Pennsylvania 9. McHenry, VA (US): 38n10, 77w42, Virginia 10. McHenry Shores, IL (US): 42n19, 88w15, Illinois Thanks for the offer! Pin a date on me anytime and we'll make it happen! j Omaha.pm _______________________________________________ Omaha-pm mailing list Omaha-pm@mail.pm.org http://www.pm.org/mailman/listinfo/omaha-pm From cybersean3000 at yahoo.com Thu Dec 2 10:57:01 2004 From: cybersean3000 at yahoo.com (Sean Edwards) Date: Thu Dec 2 10:57:05 2004 Subject: [Omaha.pm] Re: Omaha PM In-Reply-To: <1F7C0C8F4BD7C54A8BC55012FEF3DF6D0302E77E@omaexc11.americas.cpqcorp.net> Message-ID: <20041202165702.27239.qmail@web52604.mail.yahoo.com> The Pritchard's, speakers of last year's PERL cruise, are from Springfield, IL. That is very close to 500 miles exactly from Omaha. 500 miles, PERL, and Illinois . . . yup! This post is right on topic! -=Sean Edwards=- --- "Miller, Scott L (Omaha Networks)" wrote: > 8 hours away @ 70 mile/hour average = 560 miles, I'd > have to guess > Illinois, Kentucky or North Dakota. > > I'm sure a more accurate distance estimator could be > found or > written in perl using the lat/long differences > between Omaha > and the various McHenry's . > > -Scott > > -----Original Message----- > From: omaha-pm-bounces@mail.pm.org > [mailto:omaha-pm-bounces@mail.pm.org]On Behalf Of > Jay Hannah > Sent: Wednesday, December 01, 2004 10:42 PM > To: Andy Lester > Cc: omaha-pm@pm.org > Subject: [Omaha.pm] Re: Omaha PM > > > On Nov 18, 2004, at 11:38 AM, Andy Lester wrote: > > So how's things in Omaha? Seems like you're a > little wanting for > > content? :-) > > Looks like the listserve is running around 25 posts > a month. Not too > bad. A lot more active than a lot of PM groups! > > Besides, I like having nice quite listserves on > which I can talk to > myself about Perl. -grin- > > > I'm always lookin' for PM groups to speak to. > You're only about 8 > > hours > > from me in McHenry. I'd be glad to come talk to > your group. > > > > See http://petdance.com/resume/ for some of the > places I've talked. > > > > And I used to live in Milford, NE, about 1/2 hour > west of Lincoln, so > > when I saw you on the PM list, my ears perked up. > > That would be awesome! We've never had a celebrity > speaker, and have > only had 1 out-of-state visitor. (errr... unless you > count Sioux City > IA -grin-). Whenever you're around let me know! The > Omaha Linux User > Group is pretty active -- meetings are 20-50 people, > so I could > probably draw some folks off there too. > > Or we could rent out the new Qwest Center downtown. > It seats 17,000 for > your keynote. -grin- > > Which McHenry is yours? We played w/ a lat long > thing at the last > meeting: > > 1. McHenry, CA (US): 37n42, 121w0, California > 2. McHenry, ID (US): 42n36, 114w03, Idaho > 3. McHenry, IL (US): 42n21, 88w16, Illinois > 4. McHenry, KY (US): 37n23, 86w55, Kentucky > 5. McHenry, MD (US): 39n34, 79w21, Maryland > 6. McHenry, MS (US): 30n42, 89w08, Mississippi > 7. McHenry, ND (US): 47n35, 98w35, North Dakota > 8. McHenry, PA (US): 41n24, 77w28, Pennsylvania > 9. McHenry, VA (US): 38n10, 77w42, Virginia > 10. McHenry Shores, IL (US): 42n19, 88w15, > Illinois > > Thanks for the offer! Pin a date on me anytime and > we'll make it happen! > > j > Omaha.pm > > _______________________________________________ > Omaha-pm mailing list > Omaha-pm@mail.pm.org > http://www.pm.org/mailman/listinfo/omaha-pm > > _______________________________________________ > Omaha-pm mailing list > Omaha-pm@mail.pm.org > http://www.pm.org/mailman/listinfo/omaha-pm > __________________________________________________ Do You Yahoo!? Tired of spam? Yahoo! Mail has the best spam protection around http://mail.yahoo.com From jhannah at omnihotels.com Thu Dec 2 11:20:44 2004 From: jhannah at omnihotels.com (Jay Hannah) Date: Thu Dec 2 11:20:54 2004 Subject: FW: [Omaha.pm] Re: Omaha PM Message-ID: <200412021720.iB2HKbLe008067@mail-omaha.omnihotels.com> From: Sean Baker [mailto:pbaker@omnihotels.com] > Andy Lester has been a professional programmer for seventeen years and a > Perl evangelist for a decade. By day, he manages programmers for Follett > Library Resources in McHenry, IL. -laugh- Both you and Andy are poo-poo'ing my lat-long lookup toy. -grin- It's not about knowing, its about playing with cool toys! j From andy+omaha at petdance.com Thu Dec 2 11:24:19 2004 From: andy+omaha at petdance.com (Andy Lester) Date: Thu Dec 2 11:24:21 2004 Subject: [Omaha.pm] Re: Omaha PM In-Reply-To: <20041202165702.27239.qmail@web52604.mail.yahoo.com> References: <1F7C0C8F4BD7C54A8BC55012FEF3DF6D0302E77E@omaexc11.americas.cpqcorp.net> <20041202165702.27239.qmail@web52604.mail.yahoo.com> Message-ID: <20041202172419.GA11629@petdance.com> On Thu, Dec 02, 2004 at 08:57:01AM -0800, Sean Edwards (cybersean3000@yahoo.com) wrote: > The Pritchard's, speakers of last year's PERL cruise, > are from Springfield, IL. That is very close to 500 > miles exactly from Omaha. Hey, I'm gonna be on the '05 Perl Whirl, too! http://www.geekcruises.com/top/pw05_top.htm xoa -- Andy Lester => andy@petdance.com => www.petdance.com => AIM:petdance From jay at jays.net Thu Dec 2 15:35:05 2004 From: jay at jays.net (Jay Hannah) Date: Thu Dec 2 15:45:14 2004 Subject: [Omaha.pm] Crypt::Tea Message-ID: <084AF447-44AA-11D9-A29C-000A95E317B8@jays.net> Holy crap! I love Perl, CPAN, and now I also love Peter Billam. -grin- We painted ourselves into a corner on a huge project with a tiny flaw. I thought to myself -- what I really need is some tiny Perl gizmo that would allow me to encrypt an integer, let me hand that off to the web client's browser (into a cookie), and be able to decrypt it when it comes back to the web server. (So they can't jack w/ the integer in their browser.) I had never used such a thing before. 5 minutes on CPAN and I stumbled into Crypt::Tea. http://search.cpan.org/~pjb/Crypt-Tea-2.04/Tea.pm My demo program: ---------------- #!/usr/bin/perl use Crypt::Tea; $key = '18*71^asdj 1$$![&.={[ 0182312m'; my $secret = "My secret! shhh!"; for (1..20) { push @secrets, encrypt($secret, $key); } foreach (@secrets) { print "$_ -> "; print decrypt($_, $key); print "\n"; } Output: -------------- # ./j.pl mgb7NpXEhmY_DcnWFs6_thmm8dEmW2zz -> My secret! shhh! QCOd3vpp6QZjD__c25nJtVlQ_sfT-rMm -> My secret! shhh! eapzrEU30v1y8Lqo53QW6R51y2QVvA2J -> My secret! shhh! WKgMDakGJjofJCPcSmsFTKHLvlsllokc -> My secret! shhh! 0f7NbSdS2yxeZGgLEheeN6tiYYfy-kQy -> My secret! shhh! ECsGzMPflc6WYpZ8RZuiaRE6kyTVMo3Q -> My secret! shhh! 0f7NbSdS2yxeZGgLEheeN5qe-qzfKRjK -> My secret! shhh! -fpqAgj0cvGtT5pj6NArX1h_62f_eB4T -> My secret! shhh! eQaegpDVD6Euz-sCJpJN654pl1ZVNpRZ -> My secret! shhh! rhLplwrT6RYXq-9ihEsWJ3YjH5Wwjb4I -> My secret! shhh! tW-BhTOg0Z7PxxVZ0mYcBBKb0wayuDik -> My secret! shhh! jaNmWK5Wm8kYOHBgu7zvLkKc9wMYsH9G -> My secret! shhh! QW1IuWlaOZ-knID8K3OYmDVqsWiIeMKH -> My secret! shhh! d0H4kiTESeQzceTQ-AHrD3pXUNhCQucw -> My secret! shhh! rhLplwrT6RYXq-9ihEsWJ8YUet7WcQAz -> My secret! shhh! QCOd3vpp6QZjD__c25nJtYTRHuO4pmzY -> My secret! shhh! -1yP8-h9KABP5MBRp7z08euklmL82YUq -> My secret! shhh! 0f7NbSdS2yxeZGgLEheeN0XMOmcdgmbP -> My secret! shhh! GQj85LnrKurqMeqOJ3aUA8btA2aLPpYX -> My secret! shhh! VaM4A7NzxkxCyeJi7F1F3bnsWtq7FMuX -> My secret! shhh! Elapsed time: 30 minutes, including this email. Awesome. I love Perl + CPAN. Thanks Peter! j Omaha Perl Mongers: http://omaha.pm.org From dan at linder.org Fri Dec 3 00:12:48 2004 From: dan at linder.org (Daniel Linder) Date: Fri Dec 3 00:06:30 2004 Subject: [Omaha.pm] Crypt::Tea In-Reply-To: <084AF447-44AA-11D9-A29C-000A95E317B8@jays.net> References: <084AF447-44AA-11D9-A29C-000A95E317B8@jays.net> Message-ID: <33668.12.216.173.10.1102054368.squirrel@12.216.173.10> -----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 > # ./j.pl > mgb7NpXEhmY_DcnWFs6_thmm8dEmW2zz -> My secret! shhh! [...snip...] > VaM4A7NzxkxCyeJi7F1F3bnsWtq7FMuX -> My secret! shhh! > > Elapsed time: 30 minutes, including this email. Ok, it must be getting late. I read that "30 minutes" meaning it took the program 30 minutes to run... :P Ok, up waaaaaayyyy too late hacking Perl... :) Dan - - - - - "I do not fear computer, I fear the lack of them." -- Isaac Asimov -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.2.1 (GNU/Linux) iD8DBQFBsAPgNiBNyqUzGb8RAtY4AJ9JHK0BSe6kKDzEfqcNIKhXm0x2FQCeMXHD XJc9yf3VjmTCy2+nkFtE/4I= =F/+v -----END PGP SIGNATURE----- From jhannah at omnihotels.com Fri Dec 3 07:20:56 2004 From: jhannah at omnihotels.com (Jay Hannah) Date: Fri Dec 3 07:21:19 2004 Subject: [Omaha.pm] || quickie Message-ID: <200412031320.iB3DKuLe020011@mail-omaha.omnihotels.com> Before: my $user_stamp = $ENV{'REMOTE_USER'}; $user_stamp = $ENV{'REMOTE_ADDR'} if (not $user_stamp); After: my $user_stamp = $ENV{'REMOTE_USER'} || $ENV{'REMOTE_ADDR'}; j From jay at jays.net Fri Dec 3 20:14:55 2004 From: jay at jays.net (Jay Hannah) Date: Fri Dec 3 20:15:05 2004 Subject: [Omaha.pm] Fwd: Crypt::Tea Message-ID: <4A045F7E-459A-11D9-B690-000A95E317B8@jays.net> The Man responds... j -------------- From: pjbillam@pjb.com.au Date: December 3, 2004 1:51:03 PM CST To: jay@jays.net Subject: Re: Crypt::Tea Reply-To: pjbillam@pjb.com.au Greetings Jay, great to hear from you, and I'm glad I've been able to be helpful! > We painted ourselves into a corner on a huge project with a tiny flaw. > I thought to myself -- what I really need is some tiny Perl gizmo that > would allow me to encrypt an integer, let me hand that off to the web > client's browser (into a cookie), and be able to decrypt it when it > comes back to the web server. (So they can't jack w/ the integer in > their browser.) I had never used such a thing before. And Crypt::Tea is one of the very few ways of doing it. The hard part about Crypt::Tea is maintaining compatible encryption engines in Perl and in Javascript. Every browser is quirky (in fact there's currently a problem with "Konqueror 5.0 (compatible; Konqueror/3.1; Linux)", though the "3.2" subversion is fine) but Crypt::Tea now runs perfectly on all the major browsers. > 5 minutes on CPAN and I stumbled into Crypt::Tea. > http://search.cpan.org/~pjb/Crypt-Tea-2.04/Tea.pm I maintain an HTML page at http://www.pjb.com.au/comp/tea.html > $key = '18*71^asdj 1$$![&.={[ 0182312m'; my $secret = "My secret! > shhh!"; > for (1..20) { push @secrets, encrypt($secret, $key); } > foreach (@secrets) { print "$_ -> "; print decrypt($_, $key); print > "\n"; } > ... > mgb7NpXEhmY_DcnWFs6_thmm8dEmW2zz -> My secret! shhh! > QCOd3vpp6QZjD__c25nJtVlQ_sfT-rMm -> My secret! shhh! > eapzrEU30v1y8Lqo53QW6R51y2QVvA2J -> My secret! shhh! > WKgMDakGJjofJCPcSmsFTKHLvlsllokc -> My secret! shhh! > ... etc ... The reason why the cyphertext is different every time is that the encryption works on 8-byte blocks, so your plaintext has to be padded out to an 8-byte multiple. This padding is done with random bits so as not to hand the intruder a free known-plaintext attack. > Awesome. I love Perl + CPAN. I love Perl too, because I have yet to meet anything that needs to be done on a computer that Perl can't do. CPAN is a great global community achievement. My main gripe with it arises when every module you need to install has a prerequisite of several other modules, and so on .. So in my modules I've try to minimise dependencies. My favourite among my modules is Term::Clui www.pjb.com.au/comp/clui.html Somewhere on CPAN there is a page where you can vote for modules; when they get enough votes, they get included on the ModuleList and things like that. So if you like Crypt::Tea, feel free to give it a vote :-) Good to hear from you, Regards, Peter Billam Peter Billam www.pjb.com.au pjbillam@pjb.com.au (03) 6278 9410 GPO Box 669, Hobart TAS 7001, Australia. Original compositions made to be played, arrangements of Bach, Schubert, Brahms... Free Music ! From chlo.prog at gmail.com Sat Dec 4 10:16:02 2004 From: chlo.prog at gmail.com (r c) Date: Tue Dec 7 11:48:04 2004 Subject: [Omaha.pm] Re: Omaha-pm Digest, Vol 7, Issue 10 In-Reply-To: <200411221800.iAMI0SD9029666@www.pm.org> References: <200411221800.iAMI0SD9029666@www.pm.org> Message-ID: <5e2006d104120408162bac1162@mail.gmail.com> Here are things I'm having difficulties with. It would be great to cover them at a meeting. I too don't want to send our code around, but would be happy to send it to you (Jay) if it would help give you an idea what it is I'm trying to accomplish? 1. How to handle it when methods call die() (or croak() or ...) without turning my code into line after line of if (...). 2. How to call methods so I can log messages they throw (be it using warn(), Carp, ...). 3. How to write modules that do plenty of logging (for debugging). Log4perl looks really good, however, I don't want to require all programs that call these modules to implement Log4perl just to use the module. Thanks Ron On Mon, 22 Nov 2004 12:00:29 -0600, omaha-pm-request@mail.pm.org wrote: > Send Omaha-pm mailing list submissions to > omaha-pm@mail.pm.org > > To subscribe or unsubscribe via the World Wide Web, visit > http://www.pm.org/mailman/listinfo/omaha-pm > or, via email, send a message with subject or body 'help' to > omaha-pm-request@mail.pm.org > > You can reach the person managing the list at > omaha-pm-owner@mail.pm.org > > When replying, please edit your Subject line so it is more specific > than "Re: Contents of Omaha-pm digest..." > > Today's Topics: > > 1. Real world application (r c) > 2. Re: Real world application (Jay Hannah) > 3. Re: PERL and XML (Sean Edwards) > > ---------------------------------------------------------------------- > > Message: 1 > Date: Sun, 21 Nov 2004 11:54:06 -0800 > From: r c > Subject: [Omaha.pm] Real world application > To: omaha-pm@mail.pm.org > Message-ID: <5e2006d104112111546b65dc3a@mail.gmail.com> > Content-Type: text/plain; charset=US-ASCII > > Hi, I would like some help in finding some "real world" Perl > application examples. Everything I'm finding are short programs > without proper logging and error handling and only accomplish a simple > task. > Here's what I'm trying to accomplish for my first application: > > 1. Write a singleton class/module that will create/hold a file handle > to do logging (I found a singleton example in an old "ThePerlReview"). > This way all the other modules I write can simply call methods this > object to do logging. -- Is this a good idea, how is it done in the > real world so all modules can write to the same log? > > 2. Write a class/module that will read a configuration file in a > generic way (so like the logging class, I can reuse it for other > projects). This way I can call get/set... methods, I've seen a great > generic example in "Object Oriented Perl" for the get/set part. -- I > want to do this instead of sourcing in a hash so it can check that > valid methods are being called. > > 3. Write a wrapper around Net::FTP that will catch exceptions and > retry login/put/get if time outs occur. This class will use the > logging singleton class to write to the same filehandle that the main > application and all other modules are witting too. > > 4. The actual application will use these modules and setup the logging > singleton. > > Any help in pointing resources that do any of these specific things > and especially an "application" that does things similar to this would > be greatly appreciated. > > Thanks > Ron > > ------------------------------ > > Message: 2 > Date: Sun, 21 Nov 2004 16:39:12 -0600 > From: Jay Hannah > Subject: Re: [Omaha.pm] Real world application > To: "Perl Mongers of Omaha, Nebraska USA" > Message-ID: <2ABE4136-3C0E-11D9-BF9E-000A95E317B8@jays.net> > Content-Type: text/plain; charset=US-ASCII; format=flowed > > On Nov 21, 2004, at 1:54 PM, r c wrote: > > Hi, I would like some help in finding some "real world" Perl > > application examples. Everything I'm finding are short programs > > without proper logging and error handling and only accomplish a simple > > task. > > Here's what I'm trying to accomplish for my first application: > > > > 1. Write a singleton class/module that will create/hold a file handle > > to do logging (I found a singleton example in an old "ThePerlReview"). > > This way all the other modules I write can simply call methods this > > object to do logging. -- Is this a good idea, how is it done in the > > real world so all modules can write to the same log? > > Yup, we wrote one of those. It's important to us to be able to ensure > that we can switch the logging behavior of "all programs" by just > tweaking one class. How do you do it? You just write whatever logging > routine you want into a single class, then use that class in all your > programs. Nothing magical about it (until it saves you hours of coding > -- that's pretty magical. -grin-). > > > 2. Write a class/module that will read a configuration file in a > > generic way (so like the logging class, I can reuse it for other > > projects). This way I can call get/set... methods, I've seen a great > > generic example in "Object Oriented Perl" for the get/set part. -- I > > want to do this instead of sourcing in a hash so it can check that > > valid methods are being called. > > Sure, setting explicit behavior for get/set methods is half the fun of > OO coding. -grin- > > > 3. Write a wrapper around Net::FTP that will catch exceptions and > > retry login/put/get if time outs occur. This class will use the > > logging singleton class to write to the same filehandle that the main > > application and all other modules are witting too. > > We wrote something similar to that. We have many FTP partners, and I > wanted to be able to do things like > > my $ftp = Omni::FTP::new(); > $ftp->connect('Partner X'); > $ftp->send("myfile.txt"); > > Without having to remember all the specifics of how to get that file to > the partner is question. Our home-grawn Net::FTP wrapper does all kinds > of things automatically (compression, encryption, etc.), and then all > my programs don't have to remember any tricky stuff. > > > 4. The actual application will use these modules and setup the logging > > singleton. > > Yup. > > > Any help in pointing resources that do any of these specific things > > and especially an "application" that does things similar to this would > > be greatly appreciated. > > I can't really email our source code around, but I certainly could demo > it in any Perl Monger meeting. Did you have specific questions about > anything? > > j > > ------------------------------ > > Message: 3 > Date: Sun, 21 Nov 2004 17:43:51 -0800 (PST) > From: Sean Edwards > Subject: Re: [Omaha.pm] PERL and XML > To: "Perl Mongers of Omaha, Nebraska USA" > Message-ID: <20041122014351.37187.qmail@web52609.mail.yahoo.com> > Content-Type: text/plain; charset=us-ascii > > Thank you Jay, I will take a look at the book. > > -=Sean Edwards=- > > --- Jay Hannah wrote: > > > > > On Nov 20, 2004, at 12:51 PM, Sean Edwards wrote: > > > Does anyone know of good introduction/tutorial to > > PERL > > > and XML? I have a J2EE app to configure before > > > compiling with Apache Ant, and I would prefer > > using > > > something like hashes and XML tags to replace > > text, > > > rather than regular expressions. > > > > Google "Perl XML"... The first 3 hits look really > > strong: > > > > http://perl-xml.sourceforge.net/faq/ > > http://perl-xml.sourceforge.net/ > > > http://www.xml.com/pub/a/2001/04/18/perlxmlqstart1.html > > > > There's a book too: > > http://www.oreilly.com/catalog/perlxml/ > > > > We use XML::Twig a lot at work. > > > > j > > > > _______________________________________________ > > Omaha-pm mailing list > > Omaha-pm@mail.pm.org > > http://www.pm.org/mailman/listinfo/omaha-pm > > > > __________________________________ > Do you Yahoo!? > Meet the all-new My Yahoo! - Try it today! > http://my.yahoo.com > > ------------------------------ > > _______________________________________________ > Omaha-pm mailing list > Omaha-pm@mail.pm.org > http://www.pm.org/mailman/listinfo/omaha-pm > > End of Omaha-pm Digest, Vol 7, Issue 10 > *************************************** > From noel at metc.net Thu Dec 9 12:26:50 2004 From: noel at metc.net (Noel Leistad) Date: Thu Dec 9 12:25:45 2004 Subject: [Omaha.pm] (no subject) Message-ID: Hi. Long-time lurker, stuck with an issue... The error message from perldoc statement below is indicative. I've run CPAN installs to try and fill the gaps, but still no joy. Noticed that lots of dir under /usr/lib/perl5/5.8.0/ end up installing with 700 permissions. I've installed the Bastille script to harden this box. Is it possible I've got umask troubles?? I'm a bit stumped.... Suggestions??? You guys always seem pretty quick to respond, usually on topics Over-My-Head, but anyway.... TIA Noel Can't locate File/Spec/Unix.pm in @INC (@INC contains: /usr/lib/perl5/5.8.0/i386-linux-thread-multi /usr/lib/perl5/5.8.0 /usr/lib/perl5/site_perl/5.8.0/i386-linux-thread-multi /usr/lib/perl5/site_perl/5.8.0 /usr/lib/perl5/site_perl /usr/lib/perl5/vendor_perl/5.8.0/i386-linux-thread-multi /usr/lib/perl5/vendor_perl/5.8.0 /usr/lib/perl5/vendor_perl /usr/lib/perl5/5.8.0/i386-linux-thread-multi /usr/lib/perl5/5.8.0 .) at /usr/lib/perl5/5.8.0/i386-linux-thread-multi/File/Spec.pm line 21. Compilation failed in require at /usr/lib/perl5/5.8.0/Pod/Usage.pm line 403. BEGIN failed--compilation aborted at /usr/lib/perl5/5.8.0/Pod/Usage.pm line 403. Compilation failed in require at /usr/bin/pod2man line 17. BEGIN failed--compilation aborted at /usr/bin/pod2man line 17. Got a 0-length file from /usr/lib/perl5/site_perl/5.8.0/Mail/SpamAssassin/Conf.pm via Pod::Perldoc::ToMan!? Noel Leistad noel@noelleistad.com From jay at jays.net Thu Dec 9 12:30:49 2004 From: jay at jays.net (Jay Hannah) Date: Thu Dec 9 12:30:52 2004 Subject: [Omaha.pm] Can't locate File/Spec/Unix.pm in @INC In-Reply-To: References: Message-ID: <72F8EF5F-4A10-11D9-AE59-000A95E317B8@jays.net> On Dec 9, 2004, at 12:26 PM, Noel Leistad wrote: > Long-time lurker, stuck with an issue... Glad you found your voice. -grin- > The error message from perldoc statement below is indicative. I've run > CPAN > installs to try and fill the gaps, but still no joy. Noticed that lots > of > dir under /usr/lib/perl5/5.8.0/ end up installing with 700 > permissions. I've > installed the Bastille script to harden this box. Is it possible I've > got > umask troubles?? I'm a bit stumped.... > > Suggestions??? You guys always seem pretty quick to respond, usually on > topics Over-My-Head, but anyway.... > > TIA > > Noel > > Can't locate File/Spec/Unix.pm in @INC (@INC contains: > /usr/lib/perl5/5.8.0/i386-linux-thread-multi /usr/lib/perl5/5.8.0 > /usr/lib/perl5/site_perl/5.8.0/i386-linux-thread-multi > /usr/lib/perl5/site_perl/5.8.0 /usr/lib/perl5/site_perl > /usr/lib/perl5/vendor_perl/5.8.0/i386-linux-thread-multi > /usr/lib/perl5/vendor_perl/5.8.0 /usr/lib/perl5/vendor_perl > /usr/lib/perl5/5.8.0/i386-linux-thread-multi /usr/lib/perl5/5.8.0 .) at > /usr/lib/perl5/5.8.0/i386-linux-thread-multi/File/Spec.pm line 21. > Compilation failed in require at /usr/lib/perl5/5.8.0/Pod/Usage.pm > line 403. > BEGIN failed--compilation aborted at /usr/lib/perl5/5.8.0/Pod/Usage.pm > line > 403. > Compilation failed in require at /usr/bin/pod2man line 17. > BEGIN failed--compilation aborted at /usr/bin/pod2man line 17. > Got a 0-length file from > /usr/lib/perl5/site_perl/5.8.0/Mail/SpamAssassin/Conf.pm via > Pod::Perldoc::ToMan!? Is File::Spec::Unix installed somewhere on your box? updatedb locate Unix.pm If not, try installing it. perl -MCPAN -e 'install File::Spec::Unix' HTH, j From noel at metc.net Thu Dec 9 13:23:09 2004 From: noel at metc.net (Noel Leistad) Date: Thu Dec 9 13:22:00 2004 Subject: [Omaha.pm] @INC oughta be @ICK!! Message-ID: weird... Ran updatedb & then: [root@metc2 i386-linux-thread-multi]# locate Unix.pm received: /usr/lib/perl5/5.8.0/ExtUtils/MM_Unix.pm /usr/lib/perl5/5.8.0/i386-linux-thread-multi/File/Spec/Unix.pm /usr/lib/perl5/site_perl/5.8.0/URI/file/Unix.pm /usr/lib/perl5/vendor_perl/5.8.0/URI/file/Unix.pm Uh-oh!! Realize that I HAVE this stuff under /usr/lib/perl5/5.8.0/i....... not the site_perl dir path... Guess I don't GET @INC Suggestions on re-writing @INC, or is that wrong direction?? CPAN installs of: Pod::Usage, Pod::File::Spec, Pod::Perldoc::ToMan ALL show (\1) up to date!! More suggestions?? Noel Error message ( for reference...) [root@metc2 root]# perldoc Mail::SpamAssassin::Conf Can't locate File/Spec/Unix.pm in @INC (@INC contains: /usr/lib/perl5/5.8.0/i386-linux-thread-multi /usr/lib/perl5/5.8.0 /usr/lib/perl5/site_perl/5.8.0/i386-linux-thread-multi /usr/lib/perl5/site_perl/5.8.0 /usr/lib/perl5/site_perl /usr/lib/perl5/vendor_perl/5.8.0/i386-linux-thread-multi /usr/lib/perl5/vendor_perl/5.8.0 /usr/lib/perl5/vendor_perl /usr/lib/perl5/5.8.0/i386-linux-thread-multi /usr/lib/perl5/5.8.0 .) at /usr/lib/perl5/5.8.0/i386-linux-thread-multi/File/Spec.pm line 21. Compilation failed in require at /usr/lib/perl5/5.8.0/Pod/Usage.pm line 405. BEGIN failed--compilation aborted at /usr/lib/perl5/5.8.0/Pod/Usage.pm line 405. Compilation failed in require at /usr/bin/pod2man line 17. BEGIN failed--compilation aborted at /usr/bin/pod2man line 17. Got a 0-length file from /usr/lib/perl5/site_perl/5.8.0/Mail/SpamAssassin/Conf.pm via Pod::Perldoc::ToMan!? [root@metc2 root]# Noel Leistad Internet System Administrator Marne & Elk Horn Telephone Co 4242 Main Street Elk Horn IA 51531 noel@metc.net 888-764-6141 Toll-Free 712-764-2773 FAX From jay at jays.net Thu Dec 9 15:20:28 2004 From: jay at jays.net (Jay Hannah) Date: Thu Dec 9 15:20:31 2004 Subject: [Omaha.pm] @INC oughta be @ICK!! In-Reply-To: References: Message-ID: <2648E0F6-4A28-11D9-AE59-000A95E317B8@jays.net> Hmm... That's weird. There's several ways to manipulate @INC, many of them documented in "perldoc perlrun" (which you can't currently access -grin-). Your @INC includes /usr/lib/perl5/5.8.0/i386-linux-thread-multi and your locate shows you do have a /usr/lib/perl5/5.8.0/i386-linux-thread-multi/File/Spec/Unix.pm so I don't understand why it wouldn't be able to find File::Spec::Unix. Do the permissions on those files/directories look screwy? As a general rule you can't/shouldn't run perldoc as root. Can you run that perldoc command as a regular user? j On Dec 9, 2004, at 1:23 PM, Noel Leistad wrote: > weird... Ran updatedb & > then: > [root@metc2 i386-linux-thread-multi]# locate Unix.pm > received: > /usr/lib/perl5/5.8.0/ExtUtils/MM_Unix.pm > /usr/lib/perl5/5.8.0/i386-linux-thread-multi/File/Spec/Unix.pm > /usr/lib/perl5/site_perl/5.8.0/URI/file/Unix.pm > /usr/lib/perl5/vendor_perl/5.8.0/URI/file/Unix.pm > > > Uh-oh!! > > Realize that I HAVE this stuff under /usr/lib/perl5/5.8.0/i....... > > not the site_perl dir path... > > Guess I don't GET @INC > > Suggestions on re-writing @INC, or is that wrong direction?? > > CPAN installs of: Pod::Usage, Pod::File::Spec, Pod::Perldoc::ToMan ALL > show > (\1) up to date!! > > More suggestions?? > > Noel > > Error message ( for reference...) > [root@metc2 root]# perldoc Mail::SpamAssassin::Conf > Can't locate File/Spec/Unix.pm in @INC (@INC contains: > /usr/lib/perl5/5.8.0/i386-linux-thread-multi /usr/lib/perl5/5.8.0 > /usr/lib/perl5/site_perl/5.8.0/i386-linux-thread-multi > /usr/lib/perl5/site_perl/5.8.0 /usr/lib/perl5/site_perl > /usr/lib/perl5/vendor_perl/5.8.0/i386-linux-thread-multi > /usr/lib/perl5/vendor_perl/5.8.0 /usr/lib/perl5/vendor_perl > /usr/lib/perl5/5.8.0/i386-linux-thread-multi /usr/lib/perl5/5.8.0 .) at > /usr/lib/perl5/5.8.0/i386-linux-thread-multi/File/Spec.pm line 21. > Compilation failed in require at /usr/lib/perl5/5.8.0/Pod/Usage.pm > line 405. > BEGIN failed--compilation aborted at /usr/lib/perl5/5.8.0/Pod/Usage.pm > line > 405. > Compilation failed in require at /usr/bin/pod2man line 17. > BEGIN failed--compilation aborted at /usr/bin/pod2man line 17. > Got a 0-length file from > /usr/lib/perl5/site_perl/5.8.0/Mail/SpamAssassin/Conf.pm via > Pod::Perldoc::ToMan!? From noel at metc.net Thu Dec 9 15:47:25 2004 From: noel at metc.net (Noel Leistad) Date: Thu Dec 9 15:46:12 2004 Subject: [Omaha.pm] @INC oughta be @ICK!! In-Reply-To: <2648E0F6-4A28-11D9-AE59-000A95E317B8@jays.net> Message-ID: tried as luser, no go. Permissions on mostly 755, although some/many run 700. You'd think even as root, you'd get something. I've got to spend some time dipping to subdirs and changing. Shouldn't be a problem should it?? Noel BTW, what's proper manners, snip out the excess, or leave in for continuity of conversation?? TIA From jay at jays.net Thu Dec 9 16:11:09 2004 From: jay at jays.net (Jay Hannah) Date: Thu Dec 9 16:11:16 2004 Subject: [Omaha.pm] @INC oughta be @ICK!! In-Reply-To: References: Message-ID: <3AE0DC92-4A2F-11D9-AE59-000A95E317B8@jays.net> On Dec 9, 2004, at 3:47 PM, Noel Leistad wrote: > tried as luser, no go. Permissions on mostly 755, although some/many > run > 700. You'd think even as root, you'd get something. I've got to spend > some > time dipping to subdirs and changing. Shouldn't be a problem should > it?? Hmmmm... export PERL5LIB=/usr/lib/perl5/5.8.0/i386-linux-thread-multi Does that help? > BTW, what's proper manners, snip out the excess, or leave in for > continuity > of conversation?? I tend to err on the side of brevity. The list archives are online forever anyway for reference. j From noel at metc.net Thu Dec 9 16:31:16 2004 From: noel at metc.net (Noel Leistad) Date: Thu Dec 9 16:30:04 2004 Subject: [Omaha.pm] @INC oughta be @ICK!! In-Reply-To: <3AE0DC92-4A2F-11D9-AE59-000A95E317B8@jays.net> Message-ID: tried export for both root and luser. Nada. I'm done for today. Know that's not how a true PMer works, but got obligations. I'll let this incubate a bit. Looks like "requires" not searching path correctly; either with base reference too low or high in search path. I THINK I've got all directory perms set to 755, but maybe I'd better look "once again" Thanks for the help today. Maybe Monday. Have out of office appoints tomorrow. Later. noel From jhannah at omnihotels.com Tue Dec 14 16:44:54 2004 From: jhannah at omnihotels.com (Jay Hannah) Date: Tue Dec 14 16:45:44 2004 Subject: [Omaha.pm] OT: top posting Message-ID: <200412142245.iBEMjU6N028339@omares-email.omnihotels.com> Laugh, j -- A: Maybe because some people are too annoyed by top-posting. Q: Why do I not get an answer to my question(s)? A: Because it messes up the order in which people normally read text. Q: Why is top-posting such a bad thing? From dan at linder.org Mon Dec 20 11:48:07 2004 From: dan at linder.org (Daniel Linder) Date: Mon Dec 20 11:41:17 2004 Subject: [Omaha.pm] 'Practical mod_perl' book goes opensource In-Reply-To: <200412031320.iB3DKuLe020011@mail-omaha.omnihotels.com> References: <200412031320.iB3DKuLe020011@mail-omaha.omnihotels.com> Message-ID: <30839.12.160.138.52.1103564887.squirrel@12.160.138.52> -----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 Found this on LWN.Net: http://lwn.net/Articles/116090/ I've downloaded the .tar.gz file to "http://www.linder.org/~dan/mod_perl/". The .tar.gz file has both the HTML and PDF versions. You can use their BitTorrent link in their home page: http://modperlbook.org/ Dan - - - - - "I do not fear computer, I fear the lack of them." -- Isaac Asimov GPG fingerprint:9EE8 ABAE 10D3 0B55 C536 E17A 3620 4DCA A533 19BF -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.2.1 (GNU/Linux) iD8DBQFBxxBXNiBNyqUzGb8RAi4SAJsFSfWWvMjy3rQlkxDkTPYLsAAF8wCfRrHe ZUE48GjaK+zoK1vQzRDW0dA= =1wVA -----END PGP SIGNATURE----- From jhannah at omnihotels.com Mon Dec 20 15:50:49 2004 From: jhannah at omnihotels.com (Jay Hannah) Date: Mon Dec 20 15:51:31 2004 Subject: [Omaha.pm] RE: Perl - Trace In-Reply-To: <29AB736ABCE5C745ABF9C93B02F2C27B018DEFEC@exchange2k3.omnihotels.net> Message-ID: <200412202151.iBKLpLch002666@omares-email.omnihotels.com> I'm not aware of any dead-easy way to isolate the issue without understanding the Perl programs and what they do. How long are TXKScript.pl and txkVal11510MP.pl (how many lines)? You could try running under the debugger -- usually anything fatal throws a stack trace. perl -d $ORACLE_HOME/appsutil/bin/TXKScript.pl \ etc... Then type "c" enter to tell the debugger to "continue" until it dies... Is the program dumping core? If so and you're brave enough to use gdb check out the stuff I Google'd for you at the bottom of this post. (I'm no C programmer...) HTH, j > -----Original Message----- > From: Nancy Iles > Sent: Monday, December 20, 2004 3:30 PM > To: jhannah@omnihotels.com > Subject: Perl - Trace > > Jay, > > I understand that you are the perl guru. I have an perl > script provided by oracle that I need to run to validate the > Oracle tech stack. When it runs on ifs-data, I receive an > 'Out of Memory' error and it terminates. No logs are being > generated so I have no clue as to what is wrong. I have an > issue open with Oracle but it has not made any progress yet. > The script is: > > $ perl $ORACLE_HOME/appsutil/bin/TXKScript.pl \ > > -script=$ORACLE_HOME/appsutil/bin/txkVal11510MP.pl \ > > -txktop=$ORACLE_HOME/appsutil \ > > -contextfile= $CONTEXT_FILE \ > > -appspass= \ > > -outfile=$ORACLE_HOME/appsutil/temp/txkVal11510MP_DB.html > > Is there a way to trace the execution to find out where it is > generating the 'Out of Memory' error? > > Thanks! > >From USENET: So, here's what I would suggest: 1. Use a debugger. My examples are for gdb, as this lives on more platforms than most (all?) other debuggers. 2. Using said debugger, get a stack trace of the core dump: gdb /usr/bin/perl # This tells gdb to look at the perl # executable. Looking at your script # would do gdb no good. typed into gdb: core core # Tell gdb to read in the core file bt # Get a stack-trace of what functions # had been called. 3. Using this information, you can look at the source code and try to figure out what might have happened to cause the last function called to crap out. If you want, you can look at the source from within gdb by typing: frame <#> # Where <#> is the number that was # printed before the function name in # the stack-listing (see above). dir # Where is where the # source-code to perl lives. list # This prints out the code around the # line from the stack-trace. 4. You can look at the values of any variables at the time of the crash, by typing: p # may also be any (or # almost any) valid C expresion. # ex.: p (foo + 2) - bar 5. If none of this helps, post a message that includes the stack-trace, any relevant details, and the output of: perl -v # Version of perl uname -a # Machine/OS type/revision info