http://qs321.pair.com?node_id=11123939


in reply to Re^2: Modules design pattern: abstraction vs incarnation (providing not so static data)
in thread Modules design pattern: abstraction vs incarnation (providing not so static data)

I had a glance at the other articles when they appeared and re-read them before answering. First of all it is a bit of a misnomer: Your goal is not to actually teach: you want to present exercises and evaluate responses. Teaching needs a storyline, a concept of independent modules doesn't help with that.

Your second article contains 460 lines of code but not a single line of POD - sorry, I didn't spend time to walk through that. It doesn't give the impression of No one line of code has stil been wrote.

I almost suspected that you aren't aware of the technical decisions you already made. I don't mind PPI - that's what I'd call an "internal affair". But there are others:

So, how did I guess that you use scripts to store objects? You wrote: I have designed it to have incarnations (game scenarios in this case) as standalone scripts and this approach lead me to shell out when changing the current scenario. If you can't get a scenario's attributes without running a script, then I guessed the script stores this scenario's data. This may be wrong, or at least irrelevant.

And finally, about OO frameworks: I didn't mention roles, and I didn't even have them in mind. All problems can be solved just fine without roles, but roles can bring elegance by avoiding boilerplate code. But Perl's OO frameworks have a lot more to offer. The issue is that there are too many of them :)

  • Comment on Re^3: Modules design pattern: abstraction vs incarnation (providing not so static data)

Replies are listed 'Best First'.
Re^4: Modules design pattern: abstraction vs incarnation (providing not so static data)
by tobyink (Canon) on Nov 21, 2020 at 17:56 UTC

    "But Perl's OO frameworks have a lot more to offer. The issue is that there are too many of them :)"

    There are only three, and they play pretty nicely together.

    • Moose
    • Moo
    • Class::Tiny

    The others do not exist. Or we can pretend they don't anyway.

A reply falls below the community's threshold of quality. You may see it by logging in.