p5 modules, get me started on one

Bryan Blackburn blb at macports.org
Wed Jan 21 01:40:10 PST 2009


On Tue, Jan 20, 2009 at 05:50:23PM -0800, Scott Haneda said:
> On Jan 20, 2009, at 5:01 PM, Bryan Blackburn wrote:
[...]
>> Some perl modules come packaged in groups like that, which definitely 
>> can
>> cause confusion.  Maybe the best solution would be to list all actual
>> modules installed with the given port?  Then it may be easier to search 
>> for
>> it.
>
> List it in the port description?  Will that get searched?  How do I even 
> get a list of what is in these packages from the CPAN site?

In the long_description is what I was pondering; if you're running MacPorts
1.7 'port search' will look in (among other field) long_description by
default, with trunk you'd need to add the --long_description flag to search
it.  Anything more specific to perl modules would mean changing base and of
course deciding first how that would work, etc...

[...]
>> The base perl5.8 port should actually have what's in libnet like  
>> Net::SMTP,
>> so no port should actually be needed for this one.
>
>
> How would I know that?
> port search smtp
> All I see is
> p5-net-smtp_auth @0.08 (perl)
>     Perl5 SMTP client with AUTHentication
>
> If that is it, great, but how would I confirm it is in fact the same  
> thing?  All signs point to it being different.

In many cases, a person running 'port install ...' is probably more
interested in some final program and not just perl modules, so that's where
the dependency management comes into play.  This way various port
maintainers only need to determine the which/where question the one time for
these things and anyone else just lets port take it from there.

If you're one of those maintainers, then it definitely helps to know the
software you're dealing with.  In perl's case, what I've done in the past is
to query search.cpan.org for the specific module, which leads you to either
a distribution specific to that module or one that includes several modules.
>From that you'd just create the port and be done with it.

Also, knowing that Net::SMTP is with the base perl5.8 port is something I
just knew because it's part of the perl libnet stuff which was integrated
into perl core some time ago.

>
> Beginning to dislike perl and I have not written more than 100 lines of it 
> in my life :)

One advantage is the massive amount of modules already written to reduce the
amount of work you have to do; one disadvantage is all of the massive amount
of modules one must wade through to determine what you might actually need.
Of course using CPAN makes that easier but then that installs outside of
port, which means you can't depend on it for other ports or use
uninstall/activate/deactivate to manage it, etc.

I guess what I'm trying to say is, if there's an easy answer, I haven't
heard it.

Bryan


> --
> Scott


More information about the macports-users mailing list