Skip Menu |
 

Preferred bug tracker

Please visit the preferred bug tracker to report your issue.

This queue is for tickets about the Software-License CPAN distribution.

Report information
The Basics
Id: 66476
Status: open
Priority: 0/
Queue: Software-License

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

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



Subject: Add classes_for_meta_name()
Date: Tue, 8 Mar 2011 15:28:52 -0800
To: bug-software-license [...] rt.cpan.org
From: David E. Wheeler <DWHEELER [...] cpan.org>
To Software::LicenseUtils. Please. :-)
Download (untitled) / with headers
text/plain 350b
Il Mar 08 Mar 2011 18:28:58, DWHEELER ha scritto: Show quoted text
> To Software::LicenseUtils. Please. :-)
The current implementation of guess_license_from_meta is a little broken, but you should be able to use it like this: sub classes_for_meta_name { my $meta_name = shift; return Software::LicenseUtils->guess_license_from_meta("license:$meta_name"); }
Subject: Re: [rt.cpan.org #66476] Add classes_for_meta_name()
Date: Fri, 22 Apr 2011 19:09:50 -0700
To: bug-Software-License [...] rt.cpan.org
From: "David E. Wheeler" <dwheeler [...] cpan.org>
Download (untitled) / with headers
text/plain 540b
On Apr 22, 2011, at 6:57 PM, Flavio Poletti via RT wrote: Show quoted text
> The current implementation of guess_license_from_meta is a little broken, but you should be > able to use it like this: > > sub classes_for_meta_name { > my $meta_name = shift; > return Software::LicenseUtils->guess_license_from_meta("license:$meta_name"); > }
Here's what I ended up doing: sub _license($) { my $class = $class_for{+shift} or return; $class = "Software::License::$class"; eval "require $class; 1" or die; return $class; } Best, David
Subject: Re: [rt.cpan.org #66476] Add classes_for_meta_name()
Date: Fri, 22 Apr 2011 19:11:11 -0700
To: bug-Software-License [...] rt.cpan.org
From: David E. Wheeler <dwheeler [...] cpan.org>
Download (untitled) / with headers
text/plain 384b
On Apr 22, 2011, at 7:09 PM, David E. Wheeler wrote: Show quoted text
> Here's what I ended up doing: > > sub _license($) { > my $class = $class_for{+shift} or return; > $class = "Software::License::$class"; > eval "require $class; 1" or die; > return $class; > > }
Sorry, some context: https://github.com/pgxn/pgxn-site/blob/master/lib/PGXN/Site/Templates.pm#L1414 Best, David


This service is sponsored and maintained by Best Practical Solutions and runs on Perl.org infrastructure.

Please report any issues with rt.cpan.org to rt-cpan-admin@bestpractical.com.