i have a simple test class using Moose, with a XML::LibXML::Document attribute, but get an error when I use this test class. The test class is:
package moosetest;
use strict;
use warnings;
use XML::LibXML;
use Moose;
has dom => ( is => 'rw', isa => 'XML::LibXML::Document', required => 0, handles => qr/^( findnodes | documentElement | setDocumentElement | toString | toFile )$/x );
1;
Then it's used in test.pl:
use XML::LibXML;
use moosetest;
my $tt = moosetest->new();
And when I run test.pl, I get an error:
The dom attribute is trying to delegate to a class which has not been loaded - XML::LibXML::Document
I'm using perlbrew, XML::LibXML is installed (I can instantiate a XML::LibXML::Document object without using Moose), Moose has been successfully installed, too.
Looks like I'm missing something important here, but i can't find the source of my problem...
Thanks for any help.
Francois.