[Israel.pm] Adding library inside cpan module
Shmuel Fomberg
semuelf at 012.net.il
Tue Sep 2 13:00:58 PDT 2008
Hi All.
Maybe I can export a function, "ParseLibrary", and let people do:
$bmp_parser = ParseLibrary("Graphics-BMP");
and the function will "require" the relevant module and return the
correct parser.
What do you think?
Shmuel.
Shmuel Fomberg wrote:
> Hi All.
>
> I have this module on CPAN, Data::ParseBinary.
> now I want to add a library of pre-prepared format. For example, a
> parser/builder for BMP files.
> The question is, how do I call it?
> some options that I though about:
> have module named Data::ParseBinary::lib::GraphicsBMP that export
> function named GetGraphicBMP, or a variable $GraphicBMP.
> maybe I shoud skip the "lib" level, and mass all the files under the
> same directory, creating a Data::ParseBinary::GraphicsBMP module.
> another possibility is to make a Data::ParseBinary::lib module, that
> export function GraphicBMP().
>
> What do you say?
> Shmuel.
> _______________________________________________
> Perl mailing list
> Perl at perl.org.il
> http://perl.org.il/mailman/listinfo/perl
>
More information about the Perl
mailing list