Skip Menu |

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

Report information
The Basics
Id: 75209
Status: resolved
Priority: 0/
Queue: MooX-Types-MooseLike

People
Owner: Nobody in particular
Requestors: dolmen [...] cpan.org
Cc:
AdminCc:

Bug Information
Severity: Wishlist
Broken in: 0.02
Fixed in: (no value)



Subject: Import 'Exporter' directly without using 'base'
In 0.02, the Exporter module is imported with the following line: use base 'Exporter'; This does not matches the documented way of loading Exporter (see https://metacpan.org/module/Exporter#SYNOPSIS ) and it makes use of base.pm while this could be cleanly avoided. Suggested patch: - use base 'Exporter'; + use Exporter 5.57 'import'; Advantages: - one less module loaded (base.pm), less code compiled/processed - avoids to load base.pm (an old module which is better replaced by parent.pm for the most common use case) - avoids to depend on base.pm for this distribution (META.yml) -- Olivier Mengué - http://perlresume.org/DOLMEN
Subject: [PATCH] Import 'Exporter' directly without using 'base'
RT-Send-CC: mateu [...] cpan.org
Hi, Here is a patch: https://github.com/mateu/MooX-Types-MooseLike/pull/2 Le 2012-02-22 13:58:49, DOLMEN a écrit : Show quoted text
> In 0.02, the Exporter module is imported with the following line: > use base 'Exporter'; > > This does not matches the documented way of loading Exporter (see > https://metacpan.org/module/Exporter#SYNOPSIS ) and it makes use of > base.pm while this could be cleanly avoided. > > Suggested patch: > - use base 'Exporter'; > + use Exporter 5.57 'import';
-- Olivier Mengué - http://perlresume.org/DOLMEN
Thanks for the suggestion