Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

What the "auto" in "lib" could be used for

Tags:

perl

Say I have a module which will get eventually some day on CPAN. Is it ok to use the "auto" folder to store some default resources (templates, images etc.) that my module will use. The user of the module may decide locally to use his own resources, but the module should work out of the box whithout needing any configurations. Some tend to use the DATA section in the .pm file (even for binary data) but I prefer separate files. Is there a convention or best practice? Thanks in advance.

like image 890
Беров Avatar asked Dec 05 '25 13:12

Беров


1 Answers

Don't use the /auto subdirectories for that. Use the File::ShareDir module to locate the appropriate directory for a module's shared files.

like image 178
John Siracusa Avatar answered Dec 08 '25 06:12

John Siracusa



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!