Beefy Boxes and Bandwidth Generously Provided by pair Networks
No such thing as a small change
 
PerlMonks  

Re^5: Moose - two augmented methods in one class

by stvn (Monsignor)
on Jan 11, 2012 at 05:19 UTC ( #947288=note: print w/replies, xml ) Need Help??


in reply to Re^4: Moose - two augmented methods in one class
in thread Moose - two augmented methods in one class

I think the lesson to be learned here is simply "don't use augment/inner for anything complicated", which can be whittled down to "don't use augment/inner" if you like.

Basically, it was an interesting feature, but not something I would advise leaning on too heavily. Not only is the implementation problematic, but the semantics are just plain weird (even in the BETA language from which I originally stole it).

-stvn
  • Comment on Re^5: Moose - two augmented methods in one class

Replies are listed 'Best First'.
Moose - inner/augment a misfeature?
by tobyink (Abbot) on Jan 11, 2012 at 12:04 UTC

    Would it be fair to say then, that issue #73850 should be subsumed into a larger issue: "inner/augment need moving into a MooseX release"?

      Ultimately it would be nice if we could make it work properly, but that might be too much to ask from a library. However I will let the current maintainers chew on it a little and see if they can fix it (crazier sh*t has been pulled off in the past).

      I think moving to a MooseX:: is probably too extreme and would seriously break backwards compat, and as I said, it works in simple cases. If nothing more, it would require a loooooooong deprecation cycle. So perhaps the better approach is more a matter of documentation updates that better explain the caveats.

      Thankfully, only a small percentage of people actually grok this feature and of those people only a handful of them are crazy enough to try and use it.

      -stvn

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://947288]
help
Chatterbox?
[Corion]: GrandFather: Yeah, in that aspect, hardware is far more a black box than software
[GrandFather]: Oh, and the manufacturer tells lies too! I'm sure they don't mean to, but I know for sure some of the stuff they say is just wrong. It's possible they don't understand what we are asking, but that's not a good look either
[Corion]: GrandFather: Ah, unit testing hardware is fun, especially when the hardware is uncalibrated ...
[GrandFather]: Us: "What scaling do we need to apply to the numbers from the SDK for the wibble?". Them: "Oh, the numbers from the SDK for the wibble are already correct, they don't need scaling"
[GrandFather]: In our code: wibble range 1 scale by 1, range 2 scale by 2, range 3 scale by 4, range 4 scale by 8

How do I use this? | Other CB clients
Other Users?
Others imbibing at the Monastery: (7)
As of 2017-08-24 07:16 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    Who is your favorite scientist and why?



























    Results (365 votes). Check out past polls.

    Notices?