From jay at jays.net Thu Jan 1 09:27:43 2009 From: jay at jays.net (Jay Hannah) Date: Thu, 1 Jan 2009 11:27:43 -0600 Subject: [Omaha.pm] Catalyst::Plugin::FillInForm Message-ID: <03E23EEE-2E28-45C2-8CC3-972AD9073BF9@jays.net> Woot! Another CPAN release I prepped for the author. v0.10 is all me: http://search.cpan.org/~mramberg/Catalyst-Plugin-FillInForm-0.10/lib/ Catalyst/Plugin/FillInForm.pm Yes, yes, I know: Andy is constantly sending releases to CPAN (http:// search.cpan.org/~petdance/). But it's still pretty rare for me, so I'm still excited enough to congratulate myself. :) j From andy at petdance.com Thu Jan 1 09:31:27 2009 From: andy at petdance.com (Andy Lester) Date: Thu, 1 Jan 2009 11:31:27 -0600 Subject: [Omaha.pm] Catalyst::Plugin::FillInForm In-Reply-To: <03E23EEE-2E28-45C2-8CC3-972AD9073BF9@jays.net> References: <03E23EEE-2E28-45C2-8CC3-972AD9073BF9@jays.net> Message-ID: <855B7A88-A6F0-4F7D-9B10-405091667280@petdance.com> On Jan 1, 2009, at 11:27 AM, Jay Hannah wrote: > Woot! Another CPAN release I prepped for the author. v0.10 is all me: > > http://search.cpan.org/~mramberg/Catalyst-Plugin-FillInForm-0.10/lib/Catalyst/Plugin/FillInForm.pm > > Yes, yes, I know: Andy is constantly sending releases to CPAN (http://search.cpan.org/~petdance/ > ). But it's still pretty rare for me, so I'm still excited enough to > congratulate myself. :) That's very cool. Contributing to projects need not be a competition! -- Andy Lester => andy at petdance.com => www.petdance.com => AIM:petdance From jay at jays.net Fri Jan 2 09:01:42 2009 From: jay at jays.net (Jay Hannah) Date: Fri, 02 Jan 2009 11:01:42 -0600 Subject: [Omaha.pm] Catalyst::Plugin::FillInForm In-Reply-To: <855B7A88-A6F0-4F7D-9B10-405091667280@petdance.com> References: <03E23EEE-2E28-45C2-8CC3-972AD9073BF9@jays.net> <855B7A88-A6F0-4F7D-9B10-405091667280@petdance.com> Message-ID: <495E4876.5050302@jays.net> Andy Lester wrote: > That's very cool. Contributing to projects need not be a competition! How could I know when I'm winning if I don't keep score? ;) Laugh, j From jay at jays.net Fri Jan 2 09:10:02 2009 From: jay at jays.net (Jay Hannah) Date: Fri, 02 Jan 2009 11:10:02 -0600 Subject: [Omaha.pm] WebGUI CMS Message-ID: <495E4A6A.4090201@jays.net> If you're ever shopping for a Content Management System, you might give WebGUI a try. http://www.plainblack.com/webgui We're using it at UNO and just got some of the API and direct-table-hackery figured out... https://clabsvn.ist.unomaha.edu/anonsvn/CLAB/WebGUI.pm "API demo" at the bottom BioCMS is built with WebGUI: https://biodev.ist.unomaha.edu/ j From andy at petdance.com Fri Jan 2 09:13:30 2009 From: andy at petdance.com (Andy Lester) Date: Fri, 2 Jan 2009 11:13:30 -0600 Subject: [Omaha.pm] WebGUI CMS In-Reply-To: <495E4A6A.4090201@jays.net> References: <495E4A6A.4090201@jays.net> Message-ID: <2845CE37-6CE7-4406-A246-477C92EE977F@petdance.com> On Jan 2, 2009, at 11:10 AM, Jay Hannah wrote: > If you're ever shopping for a Content Management System, you might > give WebGUI a try. > > http://www.plainblack.com/webgui The funny thing about WebGUI is that JT & Co have so many installed users and you never hear about it. xoxo, Andy -- Andy Lester => andy at petdance.com => www.petdance.com => AIM:petdance From oak83 at cox.net Fri Jan 2 18:35:37 2009 From: oak83 at cox.net (oak83 at cox.net) Date: Fri, 2 Jan 2009 21:35:37 -0500 Subject: [Omaha.pm] Test Questions Message-ID: <20090102213537.28PT8.159120.imail@eastrmwml11> Gents, I need some clarification on these if you do not mind? I am shaky on these. I will try to write these and see what happens. Any input is greatly appreciated. What is the value of the expression length(1+2+3) ? 5 or 6 or Am I off base? 1 5 6 0 The expression $a = $b++ * ++$c has the same effect on $a, $b, and $c as which of the following? Think it is the 2nd one? $a = $b * $c; $a = ($b + 1) * ($c + 1); $c = $c + 1; $a = $b * $c; $b = $b + 1; $a = $b * ($c + 1); When is this logical expression true: lc($a) eq $a ? Think it is the 3rd one? Never Always When $a contains no uppercase letters When $a contains no lowercase letters What is the result of @a = split(" ", "Hello, do you Yahoo?");? Empty for now? @a contains "Hello, do you Yahoo?". @a contains ("Hello", "do", "you", "Yahoo"). @a contains an empty list @a contains ("Hello,", "do", "you", "Yahoo?"). When reading the contents of a directory, you can use code like this - $entry = readdir(DIRHANDLE); - in a loop to read the directory entries one at a time. How can you read all the directory entries in one call? Not how I would do it? I would chdir and open it It's not possible. Use a different call: @entries = readdirentries(DIRHANDLE);. Pass an array variable to readdir(): readdir(DIRHANDLE, @entries); Use readdir() in a list context: @entries = readdir(DIRHANDLE);. What is accomplished by passing a subroutine name to sort() - for example: sort my_subroutine (@array)? Third One The subroutine is called instead of sort. The subroutine affects the sort order by defining how to compare elements. The subroutine is called for each element before sorting begins. The subroutine is called for each element after sorting ends. If $a contains the string "Hello world", what is the result of this regular expression substitution: $a =~ s/^(.*)\s(.*)$/\2\1/ ? 2nd or 3rd one? "Helloworld" "world Hello" "worldHello" "Hello world" My array @a contains a list of words. How can I create a new list containing only those words from @a that begin with capital letters? 2 or 4 1. @a =~ m/^[A-Z]/; split(/^[A-Z]/, @a); @a =~ s/\s[^A-Z]\S*\s/ /; grep(/^[A-Z]/, @a); 2. Using Perl's object-oriented features, what does this code do: $computer = Personal::Computer->new(); $computer->reboot();. 4th one? Reboots your computer. Calls a class method reboot() on the class Personal::Computer. Creates a new method named reboot(). Creates an object of class Personal::Computer and calls its reboot() method. What's the difference between these two ways of running an external program named showmem: system("showmem");`showmem`; ? ? You can send data from the script to system("showmem"), but not to `showmem`. You can run a graphical application with system(), but not with ``. system("showmem") captures the output into a string in the Perl script, while `showmem` sends its output to stdout. system("showmem") sends its output to stdout, while `showmem` captures the output into a string in the Perl script. I have two hash variables, %a and %b. I wish to create an array @a with elements containing references to these two hashes. How do I do it? 4th one @a = (\%a, \%b); @a = (%a, %b); @a = (%%a, %%b); @a = (%$a, %$b); What does this do: open(PIPE, "| sum | sort");? ? Adds columns of numbers written to the PIPE file handle and sorts the results. Runs two external programs named sum and sort. The script can send data to sum by writing to PIPE, sum's output is read by sort, and sort's output goes to stdout. Runs two external programs named sum and sort. The input to sum comes from stdin, sum's output is read by sort, and the script can read sort's output from the PIPE file handle. Runs two external programs named sum and sort. The script sends data to sum by writing to the PIPE file handle. After sum stops running, the script sends data to sort by writing to the PIPE file handle. From dan at linder.org Sat Jan 3 19:36:06 2009 From: dan at linder.org (Dan Linder) Date: Sat, 3 Jan 2009 21:36:06 -0600 Subject: [Omaha.pm] Test Questions In-Reply-To: <20090102213537.28PT8.159120.imail@eastrmwml11> References: <20090102213537.28PT8.159120.imail@eastrmwml11> Message-ID: <3e2be50901031936q3ba38cadw8722a0c526c34f52@mail.gmail.com> I'll take a stab...though this really sounds like test questions copied verbatim... :-\ On Fri, Jan 2, 2009 at 8:35 PM, wrote: > Gents, I need some clarification on these if you do not mind? I am shaky on > these. I will try to write these and see what happens. Any input is greatly > appreciated. > > What is the value of the expression length(1+2+3) ? 5 or 6 or Am I off > base? > When I ran this snippet of code: printf ("len:%i\n", length(1+2+3)); I got back "1". That sounds right since the perldoc.perl.org site says that length "returns the length in *characters* of the value of EXPR" Thus, the math is done first (1+2+3) and results in 6. That value is then converted to a string ("6"), which has a length of 1. > The expression $a = $b++ * ++$c has the same effect on $a, $b, and $c as > which of the following? Think it is the 2nd one? > > $a = $b * $c; > > $a = ($b + 1) * ($c + 1); > > $c = $c + 1; $a = $b * $c; $b = $b + 1; > > $a = $b * ($c + 1); > I had to double check the Perl.com perlop reference ( http://www.perl.com/doc/manual/html/pod/perlop.html), but the C precedence I remembered from CS many years ago still holds. Since "$b++" means "increment the $b variable AFTER returning it's current value to the expression using it", and "++$c" means "increment $c and return the new value to the expression." Since the ++ are tightly bound to the variable, the multiply doesn't affect the overall value, so the third example: $c = $c + 1; $a = $b * $c; $b = $b + 1; Is a different way to write it. > When is this logical expression true: lc($a) eq $a ? Think it is the 3rd > one? > > Never > > Always > > When $a contains no uppercase letters > > When $a contains no lowercase letters The third one. I think that's enough for now. I didn't see you have submitted a dozen questions... My initial instinct that these are test questions is feeling more certain. If this was some sort of a take-home test, how hard would it be to write a small bit of code to test each one if you're not 100% sure? (That's what I did on the $b++ * ++$c question...) If this isn't a test, why not point us toward the source code you're debugging and it might make more sense. Dan -- "Quis custodiet ipsos custodes?" (Who can watch the watchmen?) -- from the Satires of Juvenal "I do not fear computers, I fear the lack of them." -- Isaac Asimov (Author) ** *** ***** ******* *********** ************* -------------- next part -------------- An HTML attachment was scrubbed... URL: From jay at jays.net Mon Jan 5 16:01:16 2009 From: jay at jays.net (Jay Hannah) Date: Mon, 5 Jan 2009 18:01:16 -0600 Subject: [Omaha.pm] Fwd: [Kc] Frozen Perl 2009 conference References: <6c70d2980901051552sbcd2ec4i958732916f5c378d@mail.gmail.com> Message-ID: <3F3BA1C8-1DB8-40F9-8022-6C480F7064D5@jays.net> Ooo... If Andrew is driving through Omaha anyway (?), maybe he could pick up some Omaha.pm's along the way? Suddenly I might be interested? -ponder- Gotta love icy, death-defying road trips to the frozen north! j Begin forwarded message: > From: "Andrew Moore" > Date: January 5, 2009 5:52:30 PM CST > To: kc > Subject: [Kc] Frozen Perl 2009 conference > > Hi KCers - > > Here's a reminder about the Frozen Perl conference in Minneapolis in > February. I'll probably be headed up there, and I may even be driving, > so let me know if you're headed that way. > > -Andy > > > > ---------- Forwarded message ---------- > From: Seth Viebrock > Date: Mon, Jan 5, 2009 at 5:43 PM > Subject: Perl Monger Admins: Please forward to list if you haven't > received any advertisement for the Frozen Perl 2009 conference. Thank > you! > To: > > > Frozen Perl is a three day event held at the University of Minnesota's > McNamara Alumni Center in Minneapolis, MN. The main event is a > one-day, two-track workshop on Saturday, February 7. > > There will also be a Perl class taught by brian d foy of Stonehenge > Consulting on Friday, February 6, and a hackathon on Sunday, February > 8. This class is being offered at a very low rate of $100 per person, > and there are 4 student seats available at $25 each. > > The early bird price for the conference is $20 at the > student/low-income rate, and $40 for everyone else. These prices will > double on January 12, 2009. We also have an individual sponsorship > rate of $120 if you'd like to give a little extra to support the > workshop. > > You can register for the conference at http://www.frozen-perl.org/ > > Thank you for your time and support! > The Frozen Perl 2009 Organizers > _______________________________________________ > kc mailing list > kc at pm.org > http://mail.pm.org/mailman/listinfo/kc From andy at petdance.com Mon Jan 5 18:58:38 2009 From: andy at petdance.com (Andy Lester) Date: Mon, 5 Jan 2009 20:58:38 -0600 Subject: [Omaha.pm] Fwd: [Kc] Frozen Perl 2009 conference In-Reply-To: <3F3BA1C8-1DB8-40F9-8022-6C480F7064D5@jays.net> References: <6c70d2980901051552sbcd2ec4i958732916f5c378d@mail.gmail.com> <3F3BA1C8-1DB8-40F9-8022-6C480F7064D5@jays.net> Message-ID: On Jan 5, 2009, at 6:01 PM, Jay Hannah wrote: > Gotta love icy, death-defying road trips to the frozen north! There was no problem getting to Minneapolis last year. It was getting back that was exciting: http://flickr.com/photos/petdance/2392116965/in/photostream/ xoxo, Andy -- Andy Lester => andy at petdance.com => www.petdance.com => AIM:petdance From amoore at mooresystems.com Mon Jan 5 17:16:03 2009 From: amoore at mooresystems.com (Andrew Moore) Date: Mon, 5 Jan 2009 19:16:03 -0600 Subject: [Omaha.pm] [Kc] Frozen Perl 2009 conference In-Reply-To: <3F3BA1C8-1DB8-40F9-8022-6C480F7064D5@jays.net> References: <6c70d2980901051552sbcd2ec4i958732916f5c378d@mail.gmail.com> <3F3BA1C8-1DB8-40F9-8022-6C480F7064D5@jays.net> Message-ID: <6c70d2980901051716v3f8abb39kf87f4903d5f50241@mail.gmail.com> I had the same excitement about the icy, death-defying trip! But, woudn't I go through Des Moines directly? I'll keep the Omaha gang posted on my plans. -Andy On Mon, Jan 5, 2009 at 6:01 PM, Jay Hannah wrote: > Ooo... If Andrew is driving through Omaha anyway (?), maybe he could pick up > some Omaha.pm's along the way? > > Suddenly I might be interested? -ponder- > > Gotta love icy, death-defying road trips to the frozen north! > > j > > From amoore at mooresystems.com Mon Jan 5 19:31:27 2009 From: amoore at mooresystems.com (Andrew Moore) Date: Mon, 5 Jan 2009 21:31:27 -0600 Subject: [Omaha.pm] Fwd: [Kc] Frozen Perl 2009 conference In-Reply-To: References: <6c70d2980901051552sbcd2ec4i958732916f5c378d@mail.gmail.com> <3F3BA1C8-1DB8-40F9-8022-6C480F7064D5@jays.net> Message-ID: <6c70d2980901051931h6a63c6c6x625f5845ca568f7a@mail.gmail.com> On Mon, Jan 5, 2009 at 8:58 PM, Andy Lester wrote: > > On Jan 5, 2009, at 6:01 PM, Jay Hannah wrote: > >> Gotta love icy, death-defying road trips to the frozen north! > > > There was no problem getting to Minneapolis last year. > > It was getting back that was exciting: > http://flickr.com/photos/petdance/2392116965/in/photostream/ Ug. Oh yeah. I'll probably grab one of those $300 flights. -Andy From oak83 at cox.net Tue Jan 6 17:35:14 2009 From: oak83 at cox.net (oak83 at cox.net) Date: Tue, 6 Jan 2009 20:35:14 -0500 Subject: [Omaha.pm] Test Questions In-Reply-To: <3e2be50901031936q3ba38cadw8722a0c526c34f52@mail.gmail.com> Message-ID: <20090106203514.N4I7M.190660.imail@eastrmwml11> Thanks Dan, Have not done any Perl since Creighton 10 years ago. Had a 36 question test and I was not sure on these. I have my framework code done to do the parsing I need at work. I had to beg to get an account on a test Suse 9 server. At my last job I had Active State and Cygwin configured pretty good but the new job is a crappy Windows shop. Too many huge databases that need to be cubed. Take Care, Tom ---- Dan Linder wrote: > I'll take a stab...though this really sounds like test questions copied > verbatim... :-\ > > On Fri, Jan 2, 2009 at 8:35 PM, wrote: > > > Gents, I need some clarification on these if you do not mind? I am shaky on > > these. I will try to write these and see what happens. Any input is greatly > > appreciated. > > > > What is the value of the expression length(1+2+3) ? 5 or 6 or Am I off > > base? > > > > When I ran this snippet of code: > printf ("len:%i\n", length(1+2+3)); > > I got back "1". That sounds right since the perldoc.perl.org site says that > length "returns the length in *characters* of the value of EXPR" Thus, the > math is done first (1+2+3) and results in 6. That value is then converted > to a string ("6"), which has a length of 1. > > > > The expression $a = $b++ * ++$c has the same effect on $a, $b, and $c as > > which of the following? Think it is the 2nd one? > > > > $a = $b * $c; > > > > $a = ($b + 1) * ($c + 1); > > > > $c = $c + 1; $a = $b * $c; $b = $b + 1; > > > > $a = $b * ($c + 1); > > > > I had to double check the Perl.com perlop reference ( > http://www.perl.com/doc/manual/html/pod/perlop.html), but the C precedence I > remembered from CS many years ago still holds. > > Since "$b++" means "increment the $b variable AFTER returning it's current > value to the expression using it", and "++$c" means "increment $c and return > the new value to the expression." Since the ++ are tightly bound to the > variable, the multiply doesn't affect the overall value, so the third > example: > $c = $c + 1; $a = $b * $c; $b = $b + 1; > Is a different way to write it. > > > > When is this logical expression true: lc($a) eq $a ? Think it is the 3rd > > one? > > > > Never > > > > Always > > > > When $a contains no uppercase letters > > > > When $a contains no lowercase letters > > > The third one. > > I think that's enough for now. I didn't see you have submitted a dozen > questions... My initial instinct that these are test questions is feeling > more certain. > > If this was some sort of a take-home test, how hard would it be to write a > small bit of code to test each one if you're not 100% sure? (That's what I > did on the $b++ * ++$c question...) > > If this isn't a test, why not point us toward the source code you're > debugging and it might make more sense. > > Dan > > -- > "Quis custodiet ipsos custodes?" (Who can watch the watchmen?) -- from the > Satires of Juvenal > "I do not fear computers, I fear the lack of them." -- Isaac Asimov (Author) > ** *** ***** ******* *********** ************* From jay at jays.net Thu Jan 8 08:38:04 2009 From: jay at jays.net (Jay Hannah) Date: Thu, 08 Jan 2009 10:38:04 -0600 Subject: [Omaha.pm] [Kc] Frozen Perl 2009 conference In-Reply-To: <99dd19c90901071117y349847ach6b6afcfb2632e8eb@mail.gmail.com> References: <6c70d2980901051552sbcd2ec4i958732916f5c378d@mail.gmail.com> <99dd19c90901071116me52ff97s71cbbe8ea1035074@mail.gmail.com> <99dd19c90901071117y349847ach6b6afcfb2632e8eb@mail.gmail.com> Message-ID: <49662BEC.20306@jays.net> djgoku wrote: > Forgot to add I would be up for carpooling. > http://www.frozen-perl.org/mpw2009/ So is anyone actually driving up from KC? If so maybe I'd drive to Des Moines and carpool from there? -ponder- j Omaha.pm From jay at jays.net Thu Jan 8 08:44:36 2009 From: jay at jays.net (Jay Hannah) Date: Thu, 08 Jan 2009 10:44:36 -0600 Subject: [Omaha.pm] [Kc] Frozen Perl 2009 conference In-Reply-To: <49662BEC.20306@jays.net> References: <6c70d2980901051552sbcd2ec4i958732916f5c378d@mail.gmail.com> <99dd19c90901071116me52ff97s71cbbe8ea1035074@mail.gmail.com> <99dd19c90901071117y349847ach6b6afcfb2632e8eb@mail.gmail.com> <49662BEC.20306@jays.net> Message-ID: <49662D74.7050001@jays.net> Jay Hannah wrote: > http://www.frozen-perl.org/mpw2009/ > > So is anyone actually driving up from KC? If so maybe I'd drive to Des > Moines and carpool from there? -ponder- I wonder if I could/should be trying to talk my sister in law into letting me borrow their crazy-huge airport shuttle sized van... or what does it cost to rent one? :) Any takers? More than one? j ...Bravely Bold Sir Robin rode forth from Camelot. He was not afraid to die, oh Brave Sir Robin!... From jay at jays.net Sun Jan 11 01:48:31 2009 From: jay at jays.net (Jay Hannah) Date: Sun, 11 Jan 2009 03:48:31 -0600 Subject: [Omaha.pm] Next meeting: Jan 13 In-Reply-To: <34c74d710901101647o38ad38d8s4ac566d96a355669@mail.gmail.com> References: <34c74d710901101647o38ad38d8s4ac566d96a355669@mail.gmail.com> Message-ID: <2FC732B8-F1C9-497A-A1C1-AB6F1A6A44C7@jays.net> On Jan 10, 2009, at 6:47 PM, Blaine Buxton wrote: > The next meeting of ODYNUG is upon us. It snuck up on me! Anyway, I > have a slight prediciment and need some help. Unfortunately, our > speaker for this month had to back out. So, what I'm asking what do > you guys want to do? We could do a sharing meeting (show off what > you are loving in frameworks, languages, etc) or if anyone wants > just to get up and talk. Let's discuss! I can present any of my usual shtick: http://jays.net/wiki/ODynUG#Volunteers I've been doing a lot of Catalyst (Perl web framework) lately, so that would be my most natural presentation. Our Catalyst website at $work went live on Dec. 6: https://ssl.omnihotels.com/ https://ssl.omnihotels.com/?debug_mode=1 So I could give a tour of that, and/or start new website(s) from scratch and demo debugging in the l33t hax0r5 Catalyst dev server - grin-. We use Template Toolkit for all the HTML, which is wicked slick. There was a rumor I might be presenting some of this at UNO this semester, so maybe I better get on the ball. :) j From dan at linder.org Tue Jan 13 07:07:04 2009 From: dan at linder.org (Dan Linder) Date: Tue, 13 Jan 2009 09:07:04 -0600 Subject: [Omaha.pm] silly warnings In-Reply-To: <8418B7F8-AB12-4F8D-BF65-D7023F3F12E5@jays.net> References: <396CEDAA86B38646ACE2FEAA22C3FBF1EDBB43@l3exchange.omnihotels.net> <8418B7F8-AB12-4F8D-BF65-D7023F3F12E5@jays.net> Message-ID: <3e2be50901130707jfcf427bwb92b49d2ce2b003f@mail.gmail.com> Jay Hannah wrote: > next if ($audit->{$date} && $audit->{$date}->{$hotel} && $audit->{$date}->{$hotel} > 0); Sterling Hanenkamp wrote: > I usually prefer: > next if ($audit->{$date}{$hotel} || 0) > 0; Ok, I'm getting a similar issue with this bit of code: 55 } else { 56 ($value, $parm)=split(/\s+/,$line,2); 57 $myhash1{$section_name}{$parm} = $value; 58 } Line 57 is spitting a lot of "Use of unitialized value in hash element" warnings -- I'm pretty certain it's because of the newly defined %myhash1hash instantly having the $section_name and $parm keys used right away. I tried putting in these lines between 56 and 57: 55 } else { 56 ($value, $parm)=split(/\s+/,$line,2); 57 ($myhash1{$section_name} || 0); 58 ($myhash1{$section_name}{$parm} || 0); 59 $myhash1{$section_name}{$parm} = $value; 60 } ...but the warnings still persist. Aside from turning off warnings for these lines, is there a better way to handle this? Should I be pre-loading the "$myhash1{$section_name}" branch first before adding the "{$parm}" branch to it? Dan -- "Quis custodiet ipsos custodes?" (Who can watch the watchmen?) -- from the Satires of Juvenal "I do not fear computers, I fear the lack of them." -- Isaac Asimov (Author) ** *** ***** ******* *********** ************* -------------- next part -------------- An HTML attachment was scrubbed... URL: From dan at linder.org Wed Jan 14 14:32:00 2009 From: dan at linder.org (Dan Linder) Date: Wed, 14 Jan 2009 16:32:00 -0600 Subject: [Omaha.pm] silly warnings In-Reply-To: <3e2be50901130707jfcf427bwb92b49d2ce2b003f@mail.gmail.com> References: <396CEDAA86B38646ACE2FEAA22C3FBF1EDBB43@l3exchange.omnihotels.net> <8418B7F8-AB12-4F8D-BF65-D7023F3F12E5@jays.net> <3e2be50901130707jfcf427bwb92b49d2ce2b003f@mail.gmail.com> Message-ID: <3e2be50901141432y75324f3awa72b2ea3ae000352@mail.gmail.com> Wow, did I stump all the Perl experts, or did everyone go on vacation? ;-) Another thought I had: Is it possible to "define $hash{$key}" manually without assigning a value to it? (i.e. the opposite of "undef $hash{$key}") Dan On Tue, Jan 13, 2009 at 9:07 AM, Dan Linder wrote: > Jay Hannah wrote: > > next if ($audit->{$date} && $audit->{$date}->{$hotel} && > $audit->{$date}->{$hotel} > 0); > > Sterling Hanenkamp wrote: > > I usually prefer: > > next if ($audit->{$date}{$hotel} || 0) > 0; > > Ok, I'm getting a similar issue with this bit of code: > 55 } else { > 56 ($value, $parm)=split(/\s+/,$line,2); > 57 $myhash1{$section_name}{$parm} = $value; > 58 } > > Line 57 is spitting a lot of "Use of unitialized value in hash element" > warnings -- I'm pretty certain it's because of the newly defined %myhash1hash instantly having the $section_name and $parm keys used right away. > > I tried putting in these lines between 56 and 57: > 55 } else { > 56 ($value, $parm)=split(/\s+/,$line,2); > 57 ($myhash1{$section_name} || 0); > 58 ($myhash1{$section_name}{$parm} || 0); > 59 $myhash1{$section_name}{$parm} = $value; > 60 } > ...but the warnings still persist. > > Aside from turning off warnings for these lines, is there a better way to > handle this? Should I be pre-loading the "$myhash1{$section_name}" branch > first before adding the "{$parm}" branch to it? > > Dan > > -- > "Quis custodiet ipsos custodes?" (Who can watch the watchmen?) -- from the > Satires of Juvenal > "I do not fear computers, I fear the lack of them." -- Isaac Asimov > (Author) > ** *** ***** ******* *********** ************* > -- "Quis custodiet ipsos custodes?" (Who can watch the watchmen?) -- from the Satires of Juvenal "I do not fear computers, I fear the lack of them." -- Isaac Asimov (Author) ** *** ***** ******* *********** ************* -------------- next part -------------- An HTML attachment was scrubbed... URL: From tedkat at gmail.com Wed Jan 14 14:54:18 2009 From: tedkat at gmail.com (Theodore Katseres) Date: Wed, 14 Jan 2009 16:54:18 -0600 Subject: [Omaha.pm] silly warnings In-Reply-To: <3e2be50901141432y75324f3awa72b2ea3ae000352@mail.gmail.com> References: <396CEDAA86B38646ACE2FEAA22C3FBF1EDBB43@l3exchange.omnihotels.net> <8418B7F8-AB12-4F8D-BF65-D7023F3F12E5@jays.net> <3e2be50901130707jfcf427bwb92b49d2ce2b003f@mail.gmail.com> <3e2be50901141432y75324f3awa72b2ea3ae000352@mail.gmail.com> Message-ID: On Wed, Jan 14, 2009 at 4:32 PM, Dan Linder wrote: > Wow, did I stump all the Perl experts, or did everyone go on vacation? ;-) > I'm not an expert but I give it a go :) Another thought I had: Is it possible to "define $hash{$key}" manually > without assigning a value to it? (i.e. the opposite of "undef $hash{$key}") > Yes but a warning will pop up in it's place "Useless use of hash element in void context" > Dan > On Tue, Jan 13, 2009 at 9:07 AM, Dan Linder wrote: > >> Jay Hannah wrote: >> > next if ($audit->{$date} && $audit->{$date}->{$hotel} && >> $audit->{$date}->{$hotel} > 0); >> >> Sterling Hanenkamp wrote: >> > I usually prefer: >> > next if ($audit->{$date}{$hotel} || 0) > 0; >> >> Ok, I'm getting a similar issue with this bit of code: >> 55 } else { >> 56 ($value, $parm)=split(/\s+/,$line,2); >> 57 $myhash1{$section_name}{$parm} = $value; >> 58 } >> >> Line 57 is spitting a lot of "Use of unitialized value in hash element" >> warnings -- I'm pretty certain it's because of the newly defined %myhash1hash instantly having the $section_name and $parm keys used right away. > > Make sure that each var in the hash key is defined. >> I tried putting in these lines between 56 and 57: >> 55 } else { >> 56 ($value, $parm)=split(/\s+/,$line,2); > > $parm = '' unless ( defined $parm ); $section_name = '' unless ( defined $parm ); > 57 ($myhash1{$section_name} || 0); >> 58 ($myhash1{$section_name}{$parm} || 0); >> 59 $myhash1{$section_name}{$parm} = $value; >> 60 } >> ...but the warnings still persist. >> >> Aside from turning off warnings for these lines, is there a better way to >> handle this? Should I be pre-loading the "$myhash1{$section_name}" branch >> first before adding the "{$parm}" branch to it? > > That will take care of the warnings but it might hide a bug too :P -- Ted Katseres ||=O=|| -------------- next part -------------- An HTML attachment was scrubbed... URL: From dan at linder.org Thu Jan 15 08:08:57 2009 From: dan at linder.org (Dan Linder) Date: Thu, 15 Jan 2009 10:08:57 -0600 Subject: [Omaha.pm] silly warnings In-Reply-To: References: <396CEDAA86B38646ACE2FEAA22C3FBF1EDBB43@l3exchange.omnihotels.net> <8418B7F8-AB12-4F8D-BF65-D7023F3F12E5@jays.net> <3e2be50901130707jfcf427bwb92b49d2ce2b003f@mail.gmail.com> <3e2be50901141432y75324f3awa72b2ea3ae000352@mail.gmail.com> Message-ID: <3e2be50901150808r55fe85b1m2ad279619f66ad39@mail.gmail.com> On Wed, Jan 14, 2009 at 4:32 PM, Dan Linder wrote: > Another thought I had: Is it possible to "define $hash{$key}" manually > without assigning a value to it? (i.e. the opposite of "undef $hash{$key}") > On Wed, Jan 14, 2009 at 4:54 PM, Theodore Katseres wrote: > Yes but a warning will pop up in it's place "Useless use of hash element in void context" IIRC, I ran across that using the "($hash{$key} || 0);" idea. Later: > Make sure that each var in the hash key is defined. I'd like to, but the keys are coming in as a file is processed and the keys come directly from the file. I'll try defining the new key one step at a time and see what that produces. Later: > That will take care of the warnings but it might hide a bug too :P I know there's a few options that can be appended to the "use strict" line - which one will apply to this hash key issue? My Google search term MoJo isn't finding the information. Thanks, Dan -- "Quis custodiet ipsos custodes?" (Who can watch the watchmen?) -- from the Satires of Juvenal "I do not fear computers, I fear the lack of them." -- Isaac Asimov (Author) ** *** ***** ******* *********** ************* -------------- next part -------------- An HTML attachment was scrubbed... URL: From tedkat at gmail.com Thu Jan 15 08:41:35 2009 From: tedkat at gmail.com (Theodore Katseres) Date: Thu, 15 Jan 2009 10:41:35 -0600 Subject: [Omaha.pm] silly warnings In-Reply-To: <3e2be50901150808r55fe85b1m2ad279619f66ad39@mail.gmail.com> References: <396CEDAA86B38646ACE2FEAA22C3FBF1EDBB43@l3exchange.omnihotels.net> <8418B7F8-AB12-4F8D-BF65-D7023F3F12E5@jays.net> <3e2be50901130707jfcf427bwb92b49d2ce2b003f@mail.gmail.com> <3e2be50901141432y75324f3awa72b2ea3ae000352@mail.gmail.com> <3e2be50901150808r55fe85b1m2ad279619f66ad39@mail.gmail.com> Message-ID: On Thu, Jan 15, 2009 at 10:08 AM, Dan Linder wrote: > On Wed, Jan 14, 2009 at 4:32 PM, Dan Linder wrote: > > Another thought I had: Is it possible to "define $hash{$key}" manually > > without assigning a value to it? (i.e. the opposite of "undef > $hash{$key}") > >> > On Wed, Jan 14, 2009 at 4:54 PM, Theodore Katseres wrote: > > Yes but a warning will pop up in it's place "Useless use of hash element > in void context" > > IIRC, I ran across that using the "($hash{$key} || 0);" idea. > > Later: > > Make sure that each var in the hash key is defined. > > I'd like to, but the keys are coming in as a file is processed and the keys > come directly from the file. > > I'll try defining the new key one step at a time and see what that > produces. > > Later: > > That will take care of the warnings but it might hide a bug too :P > > I know there's a few options that can be appended to the "use strict" line > - which one will apply to this hash key issue? My Google search term MoJo > isn't finding the information. If you just want to turn warnings off the best you could get without re-coding the block would be to add C after line 55. -- Ted Katseres ||=O=|| -------------- next part -------------- An HTML attachment was scrubbed... URL: From dan at linder.org Thu Jan 15 11:18:57 2009 From: dan at linder.org (Dan Linder) Date: Thu, 15 Jan 2009 13:18:57 -0600 Subject: [Omaha.pm] silly warnings In-Reply-To: References: <396CEDAA86B38646ACE2FEAA22C3FBF1EDBB43@l3exchange.omnihotels.net> <8418B7F8-AB12-4F8D-BF65-D7023F3F12E5@jays.net> <3e2be50901130707jfcf427bwb92b49d2ce2b003f@mail.gmail.com> <3e2be50901141432y75324f3awa72b2ea3ae000352@mail.gmail.com> <3e2be50901150808r55fe85b1m2ad279619f66ad39@mail.gmail.com> Message-ID: <3e2be50901151118p6c6f663auf011c679b6922ac3@mail.gmail.com> Theodore Katseres wrote: > If you just want to turn warnings off the best you could get without > re-coding the block would be to add C after line 55. >From this site URL: http://www.xav.com/perl/lib/Pod/perllexwarn.html Looks like I need to wrapper line 55 like this: 55 } else { 56 ($value, $parm)=split(/\s+/,$line,2); no warnings qw(uninitialized); 57 $myhash1{$section_name}{$parm} = $value; use warnings qw(uninitialized); 58 } When I get back to that project I'll give it a shot. Thanks for the hint Theodore! Dan -- "Quis custodiet ipsos custodes?" (Who can watch the watchmen?) -- from the Satires of Juvenal "I do not fear computers, I fear the lack of them." -- Isaac Asimov (Author) ** *** ***** ******* *********** ************* -------------- next part -------------- An HTML attachment was scrubbed... URL: From jay at jays.net Sat Jan 17 08:36:26 2009 From: jay at jays.net (Jay Hannah) Date: Sat, 17 Jan 2009 10:36:26 -0600 Subject: [Omaha.pm] Fwd: [pm_groups] GSoC 2009 - can your .pm pledge a student? References: <200901151233.43798.scratchcomputing@gmail.com> Message-ID: Any non-swamped students / mentors out there? j Begin forwarded message: > From: Eric Wilhelm > Date: January 15, 2009 2:33:43 PM CST > To: pm_groups at pm.org > Cc: Jonathan Leto > Subject: [pm_groups] GSoC 2009 - can your .pm pledge a student? > > Hello all, > > Jonathan Leto has stepped-up to take the wheel for the Summer of Code > effort and would like to enlist your help to contact potential > students. > > http://leto.net/dukeleto.pl/2009/01/perl-monger-parallelism.html > > We did a great job of enlisting mentors last year, so please help us > balance that equation with students this year. > > From jay at jays.net Sat Jan 17 08:38:10 2009 From: jay at jays.net (Jay Hannah) Date: Sat, 17 Jan 2009 10:38:10 -0600 Subject: [Omaha.pm] Fwd: [pm_groups] Summer of Code 2009 - engaging with students References: <200901082324.22666.scratchcomputing@gmail.com> Message-ID: <15A005B5-3E34-4DA2-B544-85360AD9429A@jays.net> More GSoC info. j Begin forwarded message: > From: Eric Wilhelm > Date: January 9, 2009 1:24:22 AM CST > To: pm_groups at pm.org > Cc: tpf-steering at perl.org, directors at lists.parrot.org > Subject: [pm_groups] Summer of Code 2009 - engaging with students > > Hi everybody, > > It's very cold here. Time to start thinking about summer! > > The student proposals for Google's Summer of Code will be due in a > couple short months and Google has just given word that the program > will indeed be on again this year. > > For 2008, we had a great turnout of willing and able mentors, but only > about 16 student applications. This implies that we need to try to > reach more students and encourage them to apply for summer of code > this > year. > > We'll probably start to see more information from Google about SOC > 2009 > within a month or so. For now: > > http://tinyurl.com/9r55v3 > > Last year taught us that the returning organizations which started > early > were more successful in recruiting students. While we can't say for > sure that Perl/Parrot will be accepted as mentor organizations, we'll > get a very late start if we wait. If it (knock on wood) doesn't > happen, the Perl community will still benefit from efforts to connect > with more students. > > The following are just a few ideas of what your local Perl Mongers > group > could do to help. Please forward this to your mailing list or discuss > it at your next meeting. > > Find out if your local university has Perl in the curriculum. If so, > get in touch with the professors and let them know about your local > Perl Mongers group. Ask if they would be interested in you > speaking to > their class or giving a presentation on-campus. > > If the computer science department doesn't seem interested in Perl, > you > might find users (or potential users) in other departments. Think > about all of the niche data-crunching for which Perl gets used. Find > grad students who might be doing that - whatever their major might be. > > Are any members of your group recently graduated? If so, the contacts > they still have might be a great place to start, especially in non-cs > disciplines. Even in very specialized applications, the chances are > that the Perl community contains a mentor with a related background. > > Finally, I would be interested in hearing from any Perl Mongers groups > which have been involved with on-campus activities or are meeting on > campus. Please send me mail about what you are doing, or even write > about it on use.perl. > > Thanks, > Eric > -- > Request pm.org Technical Support via support at pm.org > > pm_groups mailing list > pm_groups at pm.org > http://mail.pm.org/mailman/listinfo/pm_groups From jay at jays.net Sat Jan 17 08:50:59 2009 From: jay at jays.net (Jay Hannah) Date: Sat, 17 Jan 2009 10:50:59 -0600 Subject: [Omaha.pm] silly warnings In-Reply-To: <3e2be50901151118p6c6f663auf011c679b6922ac3@mail.gmail.com> References: <396CEDAA86B38646ACE2FEAA22C3FBF1EDBB43@l3exchange.omnihotels.net> <8418B7F8-AB12-4F8D-BF65-D7023F3F12E5@jays.net> <3e2be50901130707jfcf427bwb92b49d2ce2b003f@mail.gmail.com> <3e2be50901141432y75324f3awa72b2ea3ae000352@mail.gmail.com> <3e2be50901150808r55fe85b1m2ad279619f66ad39@mail.gmail.com> <3e2be50901151118p6c6f663auf011c679b6922ac3@mail.gmail.com> Message-ID: On Jan 15, 2009, at 1:18 PM, Dan Linder wrote: > From this site URL: http://www.xav.com/perl/lib/Pod/perllexwarn.html > Looks like I need to wrapper line 55 like this: > > 55 } else { > 56 ($value, $parm)=split(/\s+/,$line,2); > no warnings qw(uninitialized); > 57 $myhash1{$section_name}{$parm} = $value; > use warnings qw(uninitialized); > 58 } Line 57 has 4 moving parts, any of which will throw a warning if things aren't kosher. - Is %myhash1 guaranteed to be defined? - Is $section_name guaranteed to be defined? - Is $parm guaranteed to be defined? - Is $value guaranteed to be defined? If not, and you care, then you'd need to add code to guarantee that those values are defined once line 57 happens. Also, it looks like "no warnings" only effects the block you're in, so you can safely omit the "use warnings" line. It'll get put back automatically, as I demo below. :) Cheers, j $ cat j.pl use warnings; $x = 10; for (1..1) { no warnings; $y = 10; } $z = 10; $ perl j.pl Name "main::z" used only once: possible typo at j.pl line 8. Name "main::x" used only once: possible typo at j.pl line 3. From jay at jays.net Sat Jan 17 08:51:29 2009 From: jay at jays.net (Jay Hannah) Date: Sat, 17 Jan 2009 10:51:29 -0600 Subject: [Omaha.pm] silly warnings In-Reply-To: <3e2be50901141432y75324f3awa72b2ea3ae000352@mail.gmail.com> References: <396CEDAA86B38646ACE2FEAA22C3FBF1EDBB43@l3exchange.omnihotels.net> <8418B7F8-AB12-4F8D-BF65-D7023F3F12E5@jays.net> <3e2be50901130707jfcf427bwb92b49d2ce2b003f@mail.gmail.com> <3e2be50901141432y75324f3awa72b2ea3ae000352@mail.gmail.com> Message-ID: <458320F6-151F-4485-BA83-4BECBB8BA6CD@jays.net> On Jan 14, 2009, at 4:32 PM, Dan Linder wrote: > Wow, did I stump all the Perl experts, or did everyone go on > vacation? ;-) My email slack comes and goes. :) j From dan at linder.org Mon Jan 19 07:23:36 2009 From: dan at linder.org (Dan Linder) Date: Mon, 19 Jan 2009 09:23:36 -0600 Subject: [Omaha.pm] silly warnings In-Reply-To: References: <396CEDAA86B38646ACE2FEAA22C3FBF1EDBB43@l3exchange.omnihotels.net> <8418B7F8-AB12-4F8D-BF65-D7023F3F12E5@jays.net> <3e2be50901130707jfcf427bwb92b49d2ce2b003f@mail.gmail.com> <3e2be50901141432y75324f3awa72b2ea3ae000352@mail.gmail.com> <3e2be50901150808r55fe85b1m2ad279619f66ad39@mail.gmail.com> <3e2be50901151118p6c6f663auf011c679b6922ac3@mail.gmail.com> Message-ID: <3e2be50901190723vcaa94c2g18d5da7ae389a4e1@mail.gmail.com> On Sat, Jan 17, 2009 at 10:50 AM, Jay Hannah wrote: > On Jan 15, 2009, at 1:18 PM, Dan Linder wrote: > >> From this site URL: http://www.xav.com/perl/lib/Pod/perllexwarn.html >> Looks like I need to wrapper line 55 like this: >> >> 55 } else { >> 56 ($value, $parm)=split(/\s+/,$line,2); >> no warnings qw(uninitialized); >> 57 $myhash1{$section_name}{$parm} = $value; >> use warnings qw(uninitialized); >> 58 } >> > > Line 57 has 4 moving parts, any of which will throw a warning if things > aren't kosher. > > - Is %myhash1 guaranteed to be defined? > - Is $section_name guaranteed to be defined? > - Is $parm guaranteed to be defined? > - Is $value guaranteed to be defined? The lines of code that I didn't include are a definition of the %myhash1, $section_name, and $line. True $value and $param could possibly be incorrect, but that'll be blamed on the input file that fills in the $line variable. And thanks for the un-needed "use warnings" post line 57. (I was thinking I'd have to save $^W somehow and re-apply it...) I'll hopefully get this played with later today and report back my findings. Dan -- "Quis custodiet ipsos custodes?" (Who can watch the watchmen?) -- from the Satires of Juvenal "I do not fear computers, I fear the lack of them." -- Isaac Asimov (Author) ** *** ***** ******* *********** ************* -------------- next part -------------- An HTML attachment was scrubbed... URL: From dan at linder.org Mon Jan 19 11:46:00 2009 From: dan at linder.org (Dan Linder) Date: Mon, 19 Jan 2009 13:46:00 -0600 Subject: [Omaha.pm] silly warnings In-Reply-To: References: <396CEDAA86B38646ACE2FEAA22C3FBF1EDBB43@l3exchange.omnihotels.net> <8418B7F8-AB12-4F8D-BF65-D7023F3F12E5@jays.net> <3e2be50901130707jfcf427bwb92b49d2ce2b003f@mail.gmail.com> <3e2be50901141432y75324f3awa72b2ea3ae000352@mail.gmail.com> <3e2be50901150808r55fe85b1m2ad279619f66ad39@mail.gmail.com> <3e2be50901151118p6c6f663auf011c679b6922ac3@mail.gmail.com> Message-ID: <3e2be50901191146v1858f9b0v64f0528540109f12@mail.gmail.com> Just to follow-up on my previous e-mail, here are my results and a test case. I added the "no warnings qw(uninitialized)" jusst before my line 57, but left out the "use warnings qw(uninitialized)" as Jay suggested and it worked like a charm. In another section of code, I had similar warnings but that code called a few other subroutines. I setup this code to test if the "no use warnings" would carry over to the subroutine: dan:/tmp$ cat d30.pl #!/usr/bin/perl use warnings; sub myfunc { $f1 = 123; } $x = 10; for (1..1) { no warnings; $y = 10; $funcreturn = myfunc(); } $z = 10; dan:/tmp$ ./d30.pl Name "main::f1" used only once: possible typo at ./d30.pl line 6. Name "main::z" used only once: possible typo at ./d30.pl line 15. Name "main::x" used only once: possible typo at ./d30.pl line 9. dan at dglaptop:PerlTests$ The "no warnings" does not carry out of the current block of code into the subroutine (I got the "main::f1 used only once"). Thanks for the input everyone, Dan -- "Quis custodiet ipsos custodes?" (Who can watch the watchmen?) -- from the Satires of Juvenal "I do not fear computers, I fear the lack of them." -- Isaac Asimov (Author) ** *** ***** ******* *********** ************* -------------- next part -------------- An HTML attachment was scrubbed... URL: From tedkat at gmail.com Mon Jan 19 14:39:26 2009 From: tedkat at gmail.com (Theodore Katseres) Date: Mon, 19 Jan 2009 16:39:26 -0600 Subject: [Omaha.pm] silly warnings In-Reply-To: <3e2be50901191146v1858f9b0v64f0528540109f12@mail.gmail.com> References: <396CEDAA86B38646ACE2FEAA22C3FBF1EDBB43@l3exchange.omnihotels.net> <8418B7F8-AB12-4F8D-BF65-D7023F3F12E5@jays.net> <3e2be50901130707jfcf427bwb92b49d2ce2b003f@mail.gmail.com> <3e2be50901141432y75324f3awa72b2ea3ae000352@mail.gmail.com> <3e2be50901150808r55fe85b1m2ad279619f66ad39@mail.gmail.com> <3e2be50901151118p6c6f663auf011c679b6922ac3@mail.gmail.com> <3e2be50901191146v1858f9b0v64f0528540109f12@mail.gmail.com> Message-ID: On Mon, Jan 19, 2009 at 1:46 PM, Dan Linder wrote: > Just to follow-up on my previous e-mail, here are my results and a test > case. > > I added the "no warnings qw(uninitialized)" jusst before my line 57, but > left out the "use warnings qw(uninitialized)" as Jay suggested and it worked > like a charm. > > In another section of code, I had similar warnings but that code called a > few other subroutines. I setup this code to test if the "no use warnings" > would carry over to the subroutine: > > dan:/tmp$ cat d30.pl > #!/usr/bin/perl > use warnings; > sub myfunc { > $f1 = 123; > } > $x = 10; > for (1..1) { > no warnings; > $y = 10; > $funcreturn = myfunc(); > } > $z = 10; > > dan:/tmp$ ./d30.pl > Name "main::f1" used only once: possible typo at ./d30.pl line 6. > Name "main::z" used only once: possible typo at ./d30.pl line 15. > Name "main::x" used only once: possible typo at ./d30.pl line 9. > dan at dglaptop:PerlTests$ > > The "no warnings" does not carry out of the current block of code into the > subroutine (I got the "main::f1 used only once"). > > Thanks for the input everyone, $f1 is not in the C block. It is globally defined. ( wont compile with C ) use C for variable declarations. #!/usr/bin/perl use warnings; sub myfunc { my $f1 = 123; } my $x = 10; for (1..1) { no warnings; $y = 10; $funcreturn = myfunc(); } my $z = 10; Gives you a clean run. -- Ted Katseres ||=O=|| -------------- next part -------------- An HTML attachment was scrubbed... URL: From dan at linder.org Tue Jan 20 20:15:31 2009 From: dan at linder.org (Dan Linder) Date: Tue, 20 Jan 2009 22:15:31 -0600 Subject: [Omaha.pm] Local toner refill/purchase? Message-ID: <3e2be50901202015h1576b321v3b264dff2d52fcdf@mail.gmail.com> My home laser printer -- a Brother HL-2700CN -- just ran out of blue (cyan). When I priced around last summer, it was $90+ to purchase a refill kit, or $120 for a new cartridge. Before I send my money out of town/state, does anyone have any recommendations for a local supplier for either a replacement cartridge or will do the refill? I haven't checked the local office supply stores (Office Max, Staples, Office Depot) - are they competitive with mail-order? Dan -- "Quis custodiet ipsos custodes?" (Who can watch the watchmen?) -- from the Satires of Juvenal "I do not fear computers, I fear the lack of them." -- Isaac Asimov (Author) ** *** ***** ******* *********** ************* -------------- next part -------------- An HTML attachment was scrubbed... URL: From jhannah at omnihotels.com Wed Jan 21 08:06:23 2009 From: jhannah at omnihotels.com (Jay Hannah) Date: Wed, 21 Jan 2009 10:06:23 -0600 Subject: [Omaha.pm] Perl + BioPerl + R + ghostscript Message-ID: <396CEDAA86B38646ACE2FEAA22C3FBF1EDBBDA@l3exchange.omnihotels.net> Look what I can do! http://clab.ist.unomaha.edu/svn_co/CLAB/RT394/tmp/Rplots-0.png :) j https://clabsvn.ist.unomaha.edu/anonsvn/CLAB/RT394/ -------------- next part -------------- An HTML attachment was scrubbed... URL: From jhannah at omnihotels.com Wed Jan 21 12:02:49 2009 From: jhannah at omnihotels.com (Jay Hannah) Date: Wed, 21 Jan 2009 14:02:49 -0600 Subject: [Omaha.pm] Can't locate ThatThing::YOUWroteHERE Message-ID: <396CEDAA86B38646ACE2FEAA22C3FBF1EDBBDC@l3exchange.omnihotels.net> -laugh- My own dev server didn't have my own CPAN module installed... How did that happen? I wrote the thing and uploaded to PAUSE from *this* server... The server hasn't been rebuilt...? Oh well. -MCPAN to the rescue. :) j $ ./amex_folio.pl ATLCNN Can't locate Text/FixedWidth.pm in @INC (@INC contains: ... $ perl -MCPAN -e 'install Text::FixedWidth' http://search.cpan.org/~jhannah/Text-FixedWidth-0.04/lib/Text/FixedWidth.pm -------------- next part -------------- An HTML attachment was scrubbed... URL: From jay at jays.net Wed Jan 21 18:06:45 2009 From: jay at jays.net (Jay Hannah) Date: Wed, 21 Jan 2009 20:06:45 -0600 Subject: [Omaha.pm] Catalyst: Text::SimpleTable's now go as wide as $ENV{COLUMNS} References: <396CEDAA86B38646ACE2FEAA22C3FBF1EDBBDD@l3exchange.omnihotels.net> Message-ID: <7A431F28-F12C-4515-9591-B08A95000818@jays.net> Hi Oleg, I applied your patch to 5.70 and 5.80 tonight. Sorry for the delay. Cheers, j http://jays.net ------------------------------------------------------------------------ r9120 | jhannah | 2009-01-21 19:45:16 -0600 (Wed, 21 Jan 2009) | 3 lines Changed paths: M /Catalyst-Runtime/5.80/trunk/Changes M /Catalyst-Runtime/5.80/trunk/lib/Catalyst/DispatchType/Chained.pm M /Catalyst-Runtime/5.80/trunk/lib/Catalyst/DispatchType/Path.pm M /Catalyst-Runtime/5.80/trunk/lib/Catalyst/DispatchType/Regex.pm M /Catalyst-Runtime/5.80/trunk/lib/Catalyst/Dispatcher.pm M /Catalyst-Runtime/5.80/trunk/lib/Catalyst/Stats.pm M /Catalyst-Runtime/5.80/trunk/lib/Catalyst/Utils.pm M /Catalyst-Runtime/5.80/trunk/lib/Catalyst.pm Text::SimpleTable's now go as wide as $ENV{COLUMNS} Patch written by Oleg Kostyuk ------------------------------------------------------------------------ ------------------------------------------------------------------------ r9121 | jhannah | 2009-01-21 19:53:47 -0600 (Wed, 21 Jan 2009) | 6 lines Changed paths: M /Catalyst-Runtime/5.70/trunk/Changes M /Catalyst-Runtime/5.70/trunk/lib/Catalyst/DispatchType/Chained.pm M /Catalyst-Runtime/5.70/trunk/lib/Catalyst/DispatchType/Path.pm M /Catalyst-Runtime/5.70/trunk/lib/Catalyst/DispatchType/Regex.pm M /Catalyst-Runtime/5.70/trunk/lib/Catalyst/Dispatcher.pm M /Catalyst-Runtime/5.70/trunk/lib/Catalyst/Stats.pm M /Catalyst-Runtime/5.70/trunk/lib/Catalyst/Utils.pm M /Catalyst-Runtime/5.70/trunk/lib/Catalyst.pm Text::SimpleTable's now go as wide as $ENV{COLUMNS} (jhannah) Patch written by Oleg Kostyuk Also nuked Stats.pm report() -- my patch to 5.80/trunk a couple weeks back added tests and everything over there. ------------------------------------------------------------------------ From jay at jays.net Wed Jan 28 06:04:16 2009 From: jay at jays.net (Jay Hannah) Date: Wed, 28 Jan 2009 08:04:16 -0600 Subject: [Omaha.pm] Modern::Perl Message-ID: <23420D4D-3DEC-4119-8FD9-166D65D3A8AB@jays.net> I like the 2nd and 3rd posts here: http://www.modernperlbooks.com/mt/index.html Here's a slideshow of new stuff in 5.10: http://www.slideshare.net/rjbs/perl-510-for-people-who-arent- totally-insane j From dan at linder.org Thu Jan 29 08:41:44 2009 From: dan at linder.org (Dan Linder) Date: Thu, 29 Jan 2009 10:41:44 -0600 Subject: [Omaha.pm] Alltell / Windstream and a new DSL modem... Message-ID: <3e2be50901290841kdac61cbo6459cdd1e407729c@mail.gmail.com> My parents are needing a new DSL modem for their AllTell (now Windstream?) Internet connection (Rural subdivision between Plattsmouth and Bellevue). Their eyes glazed over when I asked them if it used PPPoE and other tech questions.... (But then my knowledge of DSL isn't that deep either.) Does anyone have any recommendations for a DSL modem that will work with AllTell/Windstream? Or are there any that I should stay away from? And aside from PPPoE, are there any other technical issues that I should be aware of when replacing a DSL modem? They'll be using a small Netgear home firewall so we'll be putting the modem into "pass-through mode" -- that's the correct term, right? Thanks, Dan -- "Quis custodiet ipsos custodes?" (Who can watch the watchmen?) -- from the Satires of Juvenal "I do not fear computers, I fear the lack of them." -- Isaac Asimov (Author) ** *** ***** ******* *********** ************* -------------- next part -------------- An HTML attachment was scrubbed... URL: From krisguy at krisguy.com Thu Jan 29 08:57:02 2009 From: krisguy at krisguy.com (krisguy at krisguy.com) Date: Thu, 29 Jan 2009 16:57:02 +0000 Subject: [Omaha.pm] Alltell / Windstream and a new DSL modem... In-Reply-To: <3e2be50901290841kdac61cbo6459cdd1e407729c@mail.gmail.com> References: <3e2be50901290841kdac61cbo6459cdd1e407729c@mail.gmail.com> Message-ID: <1196704287-1233248244-cardhu_decombobulator_blackberry.rim.net-815664295-@bxe142.bisx.prod.on.blackberry> Stick with any modems that are Speedstream or 2wire, VPI and VCI are 0 and 35, and Windstream uses PPPoE. I'd recommend setting it up in the router, not the modem. Sent via BlackBerry by AT&T -----Original Message----- From: Dan Linder Date: Thu, 29 Jan 2009 10:41:44 To: Omaha Linux User Group; Perl Mongers of Omaha,Nebraska USA Subject: [Omaha.pm] Alltell / Windstream and a new DSL modem... _______________________________________________ Omaha-pm mailing list Omaha-pm at pm.org http://mail.pm.org/mailman/listinfo/omaha-pm From cletus at bltd.com Thu Jan 29 11:05:56 2009 From: cletus at bltd.com (Clete Baker) Date: Thu, 29 Jan 2009 13:05:56 -0600 (CST) Subject: [Omaha.pm] Alltell / Windstream and a new DSL modem... In-Reply-To: <3e2be50901290841kdac61cbo6459cdd1e407729c@mail.gmail.com> Message-ID: <200901291905.n0TJ5uvd017188@oasis.novia.net> > Does anyone have any recommendations for a DSL modem that will work with > AllTell/Windstream? I have a Cisco 827H that I recently removed from service on a Windstream line (I changed my provider). It appears to be worthless in value, so it's yours for the taking if you want it. -- Clete Baker | cletus at bltd.com Studio B, Ltd. | ph 402-455-3000 Omaha, Nebraska | fx 402-455-8269 From jhannah at omnihotels.com Fri Jan 30 10:34:15 2009 From: jhannah at omnihotels.com (Jay Hannah) Date: Fri, 30 Jan 2009 12:34:15 -0600 Subject: [Omaha.pm] uppercasing some things in complex nested structures Message-ID: <396CEDAA86B38646ACE2FEAA22C3FBF1EDBBFF@l3exchange.omnihotels.net> This isn't recursive or general use or anything, but it's what I came up with to uppercase specific things in 16 different use cases in some software I'm working on today... I thought it was pretty clean given the task at hand. Feedback welcome. :) j =head2 uppercase_everything RT7835 - Uppercase everything sent to OCIS $self->uppercase_everything($qualifiers); =cut sub uppercase_everything { my ($self, $qualifiers) = @_; foreach my $key (keys %$qualifiers) { # these two have to remain lower case or OWS pukes next if ($key =~ /^(primary|preferred)$/); if (ref($qualifiers->{$key}) eq "ARRAY") { # Ack. Sometimes an arrayref is handed in. for (@{$qualifiers->{$key}}) { if (ref $_ eq "HASH") { # Ack. Hashref inside the arrayref (e.g. UserDefinedValues) my $href = $_; foreach my $key (keys %$href) { $href->{$key} = uc $href->{$key}; } } else { # Simple scalars in our arrayref (e.g. AddressLine) next unless (defined $_); tr/a-z/A-Z/; } } } elsif (ref($qualifiers->{$key}) eq "HASH") { # Are we supposed to uppercase any hashrefs? } else { # Simple scalar $qualifiers->{$key} = uc $qualifiers->{$key}; } } #warn Dumper($qualifiers); return 1; } $ cat Common.t use Test::More tests => 8; # Have to instantiate any of the children to test Common... use Omni2::Model::MF::OWS::Name; my $c = Omni2::Model::MF::OWS::Name->new(); # Test uppercase_everything(). # 'lower' values should stay lowercase. 'upper's should turn to 'UPPER' my $in = { primary => 'lower', test1 => 'upper', preferred => 'lower', test2 => [ 'upper', 'upper'], test3 => [ { test4 => 'upper', test5 => 'upper' } ] }; ok($c->uppercase_everything($in), 'uppercase_everything()'); is($in->{primary}, 'lower', 'primary'); is($in->{test1}, 'UPPER', 'test1'); is($in->{preferred}, 'lower', 'preferred'); is($in->{test2}->[0], 'UPPER', 'test2'); is($in->{test2}->[1], 'UPPER', 'test2'); is($in->{test3}->[0]->{test4}, 'UPPER', 'test4'); is($in->{test3}->[0]->{test5}, 'UPPER', 'test5'); $ perl Common.t 1..8 ok 1 - uppercase_everything() ok 2 - primary ok 3 - test1 ok 4 - preferred ok 5 - test2 ok 6 - test2 ok 7 - test4 ok 8 - test5 -------------- next part -------------- An HTML attachment was scrubbed... URL: From travis at travisbsd.org Fri Jan 30 11:40:58 2009 From: travis at travisbsd.org (Travis McArthur) Date: Fri, 30 Jan 2009 13:40:58 -0600 Subject: [Omaha.pm] uppercasing some things in complex nested structures In-Reply-To: <396CEDAA86B38646ACE2FEAA22C3FBF1EDBBFF@l3exchange.omnihotels.net> References: <396CEDAA86B38646ACE2FEAA22C3FBF1EDBBFF@l3exchange.omnihotels.net> Message-ID: <498357CA.60702@travisbsd.org> You might consider making it recursive and just check input to find if it's scalar/array/hash and then have scalar be your terminiation condition, otherwise hand it off to another call...that would permit you to do arbitrary levels of structures and be more general purpose (well, arbitrary as long as you don't overflow your stack!) ie: sub uppercase_everything { my ($self, $qualifiers) = @_; if (ref($qualifiers) eq "HASH") { # Call uppercase_everything on each hash element } elsif (ref($qualifiers) eq "ARRAY") { # Call uppercase_everything on each array element } else { # Just uppercase like you were doing } } Best Regards, Travis Jay Hannah wrote: > This isn't recursive or general use or anything, but it's what I came > up with to uppercase specific things in 16 different use cases in some > software I'm working on today... I thought it was pretty clean given > the task at hand. Feedback welcome. :) > > j > > > > > > =head2 uppercase_everything > > RT7835 - Uppercase everything sent to OCIS > > $self->uppercase_everything($qualifiers); > > =cut > > sub uppercase_everything { > my ($self, $qualifiers) = @_; > foreach my $key (keys %$qualifiers) { > # these two have to remain lower case or OWS pukes > next if ($key =~ /^(primary|preferred)$/); > if (ref($qualifiers->{$key}) eq "ARRAY") { > # Ack. Sometimes an arrayref is handed in. > for (@{$qualifiers->{$key}}) { > if (ref $_ eq "HASH") { > # Ack. Hashref inside the arrayref (e.g. UserDefinedValues) > my $href = $_; > foreach my $key (keys %$href) { > $href->{$key} = uc $href->{$key}; > } > } else { > # Simple scalars in our arrayref (e.g. AddressLine) > next unless (defined $_); > tr/a-z/A-Z/; > } > } > } elsif (ref($qualifiers->{$key}) eq "HASH") { > # Are we supposed to uppercase any hashrefs? > } else { > # Simple scalar > $qualifiers->{$key} = uc $qualifiers->{$key}; > } > } > #warn Dumper($qualifiers); > return 1; > } > > > $ cat Common.t > use Test::More tests => 8; > # Have to instantiate any of the children to test Common... > use Omni2::Model::MF::OWS::Name; > my $c = Omni2::Model::MF::OWS::Name->new(); > > # Test uppercase_everything(). > # 'lower' values should stay lowercase. 'upper's should turn to 'UPPER' > my $in = { > primary => 'lower', > test1 => 'upper', > preferred => 'lower', > test2 => [ 'upper', 'upper'], > test3 => [ { test4 => 'upper', test5 => 'upper' } ] > }; > ok($c->uppercase_everything($in), 'uppercase_everything()'); > is($in->{primary}, 'lower', 'primary'); > is($in->{test1}, 'UPPER', 'test1'); > is($in->{preferred}, 'lower', 'preferred'); > is($in->{test2}->[0], 'UPPER', 'test2'); > is($in->{test2}->[1], 'UPPER', 'test2'); > is($in->{test3}->[0]->{test4}, 'UPPER', 'test4'); > is($in->{test3}->[0]->{test5}, 'UPPER', 'test5'); > > > $ perl Common.t > 1..8 > ok 1 - uppercase_everything() > ok 2 - primary > ok 3 - test1 > ok 4 - preferred > ok 5 - test2 > ok 6 - test2 > ok 7 - test4 > ok 8 - test5 > > > ------------------------------------------------------------------------ > > _______________________________________________ > Omaha-pm mailing list > Omaha-pm at pm.org > http://mail.pm.org/mailman/listinfo/omaha-pm From jay at jays.net Fri Jan 30 13:19:33 2009 From: jay at jays.net (Jay Hannah) Date: Fri, 30 Jan 2009 15:19:33 -0600 Subject: [Omaha.pm] uppercasing some things in complex nested structures In-Reply-To: <498357CA.60702@travisbsd.org> References: <396CEDAA86B38646ACE2FEAA22C3FBF1EDBBFF@l3exchange.omnihotels.net> <498357CA.60702@travisbsd.org> Message-ID: <49836EE5.9030401@jays.net> Travis McArthur wrote: > sub uppercase_everything { > my ($self, $qualifiers) = @_; > if (ref($qualifiers) eq "HASH") > { > # Call uppercase_everything on each hash element > } > elsif (ref($qualifiers) eq "ARRAY") > { > # Call uppercase_everything on each array element > } > else > { > # Just uppercase like you were doing > } > } > I like it! Cleaner than mine and depth agnostic! Thanks! :) j From dan at linder.org Sat Jan 31 06:40:36 2009 From: dan at linder.org (Dan Linder) Date: Sat, 31 Jan 2009 08:40:36 -0600 Subject: [Omaha.pm] uppercasing some things in complex nested structures In-Reply-To: <498357CA.60702@travisbsd.org> References: <396CEDAA86B38646ACE2FEAA22C3FBF1EDBBFF@l3exchange.omnihotels.net> <498357CA.60702@travisbsd.org> Message-ID: <3e2be50901310640n58f83f0pd1f0d660bada34b5@mail.gmail.com> On Fri, Jan 30, 2009 at 1:40 PM, Travis McArthur wrote: > if (ref($qualifiers) eq "HASH") > ... > elsif (ref($qualifiers) eq "ARRAY") > I just started working on some recursive code and was forced to use the "UNIVERSAL::isa" subroutine to check if an object is a hash or array. This looks cleaner, but is it available in the older Perl 5.8.0? This looks a lot like the Perl 5.10 code I saw demo'ed and thought "Wow, very nice!"... Dan -- "Quis custodiet ipsos custodes?" (Who can watch the watchmen?) -- from the Satires of Juvenal "I do not fear computers, I fear the lack of them." -- Isaac Asimov (Author) ** *** ***** ******* *********** ************* -------------- next part -------------- An HTML attachment was scrubbed... URL: