tag 445805 patch
thanks

On Mon, Oct 08, 2007 at 12:28:57PM +0200, Lucas Nussbaum wrote:
> Package: libmoosex-getopt-perl
> version: 0.05-1
> Severity: serious
> User: [EMAIL PROTECTED]
> Usertags: qa-ftbfs-20071007 qa-ftbfs
> Justification: FTBFS on i386

> During a rebuild of all packages in sid, your package failed to build on i386.

> t/pod_coverage................
> #   Failed test 'Pod coverage on MooseX::Getopt::OptionTypeMap'
> #   in /usr/share/perl5/Test/Pod/Coverage.pm at line 126.
> # Coverage for MooseX::Getopt::OptionTypeMap is 75.0%, with 1 naked 
> subroutine:
> #     meta

This broke with libmoose-perl 0.26. The function
MooseX::Getopt::OptionTypeMap::meta() is indeed missing documentation,
this was just not detected earlier.

The Moose internals changed so that the meta() function (Moose
metaclass accessor) is no longer a constant anonymous subroutine
but rather a closure. The Pod coverage test happened to work earlier
because MooseX::Getopt::OptionTypeMap::meta() function was an alias for
MooseX::Getopt::Meta::Attribute, and Pod::Coverage would skip it when
walking the symbol tree.

The trivial fix is to add the missing documentation. In the long run
(ie. upstream), using Pod-Coverage-Moose might be a good idea, since
it's specialized to Moose testing (and lists those meta() functions as
'trusted', ie. not requiring documentation.)

Suprisingly, upgrading to Pod::Coverage 0.19 also fixes this, since
it changes the check for imported functions and as a result skips
the meta() functions too.

Patch attached.

Cheers,
-- 
Niko Tyni   [EMAIL PROTECTED]
diff --git a/lib/MooseX/Getopt/OptionTypeMap.pm b/lib/MooseX/Getopt/OptionTypeMap.pm
index d56e479..22c3c5d 100644
--- a/lib/MooseX/Getopt/OptionTypeMap.pm
+++ b/lib/MooseX/Getopt/OptionTypeMap.pm
@@ -90,6 +90,10 @@ These are all class methods and should be called as such.
 
 =item B<add_option_type_to_map ($type_name, $option_spec)>
 
+=item B<meta>
+
+The Moose metaclass accessor.
+
 =back
 
 =head1 BUGS

Reply via email to