G'day Monks.

Today's teaser is a problem with MOP.pm ver 1.04 (squeeze) that works in ver 0.95 .

It seems that it won't load ACME/EAD/Processor.pm, but I can't see why, and the error is just a bit bizzarre!

This is all the output:
Class::MOP::Class::Immutable::Trait #### Class/MOP/Class/Immutable/Trait.pm **** ACME::EAD::Processor #### ACME/EAD/Processor.pm **** Couldn't load class (ACME::EAD::Processor) because: ArrayRef[ReadableD +ir] contains invalid characters for a type name. Names can contain al +phanumeric character, ":", and "." Compilation failed in require at /usr/share/perl5/ACME/EAD/Processor.p +m line 3. BEGIN failed--compilation aborted at /usr/share/perl5/ACME/EAD/Process +or.pm line 3. Compilation failed in require at /usr/lib/perl5/Class/MOP.pm line 118. at /usr/lib/perl5/Class/MOP.pm line 124 Class::MOP::__ANON__('ArrayRef[ReadableDir] contains invalid c +haracters for a type ...') called at /usr/share/perl5/Try/Tiny.pm lin +e 98 Try::Tiny::try('CODE(0xa0375b0)', 'Try::Tiny::Catch=REF(0xa571 +570)') called at /usr/lib/perl5/Class/MOP.pm line 129 Class::MOP::load_first_existing_class('ACME::EAD::Processor') +called at /usr/lib/perl5/Class/MOP.pm line 141 Class::MOP::load_class('ACME::EAD::Processor', undef) called a +t /usr/lib/perl5/Moose/Meta/Class.pm line 288 Moose::Meta::Class::superclasses(undef, 'ACME::EAD::Processor' +) called at /usr/lib/perl5/Moose.pm line 54 Moose::extends('Moose::Meta::Class=HASH(0xa4e7fa0)', 'ACME::EA +D::Processor') called at /usr/lib/perl5/Moose/Exporter.pm line 294 Moose::extends('ACME::EAD::Processor') called at /usr/share/pe +rl5/ACME/EAD/TAM/Processor.pm line 10 require ACME/EAD/TAM/Processor.pm called at /avprog/bin/proces +s_eadesi_tam.pl line 4 main::BEGIN() called at /usr/share/perl5/ACME/EAD/TAM/Processo +r.pm line 0 eval {...} called at /usr/share/perl5/ACME/EAD/TAM/Processor.p +m line 0 Compilation failed in require at /avprog/bin/process_eadesi_tam.pl lin +e 4. BEGIN failed--compilation aborted at /avprog/bin/process_eadesi_tam.pl + line 4.
The error is in this segement :
my $file = _class_to_pmfile($name); print "$file ****\n"; return $name if try { local $SIG{__DIE__}; require $file; $name->VERSION($options->{-version}) if defined $options->{-version}; return 1; } catch { unless (/^Can't locate \Q$file\E in \@INC/) { confess "Couldn't load class ($name) because: $_"; } return; }; }

In reply to Moose - MOP.pm funny by martinm

Title:
Use:  <p> text here (a paragraph) </p>
and:  <code> code here </code>
to format your post, it's "PerlMonks-approved HTML":



  • Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
  • Titles consisting of a single word are discouraged, and in most cases are disallowed outright.
  • Read Where should I post X? if you're not absolutely sure you're posting in the right place.
  • Please read these before you post! —
  • Posts may use any of the Perl Monks Approved HTML tags:
    a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, details, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, summary, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
  • You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
            For:     Use:
    & &amp;
    < &lt;
    > &gt;
    [ &#91;
    ] &#93;
  • Link using PerlMonks shortcuts! What shortcuts can I use for linking?
  • See Writeup Formatting Tips and other pages linked from there for more info.