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