Beefy Boxes and Bandwidth Generously Provided by pair Networks
good chemistry is complicated,
and a little bit messy -LW

Re: How to sub class-es

by 1nickt (Canon)
on May 15, 2020 at 14:30 UTC ( #11116816=note: print w/replies, xml ) Need Help??

in reply to How to sub class-es

Hi, there are many great classical OO-design responses above.

I would use Moo (never Moose!) and Roles. (You can also apply Roles to any class or object using Role::Tiny.

Kills me but no time now to show an SSCCE for robots, but there are plenty of great examples around. I recommend SuperSearching this site for examples of Moo usage provided by tobyink (many use farm animals or humans, but I should think you can easily frobnicate that schema to your own :-) )

Hope this helps!

The way forward always starts with a minimal test.

Log In?

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

How do I use this? | Other CB clients
Other Users?
Others meditating upon the Monastery: (4)
As of 2022-05-27 02:21 GMT
Find Nodes?
    Voting Booth?
    Do you prefer to work remotely?

    Results (94 votes). Check out past polls.