From gwadej at anomaly.org Wed Mar 7 05:23:20 2012 From: gwadej at anomaly.org (G. Wade Johnson) Date: Wed, 7 Mar 2012 07:23:20 -0600 Subject: [pm-h] March Houston.pm Meeting Message-ID: <20120307072320.1700f747@cygnus> This is just a quick note to remind everyone that we will not be having a Houston.pm meeting this Thursday. On March 22, brian d foy will be in town and he has agreed to talk to the group again. Stay tuned for more information as it comes available. G. Wade -- The purpose of software engineering is to control complexity, not to create it. -- Dr. Pamela Zave From gwadej at anomaly.org Fri Mar 9 18:58:58 2012 From: gwadej at anomaly.org (G. Wade Johnson) Date: Fri, 9 Mar 2012 20:58:58 -0600 Subject: [pm-h] MongoDB Houston Meetup Message-ID: <20120309205858.1bbbff9e@cygnus> I got this from a Meetup message. I know there is some overlap in interest between Perl and MongoDB, so I decided to pass it on. G. Wade Forwarded from Francesca Krihely: > Hi G. Wade, > > Nice to meet you! I wanted to let you know that I'm helping some > community members launch the first MongoDB User Group in Houston, and > I wanted to make sure that all the MongoDB enthusiasts in Houston > could be there for the first session. Would you mind sending this > note to the Perl User Group to see if any of them are interested? > > http://www.meetup.com/MongoDB-Houston/events/55005112/ > > Thanks so much! I look forward to hearing from you. Hope you can > make it! -francesca -- The price of reliability is the pursuit of the utmost simplicity. It is a price which the very rich find most hard to pay. -- C.A.R. Hoare From brivera001 at gmail.com Wed Mar 14 08:44:13 2012 From: brivera001 at gmail.com (Bryan Rivera) Date: Wed, 14 Mar 2012 10:44:13 -0500 Subject: [pm-h] madness, genius or confusion? Message-ID: <-139957616403142317@unknownmsgid> Has anyone ever seen something like the code snippet below? I came across this and figured I was just missing something. Why would you want to 'use lib' inside an eval inside a BEGIN block? I think it's all kinds of wrong. BEGIN { eval "{ use lib '/usr/prod/xxx/xxx/perl/lib/'; }"; } -Bry From lanny.ripple at gmail.com Wed Mar 14 09:11:37 2012 From: lanny.ripple at gmail.com (Lanny Ripple) Date: Wed, 14 Mar 2012 11:11:37 -0500 Subject: [pm-h] madness, genius or confusion? In-Reply-To: <-139957616403142317@unknownmsgid> References: <-139957616403142317@unknownmsgid> Message-ID: <1BC56168-2605-4E59-840E-C4A695A70F50@gmail.com> I vote confusion. Programming Perl says that use Module LIST; is exactly equivalent to BEGIN { require "Module.pm"; Module->import(LIST); } So the code below is going to act like BEGIN { eval "{ BEGIN { require "lib.pm"; lib->import('/usr/prod/xxx/xxx/perl/lib/'); } }" } Now `use lib path' just adds F to the module search path. Perl will start running, byte compile the script, and execute BEGIN sections. In this section it will find an eval so will byte compile the string and execute it. The final result will be indistinguishable from use lib '/usr/prod/xxx/xxx/perl/lib/'; apart from the above simpler form perhaps taking a (humanly) un-noticable shorter time to run since there's not the runtime string eval involved. To beat this dead horse a touch more had the eval not been in quotes the byte compilation would have happened at the same time as the main script and would basically be a no-op. $0.02, -ljr On Mar 14, 2012, at 10:44 AM, Bryan Rivera wrote: > Has anyone ever seen something like the code snippet below? I came > across this and figured I was just missing something. Why would you > want to 'use lib' inside an eval inside a BEGIN block? I think it's > all kinds of wrong. > > BEGIN { > eval "{ use lib '/usr/prod/xxx/xxx/perl/lib/'; }"; > } > > -Bry > _______________________________________________ > Houston mailing list > Houston at pm.org > http://mail.pm.org/mailman/listinfo/houston > Website: http://houston.pm.org/ From gwadej at anomaly.org Wed Mar 14 15:04:20 2012 From: gwadej at anomaly.org (G. Wade Johnson) Date: Wed, 14 Mar 2012 17:04:20 -0500 Subject: [pm-h] madness, genius or confusion? In-Reply-To: <-139957616403142317@unknownmsgid> References: <-139957616403142317@unknownmsgid> Message-ID: <20120314170420.34eeec93@cygnus> On Wed, 14 Mar 2012 10:44:13 -0500 Bryan Rivera wrote: > Has anyone ever seen something like the code snippet below? I came > across this and figured I was just missing something. Why would you > want to 'use lib' inside an eval inside a BEGIN block? I think it's > all kinds of wrong. > > BEGIN { > eval "{ use lib '/usr/prod/xxx/xxx/perl/lib/'; }"; > } The only reason I can think of is pretty unrealistic. This construct would protect against the lib.pm module failing and still execute at compile time. I would think that if you expected 'lib' to fail to load, there would not be much else you could do. So, I can't see a legitimate reason to do it. But, someone obviously thought there was a reason... G. Wade -- The man who says he is willing to meet you halfway is usually a poor judge of distance. -- Laurence J. Peter From zappepcs at gmail.com Fri Mar 16 08:14:07 2012 From: zappepcs at gmail.com (S Z) Date: Fri, 16 Mar 2012 10:14:07 -0500 Subject: [pm-h] madness, genius or confusion? In-Reply-To: <20120314170420.34eeec93@cygnus> References: <-139957616403142317@unknownmsgid> <20120314170420.34eeec93@cygnus> Message-ID: I've seen something exactly like that. It helped when dev, staging, and test all had the lib in different locations... On Wed, Mar 14, 2012 at 5:04 PM, G. Wade Johnson wrote: > On Wed, 14 Mar 2012 10:44:13 -0500 > Bryan Rivera wrote: > > > Has anyone ever seen something like the code snippet below? I came > > across this and figured I was just missing something. Why would you > > want to 'use lib' inside an eval inside a BEGIN block? I think it's > > all kinds of wrong. > > > > BEGIN { > > eval "{ use lib '/usr/prod/xxx/xxx/perl/lib/'; }"; > > } > > The only reason I can think of is pretty unrealistic. > > This construct would protect against the lib.pm module failing and > still execute at compile time. > > I would think that if you expected 'lib' to fail to load, there would > not be much else you could do. So, I can't see a legitimate reason to > do it. > > But, someone obviously thought there was a reason... > > G. Wade > -- > The man who says he is willing to meet you halfway is usually a poor > judge of distance. -- Laurence J. Peter > _______________________________________________ > Houston mailing list > Houston at pm.org > http://mail.pm.org/mailman/listinfo/houston > Website: http://houston.pm.org/ > -------------- next part -------------- An HTML attachment was scrubbed... URL: From lanny.ripple at gmail.com Fri Mar 16 09:47:05 2012 From: lanny.ripple at gmail.com (Lanny Ripple) Date: Fri, 16 Mar 2012 11:47:05 -0500 Subject: [pm-h] madness, genius or confusion? In-Reply-To: References: <-139957616403142317@unknownmsgid> <20120314170420.34eeec93@cygnus> Message-ID: <3B07C7D8-AE9D-4906-9532-EFF74FD8387F@gmail.com> Perl will happily skip unknown directories so use lib qw( /prod/path /stage/path /test/path ); would have been as effective. Block eval is useful for catching exceptions. String eval is useful when you must construct the code to be evaluated based on runtime input. I've also abused BEGIN and @INC for dev/prod and hooking purposes (definitely falling on the madness end of the spectrum) but the original example presented isn't doing any of those things so I have to stick with "confusion". For gory details see perldoc.perl.org on 'require', 'eval', 'lib'. -ljr On Mar 16, 2012, at 10:14 AM, S Z wrote: > I've seen something exactly like that. It helped when dev, staging, and test all had the lib in different locations... > > On Wed, Mar 14, 2012 at 5:04 PM, G. Wade Johnson wrote: > On Wed, 14 Mar 2012 10:44:13 -0500 > Bryan Rivera wrote: > > > Has anyone ever seen something like the code snippet below? I came > > across this and figured I was just missing something. Why would you > > want to 'use lib' inside an eval inside a BEGIN block? I think it's > > all kinds of wrong. > > > > BEGIN { > > eval "{ use lib '/usr/prod/xxx/xxx/perl/lib/'; }"; > > } > > The only reason I can think of is pretty unrealistic. > > This construct would protect against the lib.pm module failing and > still execute at compile time. > > I would think that if you expected 'lib' to fail to load, there would > not be much else you could do. So, I can't see a legitimate reason to > do it. > > But, someone obviously thought there was a reason... > > G. Wade > -- > The man who says he is willing to meet you halfway is usually a poor > judge of distance. -- Laurence J. Peter > _______________________________________________ > Houston mailing list > Houston at pm.org > http://mail.pm.org/mailman/listinfo/houston > Website: http://houston.pm.org/ > > _______________________________________________ > Houston mailing list > Houston at pm.org > http://mail.pm.org/mailman/listinfo/houston > Website: http://houston.pm.org/ From erin at morderwerk.de Thu Mar 22 16:05:15 2012 From: erin at morderwerk.de (=?ISO-8859-1?Q?Erin_Sch=F6nhals?=) Date: Thu, 22 Mar 2012 23:05:15 +0000 Subject: [pm-h] March Houston.pm Meeting In-Reply-To: <20120307072320.1700f747@cygnus> References: <20120307072320.1700f747@cygnus> Message-ID: Will this revolution be televised? On Wed, Mar 7, 2012 at 1:23 PM, G. Wade Johnson wrote: > This is just a quick note to remind everyone that we will not be having > a Houston.pm meeting this Thursday. > > On March 22, brian d foy will be in town and he has agreed to talk to > the group again. > > Stay tuned for more information as it comes available. > > G. Wade > -- > The purpose of software engineering is to control complexity, not to > create it. -- Dr. Pamela Zave > _______________________________________________ > Houston mailing list > Houston at pm.org > http://mail.pm.org/mailman/listinfo/houston > Website: http://houston.pm.org/ > -------------- next part -------------- An HTML attachment was scrubbed... URL: