in reply to Re: Inheritance when subclass passed as a parameter
in thread [Solved] Inheritance when subclass passed as a parameter

Shouldn't it use roles instead of inheritance?
  • Comment on Re^2: Inheritance when subclass passed as a parameter

Replies are listed 'Best First'.
Re^3: Inheritance when subclass passed as a parameter
by tobyink (Canon) on Feb 06, 2020 at 08:43 UTC

    I thought I replied to this yesterday, but I guess I did the thing where I preview a post and then forgot to actually post it.

    Anyway, the Service class is usable in its own right, so it makes sense to keep it as a class, not a role.

    my $text = Service->new( template => "[data]\n", data => 'foo' );