Beefy Boxes and Bandwidth Generously Provided by pair Networks
The stupid question is the question not asked
 
PerlMonks  

Re: Re: Building an anonymous subroutine

by Anonymous Monk
on Aug 13, 2002 at 12:39 UTC ( #189759=note: print w/replies, xml ) Need Help??


in reply to Re: Building an anonymous subroutine
in thread Building an anonymous subroutine

Closures upon closures is not intrinsically easier or harder to keep organized than subclasses upon subclasses.

They just organize naturally in different ways. If a clean OO model fits your problem, then OO naturally channels you. If it doesn't, then using closures is better than trying to fight OO into an imitation of what you would do more naturally with closures. Particularly so in Perl where writing any OO involves so much infrastructure.

BTW your extra method-call hooks could be replaced with a single method that is intended to be called from subclasses with SUPER. Less code and infrastructure, same result.

  • Comment on Re: Re: Building an anonymous subroutine

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://189759]
help
Chatterbox?
[Tanktalus]: yeah, I saw you post about MCE - the concept looks really really cool. I wonder how well it plays with Coro :)
[Lady_Aleena]: Hi guys. I asked this earlier but got no answer. Why is this dying at -exec: my @music_times = qx(find ~/Music/Albums/ -type f -iname '*.mp3' -exec mp3info -p "%S\n" {} \;);
[Lady_Aleena]: The error find: missing argument to `-exec'
[Discipulus]: Tanktalus we will be glad to have you here more frequently, tho ;=)
[marioroy]: Lady_Aleena oh I thought you found the error by adding -exec mp3info
[Tanktalus]: Discipulus: I should be working on an interview test right now. Well, I kind of am, but keep getting myself distracted :)
[Lady_Aleena]: marioroy, nope, that IS the error.
[Discipulus]: oh to be distracted PM is still a wonderfull place
[Tanktalus]: Problem is, it's a test for another monk - as in, another monk letting me interview for his company :)

How do I use this? | Other CB clients
Other Users?
Others perusing the Monastery: (6)
As of 2017-04-23 19:57 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    I'm a fool:











    Results (432 votes). Check out past polls.