Index: perl5/Portfile
===================================================================
--- perl5/Portfile	(revision 57748)
+++ perl5/Portfile	(working copy)
@@ -4,110 +4,28 @@
 PortSystem      1.0
 
 name            perl5
-version         5.8.9
+version         5.10
 categories      lang
 platforms       darwin freebsd linux
 maintainers     ricci mcalhoun
-#description     Perl 5 - Practical Extraction and Report Language (maintenance release)
 
-#long_description \
-#    Perl is a general-purpose programming language originally developed \
-#    for text manipulation and now used for a wide range of tasks including \
-#    system administration, web development, network programming, GUI \
-#    development, and more.
+description     Virtual port for the latest perl 5.x
+long_description ${description}
 
-#distname        perl-${version}
-#use_bzip2       yes
 homepage        http://www.perl.org/
-#master_sites    http://www.cpan.org/src/
+distfiles
 
-#checksums        \
-#    md5     1cb52a76ce77fa300218da96577793ec \
-#    sha1    19843b5a7585cf35d96c07dbcd419bbdd5813617 \
-#    rmd160  680004238d626ec985075e1b4519b7f0b34f57e5
+depends_lib     port:perl5.10
 
-#post-patch {
-#    reinplace "s|/opt/local|${prefix}|g" ${worksrcpath}/Configure
-#    # Ensure that the ld value set in configure.args is used
-#    reinplace "s|ld='cc';||" ${worksrcpath}/hints/darwin.sh
-#}
-
-#configure.env       LC_ALL=C
-#configure.cmd       /bin/sh Configure
-#configure.pre_args
-#configure.args \
-#    -des \
-#    -D prefix='${prefix}' \
-#    -D cppflags="\${CPPFLAGS}" \
-#    -D ldflags="\${LDFLAGS}" \
-#    -D vendorprefix='${prefix}' \
-#    -D man3ext='3pm' \
-#    -D cc=\${CC} \
-#    -D ld=\${CC}
-
-#set exclude_libs {bind gdbm db}
-
-#post-patch {
-#    foreach lib ${exclude_libs} {
-#        configure.args-append  -U i_${lib}
-#        reinplace "s|\\(libswanted=.*\\)${lib} *\\(.*\\)|\\1\\2|" ${worksrcpath}/Configure
-#    }
-#}
-
-universal_variant   no
-
-#test.run            yes
-
-#post-destroot {
-#    ln -s perl${version} ${destroot}${prefix}/bin/$name
-#}
-
-#variant threads description {Build with thread support} {
-#    configure.args-append   -Dusethreads
-#}
-
-#variant shared description {Build shared perl library} {
-#    configure.args-append   -Duseshrplib
-#}
-
-#variant gdbm description {Build with gdbm support} {
-#    depends_lib-append port:gdbm
-#    set exclude_libs [ldelete ${exclude_libs} gdbm]
-#}
-
-#variant db description {Build with Berkeley Data Base support} {
-#    depends_lib-append port:db47
-#    set exclude_libs [ldelete ${exclude_libs} db]
-    
-#    post-patch {
-#        reinplace "s|${prefix}/include|${prefix}/include ${prefix}/include/db47|g" ${worksrcpath}/Configure
-#        reinplace "s|${prefix}/lib|${prefix}/lib ${prefix}/lib/db47|g" ${worksrcpath}/Configure
-#    }
-#}
-
-#livecheck.type  regex
-#livecheck.url   http://www.cpan.org/src
-#livecheck.regex {perl-(5\.8\.\d)\.}
-
-
-#######################################################
-fetch {}
-checksum {}
-extract {}
-use_configure       no
+use_configure   no
 build {}
