Questions tagged [perl-mouse]

Mouse is an object system for the Perl programming language that provides a subset of Moose's functionality. It aims to be highly compatible with Moose, has faster start up times and no dependencies.

  • Official documentation of Mouse
4 questions
42
votes
11 answers

Should I learn Perl 5 OO or Moose first?

I'm still relatively new to Perl Programming, but I know how Perl 5 OO basically works. However, I have never created any project with Perl 5 OO, so I'm quite sure I will run into many pitfalls. Recently I discovered the hype about the Moose module.…
Simon
  • 1,643
  • 2
  • 17
  • 23
3
votes
0 answers

Mouse type constraint implicitly created

I am trying to coerce from the type ArrayRef[HashRef] to ArrayRef[MyModule::Object], but for some reason I am getting an error. Below is my type constraint class: package MyModule::Types; use Mouse::Util::TypeConstraints; subtype…
srchulo
  • 5,143
  • 4
  • 43
  • 72
0
votes
1 answer

Migrating from Moose to Mouse in Perl - Mouse not executing BUILD

I'm trying to migrate from Moose to Mouse in the interests of speed but have encountered a showstopper error. I'm building two objects in the same scope: sub scope { my $foo = Foo->new(); my $bar = Bar->new(); } The BUILD method of Foo is…
git-noob
  • 5,757
  • 11
  • 34
  • 32
0
votes
1 answer

perl Mouse set value before object returned to user

I'm trying to write a perl module using Mouse, and after the object has been initialized, but before the user makes any calls, I need to initialize object1 with the two values from object2 and object3 that the user was required to give. I tried to…
srchulo
  • 5,143
  • 4
  • 43
  • 72