Skip Menu |

This queue is for tickets about the MooseX-Types CPAN distribution.

Report information
The Basics
Id: 68640
Status: resolved
Priority: 0/
Queue: MooseX-Types

People
Owner: Nobody in particular
Requestors: stro@cpan.org (no email address)
Cc:
AdminCc:

Bug Information
Severity: Critical
Broken in:
  • 0.24
  • 0.25
Fixed in: (no value)



Subject: "use MooseX::Types::Perl" leads to error
Hello. Having "use MooseX::Types::Perl" anywhere in the code leads to error because of some kind of circularity (MooseX::Types::Util::filter_tags used in MooseX::Types::Util::import). Code to reproduce problem: --- cut --- #!/usr/bin/perl -w use strict; use warnings; use MooseX::Types::Perl; --- cut --- Result of calling it with -d: --- cut --- Undefined subroutine &MooseX::Types::filter_tags called at C:/bin/dev/perl/site/lib/MooseX/Types.pm line 345. at C:/bin/dev/perl/site/lib/MooseX/Types.pm line 345 MooseX::Types::import('MooseX::Types', '-declare', 'ARRAY(0x25886c4)') called at C:/bin/dev/perl/site/lib/MooseX/Types/Perl.pm line 6 MooseX::Types::Perl::BEGIN() called at C:/bin/dev/perl/site/lib/MooseX/Types.pm line 18 eval {...} called at C:/bin/dev/perl/site/lib/MooseX/Types.pm line 18 require MooseX/Types/Perl.pm called at m-t-error.pl line 6 main::BEGIN() called at C:/bin/dev/perl/site/lib/MooseX/Types.pm line 18 eval {...} called at C:/bin/dev/perl/site/lib/MooseX/Types.pm line 18 BEGIN failed--compilation aborted at C:/bin/dev/perl/site/lib/MooseX/Types/Perl.pm line 18. at C:/bin/dev/perl/site/lib/MooseX/Types/Perl.pm line 18 require MooseX/Types/Perl.pm called at m-t-error.pl line 6 main::BEGIN() called at C:/bin/dev/perl/site/lib/MooseX/Types/Perl.pm line 18 eval {...} called at C:/bin/dev/perl/site/lib/MooseX/Types/Perl.pm line 18 Compilation failed in require at m-t-error.pl line 6. at m-t-error.pl line 6 main::BEGIN() called at C:/bin/dev/perl/site/lib/MooseX/Types/Perl.pm line 6 eval {...} called at C:/bin/dev/perl/site/lib/MooseX/Types/Perl.pm line 6 BEGIN failed--compilation aborted at m-t-error.pl line 6. at m-t-error.pl line 6 --- cut --- Similar problem happens to MooseX::Types::Base, because of "find_type_constraint" and "build_exporter" in "sub import". Maybe it was not designed to be called that way, but Dist::Zilla use MooseX::Types::Perl, which leads to this error. Let me know if you're unable to reproduce this problem, and I'll provide you with more information. -- Serguei Trouchelle
I can't reproduce this with the latest version of MX::Types and MX::Types::Perl.