Skip Menu |

This queue is for tickets about the List-MoreUtils CPAN distribution.

Report information
The Basics
Id: 14783
Status: resolved
Priority: 0/
Queue: List-MoreUtils

People
Owner: Nobody in particular
Requestors: darren [...] DarrenDuncan.net
Cc:
AdminCc:

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



Subject: first_index() not exportable, an unintended bug
Hello, The latest version of List::MoreUtils does not make first_index() exportable, a situation that looks like an unintended bug. I believe the fix is simply to add first_index to %EXPORT_TAGS near the top of the file. Note that this function is cited by Damian Conway's "Perl Best Practices", on page 173, and it is also suggested to treat your module's functions as honorary built-ins, which means in exportable format, not package-qualified calling format. And a lot of people will probably try to use it really soon. I wish to use the function by that name and not by the firstidx() name, in a module I'm going to release to CPAN later today or tomorrow, so I would appreciate a corrected version of List::MoreUtils to be put on CPAN immediately, that I can cite as a prerequisite. As I said, other functions may be omitted in the same fashion, so you should check for those at the same time. Thank you in advance. -- Darren Duncan
[guest - Tue Sep 27 19:41:02 2005]: Show quoted text
> Hello,
Hi there, and thanks for your report. Show quoted text
> The latest version of List::MoreUtils does not make first_index() > exportable, a situation that looks like an unintended bug.
It is unintended. I reckon it wasn't exportable in earlier versions either. Show quoted text
> I believe the fix is simply to add first_index to %EXPORT_TAGS near > the top of the file. > > Note that this function is cited by Damian Conway's "Perl Best > Practices", on page 173, and it is also suggested to treat your > module's functions as honorary built-ins, which means in exportable > format, not package-qualified calling format. And a lot of people > will probably try to use it really soon.
Gee, I didn't know that. But even when putting that aside, each symbol in List::MoreUtils is supposed to be exportable. Show quoted text
> I wish to use the function by that name and not by the firstidx() > name, in a module I'm going to release to CPAN later today or > tomorrow, so I would appreciate a corrected version of > List::MoreUtils to be put on CPAN immediately, that I can cite as a > prerequisite.
I just uploaded 0.12 to the CPAN and it should appear their soon. Show quoted text
> As I said, other functions may be omitted in the same fashion, so you > should check for those at the same time.
Yep, found another missing one: each_arrayref. Cheers, Tassilo