Beefy Boxes and Bandwidth Generously Provided by pair Networks
go ahead... be a heretic
 
PerlMonks  

Re^6: Moose: I want builder method to run every time I call an attribute (rehash)

by davido (Archbishop)
on Sep 27, 2013 at 06:23 UTC ( #1055933=note: print w/ replies, xml ) Need Help??


in reply to Re^5: Moose: I want builder method to run every time I call an attribute (rehash)
in thread Moose: I want builder method to run every time I call an attribute

This is golden.

My first thought when I saw the question was, "Has Moose made use forget how to write a method? It generally starts with some variation on, 'sub methodname { my $self = shift; ... }'."

A famous aphorism of David Wheeler goes: "All problems in computer science can be solved by another level of indirection"; this is often deliberately mis-quoted with "abstraction layer" substituted for "level of indirection". Kevlin Henney's corollary to this is, "...except for the problem of too many layers of indirection."

Humorous Internet memorandum RFC 1925 insists that:

  • (6) It is easier to move a problem around (for example, by moving the problem to a different part of the overall network architecture) than it is to solve it.
  • (6a) (corollary). It is always possible to add another level of indirection.

(From http://en.wikipedia.org/wiki/Indirection.)

All these layers of abstraction can become a shell game. Eventually someone's got to actually write some code. Spaghetti code can be written without ever using goto. ;)


Dave


Comment on Re^6: Moose: I want builder method to run every time I call an attribute (rehash)
Select or Download Code
Re^7: Moose: I want builder method to run every time I call an attribute (rehash)
by BrowserUk (Pope) on Sep 27, 2013 at 06:34 UTC
    Spaghetti code can be written without ever using goto.

    See also OO-tagliatelle :)


    With the rise and rise of 'Social' network sites: 'Computers are making people easier to use everyday'
    Examine what is said, not who speaks -- Silence betokens consent -- Love the truth but pardon error.
    "Science is about questioning the status quo. Questioning authority".
    In the absence of evidence, opinion is indistinguishable from prejudice.

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://1055933]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others making s'mores by the fire in the courtyard of the Monastery: (16)
As of 2014-07-24 15:48 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    My favorite superfluous repetitious redundant duplicative phrase is:









    Results (161 votes), past polls