Skip Menu |

This queue is for tickets about the Type-TinyX-Facets CPAN distribution.

Report information
The Basics
Id: 125681
Status: resolved
Priority: 0/
Queue: Type-TinyX-Facets

People
Owner: djerius [...] cpan.org
Requestors: perl [...] toby.ink
Cc:
AdminCc:

Bug Information
Severity: Wishlist
Broken in: 0.01
Fixed in: 0.03



Subject: Dependency on Data::OptList can be eliminated pretty easily
Technically, Type::TinyX::Facets doesn't have a runtime dependency on Type::Tiny, only a testing dependency. But if you were willing to give it a runtime dependency, you would get an implementation of mkopt for free: use Exporter::Tiny qw(mkopt); Exporter::Tiny used to be bundled with Type::Tiny but was split off as its own thing. It's Type::Tiny's only non-core dependency on recent versions of Perl. So basically, you could do that instead of using Data::OptList. Additionally, if you used Exporter::Tiny as your exporter instead of Exporter.pm, then you'd get this feature: use Type::TinyX::Facets facetize => { -as => "facetise" };
On Mon Jun 25 08:12:59 2018, TOBYINK wrote: Show quoted text
> Technically, Type::TinyX::Facets doesn't have a runtime dependency on > Type::Tiny, only a testing dependency. But if you were willing to give > it a runtime dependency, you would get an implementation of mkopt for > free: > > use Exporter::Tiny qw(mkopt); > > Exporter::Tiny used to be bundled with Type::Tiny but was split off as > its own thing. It's Type::Tiny's only non-core dependency on recent > versions of Perl. > > So basically, you could do that instead of using Data::OptList. > > > Additionally, if you used Exporter::Tiny as your exporter instead of > Exporter.pm, then you'd get this feature: > > use Type::TinyX::Facets facetize => { -as => "facetise" };
Thanks for the suggestion. I'll steal your example. BTW, the docs for Exporter::Tiny don't mention that mkopt and mkopt_hash are importable.
Thanks for the suggestion.