Beefy Boxes and Bandwidth Generously Provided by pair Networks
Perl Monk, Perl Meditation
 
PerlMonks  

Re: OO Pattern Container x Elements and Method Chaining

by choroba (Cardinal)
on Oct 08, 2021 at 15:13 UTC ( [id://11137347]=note: print w/replies, xml ) Need Help??


in reply to OO Pattern Container x Elements and Method Chaining

Can you clarify what the problem is? I'm confused by the seemingly contradictory statements:

1. Elements need to belong to multiple Containers

2. can't be member_of two different containers

map{substr$_->[0],$_->[1]||0,1}[\*||{},3],[[]],[ref qr-1,-,-1],[{}],[sub{}^*ARGV,3]

Replies are listed 'Best First'.
Re^2: OO Pattern Container x Elements and Method Chaining
by LanX (Saint) on Oct 08, 2021 at 15:17 UTC
    Elements used to be member of ad most one Container

    we coded a lot of method chaining

    $cont->get_elem('name')->do_something()

    Now Elements can belong to multiple Containers.

    we need the old code with method chaining to keep working.

    Clearer now? :)

    update

    I should have said that ->do_something() needs to do know $cont.

    Cheers Rolf
    (addicted to the Perl Programming Language :)
    Wikisyntax for the Monastery

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others imbibing at the Monastery: (5)
As of 2024-03-28 23:42 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found