New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
ExtUtils::Installed or ExtUtils::Packlist: add function for direct access of a distribution's packlist #13812
Comments
From @eserteIt would be nice if either ExtUtils::Installed or ExtUtils::Packlist had a function for direct access of a packlist. Currently the only way is to use ExtUtils::Packlist->new->packlist(...), but this may be very slow(*) on large perl installations, because apparently all directories and files are scanned. On the other hand ExtUtils::Packlist has no functionality to translate a module name to a packlist path. So while using it would be much more efficient than the EU::I solution, the user has to have knowledge about the internal structure of the perl lib directory. (*) Once I timed 13 minutes for running ExtUtils::Installed->new on a perl installation with a ~2.5GB site_perl directory. |
From @LeontOn Thu, May 8, 2014 at 10:06 PM, slaven@rezic.de
Yes, this behavior is annoying and unnecessary in most cases. Leon |
The RT System itself - Status changed from 'new' to 'open' |
From @jkeenanOn Thu May 08 13:06:37 2014, slaven@rezic.de wrote:
Slaven, Leon, Can you be a bit more specific about what you mean by "direct access of a packlist"? What would that function or method do? Are you referring to a .packlist file or to something like this: ##### Thank you very much. |
From @eserteDana Pet 22. Kol 2014, 17:56:37, jkeenan reče:
Currently there are the following methods to get the packlist of a module: use ExtUtils::Installed; $packlist = ExtUtils::Installed->new->packlist($module); use ExtUtils::Installed; $packlist = ExtUtils::Installed->packlist($module); use ExtUtils::Packlist; $packlist = ExtUtils::Packlist->new->packlist("/I/know/where/the/packlist/of/$module/is/located"); The first two may be slow and resource hungry. The third is fast, but one needs the knowledge where the packlist may be found. I would suggest to add a new method find_packlist which could be used like this: $packlist_path = ExtUtils::Installed->find_packlist($module); find_packlist could look like this (pseudo code): sub find_packlist { Once find_packlist is there it could be used to re-implement the class method variant of ExtUtils::Installed::packlist, so ExtUtils::Installed->packlist won't construct the "default object" anymore, but fetch the packlist directly. As pseudo code: sub packlist { If needed, there could also be more efficient versions for the validate() and version() methods in ExtUtils::Installed, too. The first one could also use find_packlist(), the second would use part of the logic of _make_entry(). |
@eserte, we should have noted back in 2014 that ExtUtils::Installed and ExtUtils::Packlist are maintained upstream on CPAN as part of the ExtUtils-Install distribution. Can you file an issue at its designated bug-tracker? Closing this ticket with 'sendToCPAN' label. |
Migrated from rt.perl.org#121829 (status was 'open')
Searchable as RT121829$
The text was updated successfully, but these errors were encountered: