From jay at jays.net Tue Oct 2 12:18:35 2012 From: jay at jays.net (Jay Hannah) Date: Tue, 2 Oct 2012 14:18:35 -0500 Subject: [Omaha.pm] [omaha] PDF to Text parsing In-Reply-To: <9AECCD8B-C8AF-4EA6-B163-900DD2BD5EC3@unomaha.edu> References: <9AECCD8B-C8AF-4EA6-B163-900DD2BD5EC3@unomaha.edu> Message-ID: <03765B20-6FCF-4E5C-8FEF-41EAAF35B055@jays.net> On Oct 2, 2012, at 11:03 AM, "Rob Townley" wrote: > The ReEnergizeProgram.org auditor said that a big slowdown is getting > all the data from PDF based bills from MUD and OPPD into a spreadsheet > / database. Sounds like they email stuff, copy-n-paste alot, and then > email on. > > What perl/python/php modules would you recommend for parsing the text from PDF? On Oct 2, 2012, at 11:10 AM, Burch Kealey wrote: > Send us one as an example this is really a trivial task Ya, send us an example PDF. There are 475 PDF libraries on CPAN, but your mileage will vary and the only way to know for sure is to actually try... Here's all the hits, and the one I'd probably try first for this job: https://metacpan.org/search?q=PDF https://metacpan.org/module/PDF::OCR2 Good luck! :) j Omaha Perl Mongers: http://omaha.pm.org P.S. PDF scraping is usually really gross. Government orgs often publish PDF archives as if those are data APIs, and they're really not. Poke MUD and OPPD to publish JSON or XML APIs / archives. From sirloxelroy at gmail.com Wed Oct 3 18:30:13 2012 From: sirloxelroy at gmail.com (Chris Brandstetter) Date: Wed, 03 Oct 2012 20:30:13 -0500 Subject: [Omaha.pm] [omaha] PDF to Text parsing (Jay Hannah) In-Reply-To: References: Message-ID: <506CE6A5.5020708@gmail.com> I used "Image::OCR::Tesseract 'get_ocr' " and " HTML::TextToHTML " then I did something like this " $text = qx($ocrbin \"$fullpath\"); $text =~ s/[^0-9A-Za-z\ \n\t\.\?\!\@\#\$\%\&\*\(\)\"\'\/\,\;\:\+\=\-]//gi; my $conv = new HTML::TextToHTML( default_link_dict=>''); $ocrdhtml = $conv->process_chunk($text); $contents = $text; $preview = $ocrdhtml; " Not the prettiest, but it worked to OCR and store the text and previews of the documents in a database. Chris Brandstetter -----BEGIN GEEK CODE BLOCK----- Version: 3.1 GCS/IT d+(-) s++:++ a C++++$ UBLISXC*++++$ P++++$ L+++$ E-- W+++ N+ o K- w-- O M++$ V PS- PE Y+ PGP++ t++ 5+++ X+ R- tv-- b+>+++ DI D+ G+ e+ h++ r y? ------END GEEK CODE BLOCK------ >> The ReEnergizeProgram.org auditor said that a big slowdown is getting >> all the data from PDF based bills from MUD and OPPD into a spreadsheet >> / database. Sounds like they email stuff, copy-n-paste alot, and then >> email on. >> >> What perl/python/php modules would you recommend for parsing the text from PDF? > > On Oct 2, 2012, at 11:10 AM, Burch Kealey wrote: >> Send us one as an example this is really a trivial task > Ya, send us an example PDF. There are 475 PDF libraries on CPAN, but your mileage will vary and the only way to know for sure is to actually try... Here's all the hits, and the one I'd probably try first for this job: > > https://metacpan.org/search?q=PDF > https://metacpan.org/module/PDF::OCR2 > > Good luck! :) > > j > Omaha Perl Mongers: http://omaha.pm.org > > > > P.S. PDF scraping is usually really gross. Government orgs often publish PDF archives as if those are data APIs, and they're really not. Poke MUD and OPPD to publish JSON or XML APIs / archives. > > > > > > > ------------------------------ > > Subject: Digest Footer > > _______________________________________________ > Omaha-pm mailing list > Omaha-pm at pm.org > http://mail.pm.org/mailman/listinfo/omaha-pm > > ------------------------------ > > End of Omaha-pm Digest, Vol 102, Issue 1 > **************************************** From rob.townley at gmail.com Thu Oct 4 00:31:04 2012 From: rob.townley at gmail.com (Rob Townley) Date: Thu, 4 Oct 2012 02:31:04 -0500 Subject: [Omaha.pm] [omaha] PDF to Text parsing (Jay Hannah) In-Reply-To: <506CE6A5.5020708@gmail.com> References: <506CE6A5.5020708@gmail.com> Message-ID: Interesting. i suppose your PDFs only contained images of text, but not actual text, hence the need for OCR? If so, i may use this for something else. On Wed, Oct 3, 2012 at 8:30 PM, Chris Brandstetter wrote: > I used "Image::OCR::Tesseract 'get_ocr' " and " HTML::TextToHTML " then > I did something like this > > " > $text = qx($ocrbin \"$fullpath\"); > $text =~ s/[^0-9A-Za-z\ > \n\t\.\?\!\@\#\$\%\&\*\(\)\"\'\/\,\;\:\+\=\-]//gi; > my $conv = new HTML::TextToHTML( > default_link_dict=>''); > $ocrdhtml = $conv->process_chunk($text); > $contents = $text; > $preview = $ocrdhtml; > " > > Not the prettiest, but it worked to OCR and store the text and previews > of the documents in a database. > > > Chris Brandstetter > > -----BEGIN GEEK CODE BLOCK----- > Version: 3.1 > GCS/IT d+(-) s++:++ a C++++$ UBLISXC*++++$ P++++$ L+++$ E-- W+++ N+ o K- > w-- O M++$ V PS- PE Y+ PGP++ t++ 5+++ X+ R- tv-- b+>+++ DI D+ G+ e+ h++ > r > y? > ------END GEEK CODE BLOCK------ > > >>> The ReEnergizeProgram.org auditor said that a big slowdown is getting >>> all the data from PDF based bills from MUD and OPPD into a spreadsheet >>> / database. Sounds like they email stuff, copy-n-paste alot, and then >>> email on. >>> >>> What perl/python/php modules would you recommend for parsing the text from PDF? >> >> On Oct 2, 2012, at 11:10 AM, Burch Kealey wrote: >>> Send us one as an example this is really a trivial task >> Ya, send us an example PDF. There are 475 PDF libraries on CPAN, but your mileage will vary and the only way to know for sure is to actually try... Here's all the hits, and the one I'd probably try first for this job: >> >> https://metacpan.org/search?q=PDF >> https://metacpan.org/module/PDF::OCR2 >> >> Good luck! :) >> >> j >> Omaha Perl Mongers: http://omaha.pm.org >> >> >> >> P.S. PDF scraping is usually really gross. Government orgs often publish PDF archives as if those are data APIs, and they're really not. Poke MUD and OPPD to publish JSON or XML APIs / archives. >> >> >> >> >> >> >> ------------------------------ >> >> Subject: Digest Footer >> >> _______________________________________________ >> Omaha-pm mailing list >> Omaha-pm at pm.org >> http://mail.pm.org/mailman/listinfo/omaha-pm >> >> ------------------------------ >> >> End of Omaha-pm Digest, Vol 102, Issue 1 >> **************************************** > > _______________________________________________ > Omaha-pm mailing list > Omaha-pm at pm.org > http://mail.pm.org/mailman/listinfo/omaha-pm From jay at jays.net Thu Oct 4 02:29:53 2012 From: jay at jays.net (Jay Hannah) Date: Thu, 4 Oct 2012 04:29:53 -0500 Subject: [Omaha.pm] PDF to Text parsing In-Reply-To: References: <506CE6A5.5020708@gmail.com> Message-ID: <1212E3D2-DA43-496E-AB82-32774A158F0B@jays.net> On Oct 4, 2012, at 2:31 AM, Rob Townley wrote: > Interesting. i suppose your PDFs only contained images of text, but > not actual text, hence the need for OCR? If so, i may use this for > something else. PDF files often contain both: (1) Text with layout, placement, and font information. And (2) images. Those images may happen to have pixels in them which humans interpret as text. Those pixels can sometimes be OCRd to produce text. PDF::OCR2 does both of these things for you. It can be used to "extract all text and all image ocr from pdf". Again, it all depends on the PDF file. :) I'm guessing Chris was dealing with a directory full of images. HTH, j From sirloxelroy at gmail.com Thu Oct 4 18:24:52 2012 From: sirloxelroy at gmail.com (Chris Brandstetter) Date: Thu, 04 Oct 2012 20:24:52 -0500 Subject: [Omaha.pm] PDF to Text parsing In-Reply-To: References: Message-ID: <506E36E4.6070001@gmail.com> All the ones I was dealing with were pdf labeled multi page tiff files from a fax software. Chris Brandstetter -----BEGIN GEEK CODE BLOCK----- Version: 3.1 GCS/IT d+(-) s++:++ a C++++$ UBLISXC*++++$ P++++$ L+++$ E-- W+++ N+ o K- w-- O M++$ V PS- PE Y+ PGP++ t++ 5+++ X+ R- tv-- b+>+++ DI D+ G+ e+ h++ r y? ------END GEEK CODE BLOCK------ On 10/04/2012 02:00 PM, omaha-pm-request at pm.org wrote: > > PDF files often contain both: (1) Text with layout, placement, and font information. And (2) images. Those images may happen to have pixels in them which humans interpret as text. Those pixels can sometimes be OCRd to produce text. > > PDF::OCR2 does both of these things for you. It can be used to "extract all text and all image ocr from pdf". > > Again, it all depends on the PDF file. :) > > I'm guessing Chris was dealing with a directory full of images. > > HTH, > > j > From jay.hannah at iinteractive.com Mon Oct 8 19:33:03 2012 From: jay.hannah at iinteractive.com (Jay Hannah) Date: Mon, 8 Oct 2012 21:33:03 -0500 Subject: [Omaha.pm] Meeting tomorrow 7pm - helicopters and geospatial data kung-fu References: <7E7A0289-3573-423E-8785-E8B82230FA3E@iinteractive.com> Message-ID: <37B75429-986E-4DD0-9BA2-A988C03E4BB3@iinteractive.com> It's that time of month again! Woot! Join us tomorrow night, 7pm, in PKI room 160! http://odlug.org/ ----------------- Sam Flint Tk/Perl, Arduino helicopter programming Shane Buscher Geospatial open source. Why is my neighborhood shown in Google Maps and Sarpy County GIS, but not in OpenStreetMap.org? [screenshot below] How did the data get there? How can I improve it? How can I use it for my own nefarious purposes? See some of the tech, ask an expert all your geospatial questions. See you there! Jay Hannah 402-598-7782 Man, it's a bummer our new room forbids food, I'm dying to cheat my new diet with a huge stack of pizza ... :/ -------------- next part -------------- An HTML attachment was scrubbed... URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: maps.gif Type: image/gif Size: 461948 bytes Desc: not available URL: From harmonicnm7h at gmail.com Mon Oct 8 19:58:15 2012 From: harmonicnm7h at gmail.com (Sam Flint) Date: Mon, 8 Oct 2012 21:58:15 -0500 Subject: [Omaha.pm] Meeting tomorrow 7pm - helicopters and geospatial data kung-fu In-Reply-To: <37B75429-986E-4DD0-9BA2-A988C03E4BB3@iinteractive.com> References: <7E7A0289-3573-423E-8785-E8B82230FA3E@iinteractive.com> <37B75429-986E-4DD0-9BA2-A988C03E4BB3@iinteractive.com> Message-ID: No Helicopters! On Mon, Oct 8, 2012 at 9:33 PM, Jay Hannah wrote: > It's that time of month again! Woot! > > Join us tomorrow night, 7pm, in PKI room 160! > > > http://odlug.org/ > ----------------- > Sam Flint > Tk/Perl, Arduino helicopter programming > > Shane Buscher > Geospatial open source. Why is my neighborhood shown in Google Maps > and Sarpy County GIS, but not in OpenStreetMap.org? [screenshot > below] How did the data get there? How can I improve it? How can I use it > for my own nefarious purposes? See some of the tech, ask an expert all > your geospatial questions. > > > See you there! > > Jay Hannah > 402-598-7782 > > > > Man, it's a bummer our new room forbids food, I'm dying to cheat my new > diet with a huge stack of pizza ... :/ > > > > > > > > > > _______________________________________________ > Omaha-pm mailing list > Omaha-pm at pm.org > http://mail.pm.org/mailman/listinfo/omaha-pm > -- Sam Flint flintfam.org/~swflint -------------- next part -------------- An HTML attachment was scrubbed... URL: From jay.hannah at iinteractive.com Tue Oct 9 07:46:42 2012 From: jay.hannah at iinteractive.com (Jay Hannah) Date: Tue, 9 Oct 2012 09:46:42 -0500 Subject: [Omaha.pm] Have a fitbit? Join the Perl Mongers group! Message-ID: <28546EA9-FD2E-457E-846B-1C2AADF9A28A@iinteractive.com> http://www.fitbit.com/group/2287VH :) Thanks, Jay Hannah Project Lead / Programmer http://www.iinteractive.com Email: jay.hannah at iinteractive.com AOL IM: deafferret Mobile: 1.402.598.7782 Fax: 1.402.691.9496 From jay at jays.net Tue Oct 9 11:51:33 2012 From: jay at jays.net (Jay Hannah) Date: Tue, 9 Oct 2012 13:51:33 -0500 Subject: [Omaha.pm] Parking pass for tonight's meeting References: Message-ID: <7CAA8008-38EE-4B69-8467-D57FDFB5906F@jays.net> Please print one of whichever of these file formats is more convenient for you and leave in on your dash. I'll bring a few extra copies just in case. Thanks! j 402-598-7782 -------------- next part -------------- An HTML attachment was scrubbed... URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: Parking Pass DLUG.docx Type: application/vnd.openxmlformats-officedocument.wordprocessingml.document Size: 18032 bytes Desc: not available URL: -------------- next part -------------- An HTML attachment was scrubbed... URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: parking.pdf Type: application/pdf Size: 22671 bytes Desc: not available URL: -------------- next part -------------- An HTML attachment was scrubbed... URL: From robert.wood.busby at gmail.com Tue Oct 9 20:55:47 2012 From: robert.wood.busby at gmail.com (Robert Busby) Date: Tue, 9 Oct 2012 22:55:47 -0500 Subject: [Omaha.pm] Parking pass for tonight's meeting In-Reply-To: <7CAA8008-38EE-4B69-8467-D57FDFB5906F@jays.net> References: <7CAA8008-38EE-4B69-8467-D57FDFB5906F@jays.net> Message-ID: Found out I already had an account, sciurolocutus. On Oct 9, 2012 5:09 PM, "Jay Hannah" wrote: > Please print one of whichever of these file formats is more convenient for > you and leave in on your dash. > > I'll bring a few extra copies just in case. > > Thanks! > > j > 402-598-7782 > > > > > > > > > > > > > _______________________________________________ > Omaha-pm mailing list > Omaha-pm at pm.org > http://mail.pm.org/mailman/listinfo/omaha-pm > -------------- next part -------------- An HTML attachment was scrubbed... URL: From jay at jays.net Wed Oct 10 07:16:29 2012 From: jay at jays.net (Jay Hannah) Date: Wed, 10 Oct 2012 09:16:29 -0500 Subject: [Omaha.pm] Parking pass for tonight's meeting In-Reply-To: References: <7CAA8008-38EE-4B69-8467-D57FDFB5906F@jays.net> Message-ID: <201148B3-F1DC-4D88-9D61-C9D9F0E43C56@jays.net> On Oct 9, 2012, at 10:55 PM, Robert Busby wrote: > Found out I already had an account, sciurolocutus. Thanks! I added you as a collab: https://github.com/jhannah/odlug j From jay at jays.net Wed Oct 10 07:42:16 2012 From: jay at jays.net (Jay Hannah) Date: Wed, 10 Oct 2012 09:42:16 -0500 Subject: [Omaha.pm] November meeting In-Reply-To: References: <7E7A0289-3573-423E-8785-E8B82230FA3E@iinteractive.com> Message-ID: <15C6C0C2-2A32-42F0-A970-63444B2823B5@jays.net> On Oct 9, 2012, at 9:49 PM, Ryan Stille wrote: > Great presentations tonight, thanks guys! > > And thanks to Jay for procuring these speakers. :-) Agreed! Woot! Thanks guys! :) Any volunteers / requests / suggestions for upcoming meetings? I'm trying to get @FullyCroisened to talk about Lua. He's the only guy currently on my people to pester list. :) j http://odlug.org From robert.wood.busby at gmail.com Wed Oct 10 09:50:58 2012 From: robert.wood.busby at gmail.com (Robert Busby) Date: Wed, 10 Oct 2012 11:50:58 -0500 Subject: [Omaha.pm] November meeting In-Reply-To: <15C6C0C2-2A32-42F0-A970-63444B2823B5@jays.net> References: <7E7A0289-3573-423E-8785-E8B82230FA3E@iinteractive.com> <15C6C0C2-2A32-42F0-A970-63444B2823B5@jays.net> Message-ID: I'm really interested in graph visualization and FSM modeling as of late, but I don't know if I'm ready to present anything. I've been looking at http://search.cpan.org/~rsavage/GraphViz2-2.05/lib/GraphViz2.pm since I was already using perl and GraphViz, just using `dot $filename` to do the actual processing. On Wed, Oct 10, 2012 at 9:42 AM, Jay Hannah wrote: > On Oct 9, 2012, at 9:49 PM, Ryan Stille wrote: > > Great presentations tonight, thanks guys! > > > > And thanks to Jay for procuring these speakers. :-) > > Agreed! Woot! Thanks guys! :) > > Any volunteers / requests / suggestions for upcoming meetings? I'm trying > to get @FullyCroisened to talk about Lua. He's the only guy currently on my > people to pester list. :) > > j > http://odlug.org > > > > > > > > > _______________________________________________ > Omaha-pm mailing list > Omaha-pm at pm.org > http://mail.pm.org/mailman/listinfo/omaha-pm > -------------- next part -------------- An HTML attachment was scrubbed... URL: From jay.hannah at iinteractive.com Wed Oct 10 09:58:28 2012 From: jay.hannah at iinteractive.com (Jay Hannah) Date: Wed, 10 Oct 2012 11:58:28 -0500 Subject: [Omaha.pm] Shane's presentation from last night Message-ID: <350A6E1C-31C1-43B2-B67C-EB37B2515FB7@iinteractive.com> Presented: StreetSmarts- Using OpenStreetMap to you advantage http://bit.ly/Rwo9IH Follow Shane on Twitter: https://twitter.com/notifyshane/status/256032642896650241 Thanks, Jay Hannah Project Lead / Programmer http://www.iinteractive.com Email: jay.hannah at iinteractive.com AOL IM: deafferret Mobile: 1.402.598.7782 Fax: 1.402.691.9496 From jay at jays.net Wed Oct 10 10:19:46 2012 From: jay at jays.net (Jay Hannah) Date: Wed, 10 Oct 2012 12:19:46 -0500 Subject: [Omaha.pm] Fwd: Survey about newcomer experience and citizenship behavior in the Perl community References: <9609A8A8-C138-4F43-86BA-A240B5486392@jays.net> Message-ID: Interested? j Begin forwarded message: > # ---------------------------------------- > Hi, > > My name is Kevin Carillo and I am a PhD student at the School of Information Management of Victoria University of Wellington (New Zealand). > > I am currently running a survey that aims at studying how the experience of a Perl community newcomer has an influence on this person's actions and project contributions in the community. > > I would like to kindly request the leaders of the PerlMongers group to forward the survey invitation to their respective pm mailing lists. The more respondents we get, the more the data will help the overall Perl community. The dataset will be released under a CC license. > > Karen Pauley, Nat Torkington, and Mark Keating have already been informed about the research project and they all have been supportive and helpful. The study has been already advertised in different Perl resources. > > The survey targets contributors to Perl sub-projects endorsed by the Perl Foundation and who joined Perl within the last 2 years. > > You can find a blog post about the research project on blogs.perl.org that can be found at: > http://blogs.perl.org/users/kevin_carillo/2012/10/newcomer-experience-and-contributor-behavior-in-perl-and-other-foss-communities---survey.html > > The direct link to the survey is: > > https://limesurvey.sim.vuw.ac.nz/index.php?sid=89971&lang=en > > This survey is anonymous, and no information is used to identify participants. The Human Ethics Committee of the School of Information Management has approved this research project. > > > Thank you, > > > Kevin Carillo > School of Information Management > Victoria University of Wellington > PO Box 600, Wellington NEW ZEALAND > (04) 463 5233 ext. 8679 | Room RH401 > kevin.carillo at sim.vuw.ac.nz > http://kevincarillo.org/ > > From jay at jays.net Wed Oct 10 10:35:43 2012 From: jay at jays.net (Jay Hannah) Date: Wed, 10 Oct 2012 12:35:43 -0500 Subject: [Omaha.pm] November meeting In-Reply-To: References: <7E7A0289-3573-423E-8785-E8B82230FA3E@iinteractive.com> <15C6C0C2-2A32-42F0-A970-63444B2823B5@jays.net> Message-ID: On Oct 10, 2012, at 11:50 AM, Robert Busby wrote: > I'm really interested in graph visualization and FSM modeling as of late, but I don't know if I'm ready to present anything. The presentations are very casual. Basically if you're excited in or interested in something you plug your laptop into the projector and click around and solicit some group discussion. :) > I've been looking at http://search.cpan.org/~rsavage/GraphViz2-2.05/lib/GraphViz2.pm since I was already using perl and GraphViz, just using `dot $filename` to do the actual processing. I've used GraphViz a few times over the years, mostly in bioinformatics. If you ever want any help let me know. :) j From jay.hannah at iinteractive.com Wed Oct 10 17:44:33 2012 From: jay.hannah at iinteractive.com (Jay Hannah) Date: Wed, 10 Oct 2012 19:44:33 -0500 Subject: [Omaha.pm] November 13 meeting Message-ID: http://odlug.org/ Upcoming presentations: Nathanial Ryan Lua! We join forces with the Omaha Corona SDK Meetup to learn all about this "powerful, fast, lightweight, embeddable scripting language." Thanks, Jay Hannah Project Lead / Programmer http://www.iinteractive.com Email: jay.hannah at iinteractive.com AOL IM: deafferret Mobile: 1.402.598.7782 Fax: 1.402.691.9496 From choman at gmail.com Mon Oct 15 11:02:29 2012 From: choman at gmail.com (Chad Homan) Date: Mon, 15 Oct 2012 13:02:29 -0500 Subject: [Omaha.pm] OT: web gurus Message-ID: all Anyone heard of http://www.yodle.com/ looking for feedback, alternatives, comments, are they worth it? please contact me offline Join The RVLution - Together We Win! -- Chad - I AM MONAVIE Creating A More Meaningful Life -------------- next part -------------- An HTML attachment was scrubbed... URL: From jay.hannah at iinteractive.com Mon Oct 22 12:19:02 2012 From: jay.hannah at iinteractive.com (Jay Hannah) Date: Mon, 22 Oct 2012 14:19:02 -0500 Subject: [Omaha.pm] XML::Twig error handling Message-ID: <245A7469-2DB0-4316-8037-A2F359A7239E@iinteractive.com> Sean / Justin, My XML::Twig skills have atrophied. How are you trapping when nodes may or may not exist? Try::Tiny and stuff like this? my $connection; try { $connection = $s->first_child('connection')->text; }; Or a ton of && statements? or...? Thanks, Jay Hannah Project Lead / Programmer http://www.iinteractive.com Email: jay.hannah at iinteractive.com AOL IM: deafferret Mobile: 1.402.598.7782 Fax: 1.402.691.9496 From jay.hannah at iinteractive.com Mon Oct 22 12:34:44 2012 From: jay.hannah at iinteractive.com (Jay Hannah) Date: Mon, 22 Oct 2012 14:34:44 -0500 Subject: [Omaha.pm] XML::Twig error handling In-Reply-To: <0E12EF2765A91F4EA21C87720165CF78765050C180@L3EXCHMB.omnihotels.net> References: <245A7469-2DB0-4316-8037-A2F359A7239E@iinteractive.com> <0E12EF2765A91F4EA21C87720165CF78765050C180@L3EXCHMB.omnihotels.net> Message-ID: <12603D8D-32DC-464A-B2F9-4008DF2711F5@iinteractive.com> On Oct 22, 2012, at 2:23 PM, Justin Esbenshade wrote: > Lot's of if's. > > my ($PN) = $PR->first_child('Customer')->first_child('PersonName'); > if ($PN) { > $Res{firstName} = $PN->first_child('c:firstName')->text if ( $PN->first_child('c:firstName') ); > $Res{lastName} = $PN->first_child('c:lastName')->text if ( $PN->first_child('c:lastName') ); > } > > my ($A) = $PR->first_child('Addresses'); > my ($NA) = $A->first_child('NameAddress') if ($A); > if ($NA) { Thanks. I think I'm liking Try::Tiny better...? my ($sql, $connection, $table); try { $sql = $s->first_child('sql')->text; }; try { $connection = $s->first_child('connection')->text; }; try { $table = $s->first_child('table')->text; }; Ponder, j From jay.hannah at iinteractive.com Mon Oct 22 12:56:11 2012 From: jay.hannah at iinteractive.com (Jay Hannah) Date: Mon, 22 Oct 2012 14:56:11 -0500 Subject: [Omaha.pm] XML::Twig error handling In-Reply-To: <0E12EF2765A91F4EA21C87720165CF78765050C197@L3EXCHMB.omnihotels.net> References: <245A7469-2DB0-4316-8037-A2F359A7239E@iinteractive.com> <0E12EF2765A91F4EA21C87720165CF78765050C180@L3EXCHMB.omnihotels.net> <12603D8D-32DC-464A-B2F9-4008DF2711F5@iinteractive.com> <0E12EF2765A91F4EA21C87720165CF78765050C197@L3EXCHMB.omnihotels.net> Message-ID: On Oct 22, 2012, at 2:49 PM, Justin Esbenshade wrote: > So what happens after all the try's? Do you still have to say "if ($table)"? my ($sql); try { $sql = $s->first_child('sql')->text; }; Ya, $sql is just undef if anything went wrong. So you can if ($sql) if you want. Or you could catch {} and do something... j From jay at jays.net Wed Oct 24 10:47:03 2012 From: jay at jays.net (Jay Hannah) Date: Wed, 24 Oct 2012 12:47:03 -0500 Subject: [Omaha.pm] [olug] Apache In-Reply-To: References: Message-ID: On Oct 24, 2012, at 10:22 AM, Jay Bendon wrote: > First of all you're still using perl... "Still?" Perl rocks. Linux rocks. Together, they are unstoppable. :) > Options +ExecCGI > AddHandler cgi-script .cgi This works, but should only be used in low volume / trivial deployments where you're not worried about performance. There are lots of high performance ways to deploy Perl web stacks. Here are a few, from the Catalyst docs (Catalyst is one popular Modern Perl web stack): https://metacpan.org/module/Catalyst::Manual::Deployment Hope that helps, j Omaha Perl Mongers: http://omaha.pm.org From jay at jays.net Wed Oct 24 10:50:46 2012 From: jay at jays.net (Jay Hannah) Date: Wed, 24 Oct 2012 12:50:46 -0500 Subject: [Omaha.pm] Fwd: XML::Twig error handling References: Message-ID: <0BFE2018-DDE0-43F1-9470-3B8DB40AA38C@jays.net> Ah, yes! thanks! Begin forwarded message: > From: Patrick Baker > Subject: Re: [Omaha.pm] XML::Twig error handling > Date: October 24, 2012 12:26:09 PM CDT > To: Jay Hannah > > I use try { } catch { }; now, it seems cleaner to me. > > try { > $twig->parse($request); > $self->request($twig); > my ($Body) = $twig->get_xpath("${soap_base}:Body"); > my ($request) = $Body->first_child('GroupPricing'); > $self->type($request->tag); > } catch { > $self->set_SOAP_Fault( faultstring => "Invalid message.", > detail => '' ); > } -------------- next part -------------- An HTML attachment was scrubbed... URL: From jaybocc2 at gmail.com Wed Oct 24 10:56:08 2012 From: jaybocc2 at gmail.com (Jay Bendon) Date: Wed, 24 Oct 2012 12:56:08 -0500 Subject: [Omaha.pm] [olug] Apache In-Reply-To: References: Message-ID: > > This works, but should only be used in low volume / trivial deployments > where you're not worried about performance. > > There are lots of high performance ways to deploy Perl web stacks. Here > are a few, from the Catalyst docs (Catalyst is one popular Modern Perl web > stack): > > https://metacpan.org/module/Catalyst::Manual::Deployment i figured as much but i prefer Python so my scope with perl is "does it work? OK" :) I think i ended up not going with fast_cgi because the person developing the app wasn't even utilizing FCGI and thus i didn't want the module loaded. --Jay On Wed, Oct 24, 2012 at 12:47 PM, Jay Hannah wrote: > On Oct 24, 2012, at 10:22 AM, Jay Bendon wrote: > > First of all you're still using perl... > > "Still?" Perl rocks. Linux rocks. Together, they are unstoppable. :) > > > Options +ExecCGI > > AddHandler cgi-script .cgi > > This works, but should only be used in low volume / trivial deployments > where you're not worried about performance. > > There are lots of high performance ways to deploy Perl web stacks. Here > are a few, from the Catalyst docs (Catalyst is one popular Modern Perl web > stack): > > https://metacpan.org/module/Catalyst::Manual::Deployment > > Hope that helps, > > j > Omaha Perl Mongers: http://omaha.pm.org > > > > > > > _______________________________________________ > OLUG mailing list > OLUG at olug.org > https://lists.olug.org/mailman/listinfo/olug > -------------- next part -------------- An HTML attachment was scrubbed... URL: From jay at jays.net Wed Oct 24 11:23:46 2012 From: jay at jays.net (Jay Hannah) Date: Wed, 24 Oct 2012 13:23:46 -0500 Subject: [Omaha.pm] [olug] Apache In-Reply-To: References: Message-ID: <50975ACF-F3B7-4DB4-8DE0-F8EC49EEB8C1@jays.net> On Oct 24, 2012, at 12:56 PM, Jay Bendon wrote: > i figured as much but i prefer Python so my scope with perl is "does it work? OK" :) :) > I think i ended up not going with fast_cgi because the person developing the app wasn't even utilizing FCGI and thus i didn't want the module loaded. Ya, the beauty of using a modern stack is that the developer doesn't have to know or care about deployment. In the case of Catalyst, as a coder I write my web app using the built-in lightweight development "server" and deployment is someone else's problem. The deployer can choose whatever web server(s) s/he is comfortable with, Cool this week, already Popular here, Corporate Approved, or whatever. :) Another example is using PSGI/Plack directly, if you dislike scaffolding. http://plackperl.org/ Or Dancer. https://metacpan.org/module/Dancer::Cookbook#Your-first-Dancer-web-app "There's more than one way to do it." :) j From brian at etcproject.com Wed Oct 24 15:30:00 2012 From: brian at etcproject.com (Brian Edwards) Date: Wed, 24 Oct 2012 17:30:00 -0500 Subject: [Omaha.pm] [olug] Apache In-Reply-To: <50975ACF-F3B7-4DB4-8DE0-F8EC49EEB8C1@jays.net> References: <50975ACF-F3B7-4DB4-8DE0-F8EC49EEB8C1@jays.net> Message-ID: <50886BE8.1050608@etcproject.com> +1 Dancer/Plackup/Starman Dutch # still using perl ;) On 10/24/2012 01:23 PM, Jay Hannah wrote: > On Oct 24, 2012, at 12:56 PM, Jay Bendon wrote: >> i figured as much but i prefer Python so my scope with perl is "does it work? OK" :) > > :) > >> I think i ended up not going with fast_cgi because the person developing the app wasn't even utilizing FCGI and thus i didn't want the module loaded. > > Ya, the beauty of using a modern stack is that the developer doesn't have to know or care about deployment. > > In the case of Catalyst, as a coder I write my web app using the built-in lightweight development "server" and deployment is someone else's problem. The deployer can choose whatever web server(s) s/he is comfortable with, Cool this week, already Popular here, Corporate Approved, or whatever. :) > > Another example is using PSGI/Plack directly, if you dislike scaffolding. http://plackperl.org/ > > Or Dancer. https://metacpan.org/module/Dancer::Cookbook#Your-first-Dancer-web-app > > "There's more than one way to do it." > > :) > > j > > > > > _______________________________________________ > Omaha-pm mailing list > Omaha-pm at pm.org > http://mail.pm.org/mailman/listinfo/omaha-pm > -- Brian Edwards Edwards Technology Consulting, Inc. :: http://etcproject.com brian at etcproject.com From jay at jays.net Thu Oct 25 11:53:39 2012 From: jay at jays.net (Jay Hannah) Date: Thu, 25 Oct 2012 13:53:39 -0500 Subject: [Omaha.pm] [olug] Apache In-Reply-To: <50975ACF-F3B7-4DB4-8DE0-F8EC49EEB8C1@jays.net> References: <50975ACF-F3B7-4DB4-8DE0-F8EC49EEB8C1@jays.net> Message-ID: <868A47BC-D222-4D83-B370-3BAE7EDC33E0@jays.net> On Oct 24, 2012, at 1:23 PM, Jay Hannah wrote: > Or Dancer. https://metacpan.org/module/Dancer::Cookbook#Your-first-Dancer-web-app Or wallflower for "extreme caching." ROFL https://metacpan.org/module/wallflower Just discovered we use this one at $work[0] too. :) http://iinteractive.github.com/ii-presentations/ https://github.com/iinteractive/ii-presentations/tree/gh-pages j From jay.hannah at iinteractive.com Fri Oct 26 09:13:35 2012 From: jay.hannah at iinteractive.com (Jay Hannah) Date: Fri, 26 Oct 2012 11:13:35 -0500 Subject: [Omaha.pm] 2013 Midwest Perl/Moose training? References: <05BC2844-745D-46CD-A610-3AAF97054DE4@iinteractive.com> Message-ID: [Full disclosure: In addition to being the Omaha.pm group leader for 10 years now, I am also an Infinity Interactive employee nowadays.] Hello, Infinity Interactive (the Moose cabal, among other things) is putting together an east coast training tour for 2013. One day, intensive hands-on training on Modern Perl, Moose, etc, with the guys who wrote the actual code. I'm bummed out that the current plan is east coast big city only. I'd love to see the tour also come to the midwest! Do you or your company have a Perl training budget for 2013? If we can get II folks sponsored in your city then I believe they also do low cost (free?) presentations to the local Perl Monger group. I'd love to get these guys out here to the midwest, especially for folks that don't make it out to YAPC and other Perl events. (BTW, if you're not familiar with Infinity, our site at http://iinteractive.github.com/ summarizes a lot of the Open Source/Free Software work we've done and our other community contributions.) Thanks for your time, Jay Hannah Omaha.pm 402-598-7782 http://iinteractive.github.com/