|We don't bite newbies here... much|
Module design for loadable external modules containing databy Discipulus (Abbot)
|on Oct 14, 2020 at 16:31 UTC||Need Help??|
Discipulus has asked for the wisdom of the Perl Monks concerning the following question:
The title shows well the confusion I'm feeling about the matter :)
In my intention me and others will write and release various courses in the form of Perl::Teacher::Course::EN::PerlIntro (for example) containing many different lesson modules like Perl::Teacher::Course::EN::PerlIntro::01_foreword etc.
This is because the main Perl::Teacher object must be able to load a course and sequentially all its lessons at runtime.
But I'm very confused about how to write these main base classes. Basically each lesson will be full of steps containing discourses, assignements, questions and, more importantly, tests to be run against student's perl programs (see the proof of concept to have an idea).
The Perl::Teacher::Course::EN::PerlIntro::01_foreword module must be able to call methods from the main distribution but will contain a lot of data (texts and tests).
Basically Perl::Teacher::Course::EN::PerlIntro::01_foreword can just have a mere @EXPORT exporting a big array/hash of data to be processed by the main Perl::Teacher object, but this sounds a bit primitive to me.
How to provide a nice and easy to use interface to course writers?
I have no experience with Moo and friends, so if you want to provide some sketch please take the patience and explain it plainly.
I'm totally of the road? Complete redisign suggestions are also welcome if well explained.
There are no rules, there are no thumbs..
Reinvent the wheel, then learn The Wheel; may be one day you reinvent one of THE WHEELS.