12
I'm an average perl programmer. I haven't problem with the language itself, but with the "good" object design. While I'm able understand (most of) CPAN modules, without serious problems, i'm unable design myself even the simple object hierarchy.
Example - now facing an really simple application (web and command line interface):
- the already authenticated student uploads a zip-file (what contains an rendering job)
- unzip the file to and new directory and check it's content (should contain exatly one file
commands.txt) and zero or more images - if the content is OK - move the directory to place called:
JobRepository(another directory) - if the user decided to run the rendering job - send the job from his own
JobRepositoryto global rendering queue (again, another directory) - another process takes the jobs from the queue (fifo - designed with IPC::DirQueue) and execute the rendering process
- when finished, put the result into the users
JobRepository/resultdirectory - send email to the user
- the student can download the zipped results
In bash it is doable with few "not to complicated" bash script - but i want do it in Perl (because web interface) - and want practice perlish (Moose) object design…
And here starts my problems.
Tried "visual" noun-analysis approach and make the next image.

Posted the image, because it is "shorter" as:
package Iren::JobRepo;
use Moose;
use warnings;
has 'Jobs' => (is => 'rw', isa=>ArrayRef[Iren::Job]);
…
method AddJob {
...
}
etc.