-description Placeholder port. See http://trac.macports.org/ticket/16830
-long_description ${description}
 destroot {
-    xinstall -d ${destroot}${prefix}/share/doc/${name}
-    system "echo ${long_description} > ${destroot}${prefix}/share/doc/${name}/README.txt"
+    ln -s perl${version} ${destroot}${prefix}/bin/${name}
+    ln -s perl${version} ${destroot}${prefix}/bin/perl
+    set binaries {a2p c2ph config_data corelist cpan cpan2dist cpanp cpanp-run-perl dprofpp enc2xs find2perl h2ph h2xs instmodsh libnetcfg perlbug perldoc perlivp piconv pl2pm pod2html pod2latex pod2man pod2text pod2usage podchecker podselect prove psed pstruct ptar ptardiff s2p shasum splain xsubpp}
+    foreach bin $binaries {
+        ln -s ${bin}-${version} ${destroot}${prefix}/bin/${bin}
+    }
 }
-archive {}
-livecheck.type      none
-master_sites
-depends_lib port:perl5.8
 
-post-destroot {
-    ln -s perl${version} ${destroot}${prefix}/bin/$name
-}
-#######################################################
+livecheck.type     none
Index: perl5.10/Portfile
===================================================================
--- perl5.10/Portfile	(revision 57748)
+++ perl5.10/Portfile	(working copy)
@@ -4,7 +4,7 @@
 
 name            perl5.10
 version         5.10.1
-revision        0
+revision        1
 categories      lang
 platforms       darwin freebsd linux
 maintainers     ricci openmaintainer
@@ -45,7 +45,7 @@
                     -Dldflags=-L'${prefix}/lib' \
                     -Dvendorprefix='${prefix}'	\
 					-D cc=\${CC} \
-					-D ld=\${CC} \
+					-D ld=\${CC}
 
 ## 					-D man1ext='1pm' \
 ## 					-D man3ext='3pm' \
@@ -56,6 +56,12 @@
 ## 					-D vendorman1dir='${prefix}/share/man/man1' \
 ## 					-D vendorman3dir='${prefix}/share/man/man3'
 
+if { [variant_isset threads] } {
+    configure.post_args-append "-D inc_version_list=\"5.10.0/${os.platform}-thread-multi-2level 5.10.0 5.8.9 5.8.8\""
+} else {
+    configure.post_args-append "-D inc_version_list=\"5.10.0/${os.platform}-2level 5.10.0 5.8.9 5.8.8\""
+}
+
 configure.ccache	no
 
 universal_variant   no
Index: perl5.8/Portfile
===================================================================
--- perl5.8/Portfile	(revision 57748)
+++ perl5.8/Portfile	(working copy)
@@ -5,7 +5,7 @@
 
 name            perl5.8
 version         5.8.9
-revision        3
+revision        4
 categories      lang
 platforms       darwin freebsd linux
 maintainers     ricci openmaintainer
@@ -59,9 +59,9 @@
 
 # Allow perl to find p5-* port installed by the last version
 if { [variant_isset threads] } {
-    configure.args-append "-D inc_version_list=\"5.8.8 5.8.8/${os.platform}-thread-multi-2level\""
+    configure.args-append "-D inc_version_list=\"5.8.8/${os.platform}-thread-multi-2level 5.8.8\""
 } else {
-    configure.args-append "-D inc_version_list=\"5.8.8 5.8.8/${os.platform}-2level\""
+    configure.args-append "-D inc_version_list=\"5.8.8/${os.platform}-2level 5.8.8\""
 }
 
 set exclude_libs {bind gdbm db}
@@ -78,6 +78,13 @@
 test.run            yes
 
 post-destroot {
+    file delete ${destroot}${prefix}/bin/perl
+    set branch [join [lrange [split ${version} .] 0 1] .]
+    foreach bin [glob ${destroot}${prefix}/bin/*] {
+        if {$bin != "${destroot}${prefix}/bin/perl${version}"} {
+            move ${bin} ${bin}-${branch}
+        }
+    }
     ln -s perl${version} ${destroot}${prefix}/bin/$name
 }
 
