Hello folks,

The title shows well the confusion I'm feeling about the matter :)

For my Perl::Teacher project (see here and there) I plan to write a base class Perl::Teacher::Lesson and a Perl::Teacher::Course one aimed to just contain lessons logically grouped.

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.

L*

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.

In reply to Module design for loadable external modules containing data by Discipulus

Title:
Use:  <p> text here (a paragraph) </p>
and:  <code> code here </code>
to format your post, it's "PerlMonks-approved HTML":



  • Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
  • Titles consisting of a single word are discouraged, and in most cases are disallowed outright.
  • Read Where should I post X? if you're not absolutely sure you're posting in the right place.
  • Please read these before you post! —
  • Posts may use any of the Perl Monks Approved HTML tags:
    a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, details, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, summary, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
  • You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
            For:     Use:
    & &amp;
    < &lt;
    > &gt;
    [ &#91;
    ] &#93;
  • Link using PerlMonks shortcuts! What shortcuts can I use for linking?
  • See Writeup Formatting Tips and other pages linked from there for more info.