# # modules of my distribution: # Perl::Teacher load_course (then in the program using this module I can call $course->get_description) load_lesson (then in the program using this module I can call $lesson->get_steps) Perl::Teacher::Course new creates a slot for description and one for [lessons] get_description get_lessons Perl::Teacher::Lesson new creates a slot for abstract and one for [steps] get_abstract get_steps # # modules outside my distribution, intended to be written by someone else and installed separately # (note that these modules should have their own tests under /t folder as any module should) # Perl::Teacher::Course::EN::PerlIntro isa Perl::Teacher::Course $__PACKAGE__::description = 'a fair intro to perl', $__PACKAGE__::lessons = [Perl::Teacher::Course::EN::PerlIntro::01_foreword , ...] Perl::Teacher::Course::EN::PerlIntro::01_strictures isa Perl::Teacher::Lesson $__PACKAGE__::abstract = 'introducing the safety net' $__PACKAGE__::steps = [ # a simple text 001=>{type=>text,content=>'We now introduce strictures'}, # check_script_compiles is a method exposed by Perl::Teacher 002=>{ name=>'script compiles', action=>\check_script_compiles() } # a complex test to be run against student's code 003=>{type=>test,content=>{ name => 'strictures', # select_child_of is a method exposed by Perl::Teacher select_child_of => { class => 'PPI::Statement::Include', tests => [ ['PPI::Token::Word', qr/^use$/], ['PPI::Token::Word', 'strict'] ], }, hint => "search perlintro for safety net", docs => ['https://perldoc.perl.org/perlintro.html#Safety-net'], } } ]