Hi
Moops syntax sugar surprised me. But when I try the first example of the POD as below. Perl complains error.
Not sure this error is belongs to Moo or Moops::Parser.
Can you have a look please?
Best regards,
Michael Vu
__ERROR__
Can't locate object method "done" via package "Moops::Parser" at local/lib/perl5/Moops/Parser.pm line 200.
__PERL_VERSION__
https://hub.docker.com/r/library/perl/tags/perl:5.22.1-threaded
__EXAMPLE__
package Moops::Play;
use Moops;
role NamedThing {
has name => (is => "ro", isa => Str);
}
class Person with NamedThing;
class Company with NamedThing;
class Employee extends Person {
has job_title => (is => "rwp", isa => Str);
has employer => (is => "rwp", isa => InstanceOf["Company"]);
method change_job ( Object $employer, Str $title ) {
$self->_set_job_title($title);
$self->_set_employer($employer);
}
method promote ( Str $title ) {
$self->_set_job_title($title);
}
}
1;