From mackenziemikebus at yahoo.com Fri Mar 2 19:22:26 2012 From: mackenziemikebus at yahoo.com (Mike MacKenzie) Date: Fri, 2 Mar 2012 19:22:26 -0800 (PST) Subject: [LA.pm] Classes with heterogeneous objects? In-Reply-To: <86k43e8r15.fsf@red.stonehenge.com> References: <4FB69414-8877-4CE0-90A0-E37A6FF6EDB9@arkadiy.com> <86k43e8r15.fsf@red.stonehenge.com> Message-ID: <1330744946.73849.YahooMailNeo@web130205.mail.mud.yahoo.com> Hi Mongers, Even after all these years, Perl sometimes surprises me.??I just realized today that there is nothing preventing you from creating a class whose instances are implemented heterogeneously.??Your constructor could return a blessed scalar sometimes, a blessed hash under other conditions and a CODE ref at other times.??All would be instances of the same class.??Now I just need to think of a use case for such a thing. Can any of you guys think of an interesting use case for a class that creates objects with disparate internal structures like this??? Or do you know of an existing module that does this? Mike MacKenzie From merlyn at stonehenge.com Fri Mar 2 21:06:57 2012 From: merlyn at stonehenge.com (Randal L. Schwartz) Date: Fri, 02 Mar 2012 21:06:57 -0800 Subject: [LA.pm] Classes with heterogeneous objects? In-Reply-To: <1330744946.73849.YahooMailNeo@web130205.mail.mud.yahoo.com> (Mike MacKenzie's message of "Fri, 2 Mar 2012 19:22:26 -0800 (PST)") References: <4FB69414-8877-4CE0-90A0-E37A6FF6EDB9@arkadiy.com> <86k43e8r15.fsf@red.stonehenge.com> <1330744946.73849.YahooMailNeo@web130205.mail.mud.yahoo.com> Message-ID: <86ipimtgr2.fsf@red.stonehenge.com> >>>>> "Mike" == Mike MacKenzie writes: Mike> Can any of you guys think of an interesting use case for a class Mike> that creates objects with disparate internal structures like Mike> this??? Or do you know of an existing module that does this? The big problem would be the amount of sheer navel-gazing you'd need within the class to do anything like accessing the attributes. Hint: if you have to use "ref" a lot in your design, you lose. -- Randal L. Schwartz - Stonehenge Consulting Services, Inc. - +1 503 777 0095 Smalltalk/Perl/Unix consulting, Technical writing, Comedy, etc. etc. See http://methodsandmessages.posterous.com/ for Smalltalk discussion From btilly at gmail.com Fri Mar 2 21:22:39 2012 From: btilly at gmail.com (Ben Tilly) Date: Fri, 2 Mar 2012 21:22:39 -0800 Subject: [LA.pm] Classes with heterogeneous objects? In-Reply-To: <1330744946.73849.YahooMailNeo@web130205.mail.mud.yahoo.com> References: <4FB69414-8877-4CE0-90A0-E37A6FF6EDB9@arkadiy.com> <86k43e8r15.fsf@red.stonehenge.com> <1330744946.73849.YahooMailNeo@web130205.mail.mud.yahoo.com> Message-ID: Sure, here is a use case. A module that uses inside out objects to store its private attributes, which is meant to be used in a multiple inheritance situation. It does not know, or care, what the objects it gets look like, and different subclasses can use different data types under the hood. That said, this is possible but not necessarily a *good* idea. On Fri, Mar 2, 2012 at 7:22 PM, Mike MacKenzie wrote: > Hi Mongers, > > > Even after all these years, Perl sometimes surprises me.??I just realized today that there is nothing preventing you from creating a class whose instances are implemented heterogeneously.??Your constructor could return a blessed scalar sometimes, a blessed hash under other conditions and a CODE ref at other times.??All would be instances of the same class.??Now I just need to think of a use case for such a thing. > > Can any of you guys think of an interesting use case for a class that creates objects with disparate internal structures like this??? Or do you know of an existing module that does this? > > Mike MacKenzie > > _______________________________________________ > Losangeles-pm mailing list > Losangeles-pm at pm.org > http://mail.pm.org/mailman/listinfo/losangeles-pm From uri at stemsystems.com Fri Mar 2 21:27:50 2012 From: uri at stemsystems.com (Uri Guttman) Date: Sat, 03 Mar 2012 00:27:50 -0500 Subject: [LA.pm] Classes with heterogeneous objects? In-Reply-To: <86ipimtgr2.fsf@red.stonehenge.com> References: <4FB69414-8877-4CE0-90A0-E37A6FF6EDB9@arkadiy.com> <86k43e8r15.fsf@red.stonehenge.com> <1330744946.73849.YahooMailNeo@web130205.mail.mud.yahoo.com> <86ipimtgr2.fsf@red.stonehenge.com> Message-ID: <4F51ABD6.9060403@stemsystems.com> On 03/03/2012 12:06 AM, Randal L. Schwartz wrote: >>>>>> "Mike" == Mike MacKenzie writes: > > Mike> Can any of you guys think of an interesting use case for a class > Mike> that creates objects with disparate internal structures like > Mike> this? Or do you know of an existing module that does this? > > The big problem would be the amount of sheer navel-gazing you'd need > within the class to do anything like accessing the attributes. > > Hint: if you have to use "ref" a lot in your design, you lose. and ref won't help as it will just return the class name on any blessed object regardless of the underlying type. reftype from scalar::util will do what you want. and a simple dispatch table keyed on the ref type would eliminate the need for many calls to reftype. now as for a use case, i am stumped. some questions are best left unanswered. but i bet damian could find one if asked! uri From mackenziemikebus at yahoo.com Wed Mar 7 21:14:49 2012 From: mackenziemikebus at yahoo.com (Mike MacKenzie) Date: Wed, 7 Mar 2012 21:14:49 -0800 (PST) Subject: [LA.pm] Classes with heterogeneous objects? In-Reply-To: <4F51ABD6.9060403@stemsystems.com> References: <4FB69414-8877-4CE0-90A0-E37A6FF6EDB9@arkadiy.com> <86k43e8r15.fsf@red.stonehenge.com> <1330744946.73849.YahooMailNeo@web130205.mail.mud.yahoo.com> <86ipimtgr2.fsf@red.stonehenge.com> <4F51ABD6.9060403@stemsystems.com> Message-ID: <1331183689.72645.YahooMailNeo@web130203.mail.mud.yahoo.com> You are right of course, ref wouldn't tell you the underlying implementation type.? However, I think Randall is still correct -- ubiquitous use of introspection code (aka navel gazing) is a real downer.? Encapsulating the type determination code in a lookup table/method somehow would help but you'd still have the overhead? -- actually more overhead computationally. I suppose you could write multiple subclasses, one for each implementation type, and have the base class constructor act as a factory method.? But then you lose the 'specialness' of them all being instances of the exact same class. Mike ----- Original Message ----- From: Uri Guttman To: Randal L. Schwartz Cc: Mike MacKenzie ; Los Angeles Perl Mongers Sent: Friday, March 2, 2012 9:27 PM Subject: Re: [LA.pm] Classes with heterogeneous objects? On 03/03/2012 12:06 AM, Randal L. Schwartz wrote: >>>>>> "Mike" == Mike MacKenzie? writes: > > Mike>? Can any of you guys think of an interesting use case for a class > Mike>? that creates objects with disparate internal structures like > Mike>? this?? Or do you know of an existing module that does this? > > The big problem would be the amount of sheer navel-gazing you'd need > within the class to do anything like accessing the attributes. > > Hint:? if you have to use "ref" a lot in your design, you lose. and ref won't help as it will just return the class name on any blessed object regardless of the underlying type. reftype from scalar::util will do what you want. and a simple dispatch table keyed on the ref type would eliminate the need for many calls to reftype. now as for a use case, i am stumped. some questions are best left unanswered. but i bet damian could find one if asked! uri From granny+lapm at gmail.com Tue Mar 13 11:32:28 2012 From: granny+lapm at gmail.com (Andrew Grangaard) Date: Tue, 13 Mar 2012 11:32:28 -0700 Subject: [LA.pm] March Meeting -- Special day and time! Wedensday at 6! 3/21/2012 Message-ID: Dearest Mongers, Please join us next week on a special day and time: Wednesday from 6-8pm. March Madness! What: Los Angeles Perl Mongers Meeting When: 6-8pm Date: Wednesday March 21, 2012 Where: Demand Media, 1299 Ocean, Santa Monica, CA Theme: Perl! Refreshments: Food and BEvERages provided by Demand Media RSVP: Responses always appreciated. Jeffrey Thalhammer: TBD Tony Gasparovic: Perl for Home Security Abstract: Tony will share a home security system that he designed that runs on Perl. His system uses motion sensors, loud sirens, audio announcers, a wireless remote, text message alerts and logs all activity to disk. Jeffrey "The Perl Critic" Thalhammer has a flight to catch after his presentation, thanks in advance for hustling to make his 6pm presentation. We're excited that Tony is sharing his "Perl for Home Security" talk which was so well received by T-O last month. rsvp to me or via facebook, share the event with friends and bring someone new! http://www.facebook.com/events/269186426495365/ as always, the updated details are at http://la.pm.org peace, Andrew From granny+lapm at gmail.com Tue Mar 20 18:41:39 2012 From: granny+lapm at gmail.com (Andrew Grangaard) Date: Tue, 20 Mar 2012 18:41:39 -0700 Subject: [LA.pm] Perl Mongers Tomorrow - 6-8pm - Wed 3/21 Message-ID: See you tomorrow from 6-8! Wednesday! Early! EXCITEMENT! Jeffrey has provided a title and abstract, he'll be talking about Pinto! --Andrew What: Los Angeles Perl Mongers Meeting When: 6-8pm Date: Wednesday March 21, 2012 Where: Demand Media, 1299 Ocean, Santa Monica, CA Theme: Perl! Refreshments: Food and BEvERages provided by Demand Media RSVP: Responses always appreciated. Presentations: Tony Gasparovic: Perl for Home Security Abstract: Tony will share a home security system that he designed that runs on Perl. His system uses motion sensors, loud sirens, audio announcers, a wireless remote, text message alerts and logs all activity to disk. Jeffrey Thalhammer: Pinto for managing Perl dependencies Abstract: The CPAN is a blessing and a curse. You can find code for every problem imaginable, but managing all those dependencies is extremely frustrating. Until now. Pinto is one example of a new breed of tools for managing your Perl dependencies. In this presentation we will explore what Pinto does, demonstrate how to use it in the development cycle, and compare it with similar tools. From barefootcoder at gmail.com Thu Mar 22 12:47:41 2012 From: barefootcoder at gmail.com (Buddy Burden) Date: Thu, 22 Mar 2012 12:47:41 -0700 Subject: [LA.pm] Perl Mongers Tomorrow - 6-8pm - Wed 3/21 In-Reply-To: References: Message-ID: Andrew, > See you tomorrow from 6-8! Wednesday! Early! EXCITEMENT! > Jeffrey has provided a title and abstract, he'll be talking about Pinto! I _really_ wanted to make it last night, but I couldn't. Do you know if there's a link to slides or anything from Jeffrey's presentation? -- Buddy From jeff at imaginative-software.com Mon Mar 26 16:47:21 2012 From: jeff at imaginative-software.com (Jeffrey Thalhammer) Date: Mon, 26 Mar 2012 16:47:21 -0700 Subject: [LA.pm] Perl Mongers Tomorrow - 6-8pm - Wed 3/21 In-Reply-To: References: Message-ID: <9C73AD1A-6ECE-4044-B008-DDD00618BF56@imaginative-software.com> Hi Everyone- I just wanted to thank those of you who attended the Perl Mongers session last week. Extra special thanks go to Andrew Grangaard and Demand Media for organizing and hosting. I really enjoyed meeting all of you, and I hope you found the presentation on Pinto informative. You can get the slides from my presentation here: http://www.slideshare.net/thaljef/pinto-12166763 I've become pretty good at setting up private CPANs and helping shops automate their development cycle. If your team would like some help in that area, I'd love to talk with you. You can reach me via jeff at imaginative-software.com or 415-215-2834. -Jeff -------------- next part -------------- An HTML attachment was scrubbed... URL: From geekhunter at gmail.com Mon Mar 26 17:24:42 2012 From: geekhunter at gmail.com (Todd Cranston-Cuebas) Date: Tue, 27 Mar 2012 00:24:42 +0000 (UTC) Subject: [LA.pm] Invitation to connect on LinkedIn Message-ID: <922483362.9859278.1332807882089.JavaMail.app@ela4-bed82.prod> LinkedIn ------------ Los, I'd like to add you to my professional network on LinkedIn. - Todd Todd Cranston-Cuebas Manager, Recruitment - IT at Warner Bros. Greater Los Angeles Area Confirm that you know Todd Cranston-Cuebas: https://www.linkedin.com/e/-xjni1k-h0a7efl2-1k/isd/6442055675/F4NABmk6/?hs=false&tok=3FUsi_ZLNoYR81 -- You are receiving Invitation to Connect emails. Click to unsubscribe: http://www.linkedin.com/e/-xjni1k-h0a7efl2-1k/pizNAvqDs-7PKMxj7ttWav493FA3jX7f/goo/losangeles-pm%40pm%2Eorg/20061/I2235168550_1/?hs=false&tok=2Q6zxY1eNoYR81 (c) 2012 LinkedIn Corporation. 2029 Stierlin Ct, Mountain View, CA 94043, USA. -------------- next part -------------- An HTML attachment was scrubbed... URL: From geekhunter at gmail.com Mon Mar 26 17:24:41 2012 From: geekhunter at gmail.com (Todd Cranston-Cuebas) Date: Tue, 27 Mar 2012 00:24:41 +0000 (UTC) Subject: [LA.pm] Invitation to connect on LinkedIn Message-ID: <780637781.9660424.1332807881464.JavaMail.app@ela4-bed81.prod> LinkedIn ------------ I'd like to add you to my professional network on LinkedIn. - Todd Todd Cranston-Cuebas Manager, Recruitment - IT at Warner Bros. Greater Los Angeles Area Confirm that you know Todd Cranston-Cuebas: https://www.linkedin.com/e/93m4ad-h0a7ef3o-6v/isd/6442057831/OLg3f9Zv/?hs=false&tok=2qyq3ECKxoYR81 -- You are receiving Invitation to Connect emails. Click to unsubscribe: http://www.linkedin.com/e/93m4ad-h0a7ef3o-6v/qvLJ-aistYlhPs3qqjT1vY_fnuMVUs-G4YENGdX/goo/losangeles-pm%40mail%2Epm%2Eorg/20061/I2235169719_1/?hs=false&tok=1L9nv6E6ZoYR81 (c) 2012 LinkedIn Corporation. 2029 Stierlin Ct, Mountain View, CA 94043, USA. -------------- next part -------------- An HTML attachment was scrubbed... URL: From tommystanton at gmail.com Tue Mar 27 07:28:06 2012 From: tommystanton at gmail.com (Tommy Stanton) Date: Tue, 27 Mar 2012 09:28:06 -0500 Subject: [LA.pm] Invitation to connect on LinkedIn In-Reply-To: <780637781.9660424.1332807881464.JavaMail.app@ela4-bed81.prod> References: <780637781.9660424.1332807881464.JavaMail.app@ela4-bed81.prod> Message-ID: ThousandOaks.pm was recently afflicted with same type of unintentional e-mail: http://mail.pm.org/pipermail/thousand-oaks-pm/2012-March/thread.html Good times. 2012/3/26 Todd Cranston-Cuebas > > > > > > > From Todd Cranston-Cuebas > > Manager, Recruitment - IT at Warner Bros. > Greater Los Angeles Area > > > > > I'd like to add you to my professional network on LinkedIn. > > - Todd > > > > > Confirm that you know Todd > > > > You are receiving Invitation to Connect emails. Unsubscribe > ? 2012, LinkedIn Corporation. 2029 Stierlin Ct. Mountain View, CA 94043, USA > > > _______________________________________________ > Losangeles-pm mailing list > Losangeles-pm at pm.org > http://mail.pm.org/mailman/listinfo/losangeles-pm