[107013] trunk/dports/devel

Adam Mercer ram at macports.org
Wed Jun 19 08:00:07 PDT 2013


On Wed, Jun 19, 2013 at 9:35 AM, Dennis van Dok <dennisvd at nikhef.nl> wrote:

> Can I use this code from the perl5 portGroup:
>
> in /opt/local/var/macports/sources/rsync.macports.org/release/ports/_resources/port1.0/group/perl5-1.0.tcl:
>
> proc perl5_get_default_branch {} {
>     global prefix
>     # use whatever ${prefix}/bin/perl5 was chosen, and if none, fall back to 5.12
>     if {![catch {set val [lindex [split [exec ${prefix}/bin/perl5 -V:version] {'}] 1]}]} {
>         return [join [lrange [split $val .] 0 1] .]
>     } else {
>         return 5.12
>     }
> }
>
> This logic seems pretty safe even if perl is not installed. The only thing that bugs me is that
> the version returned is 5.12.4 and not 5.12.

If we hard code the usage of perl5.12, as this is the default, is the
above needed?

Cheers

Adam


More information about the macports-dev mailing list