r73653 - in /branches/upstream/perlbrew/current: ./ bin/ lib/App/ t/
ghedo-guest at users.alioth.debian.org
ghedo-guest at users.alioth.debian.org
Wed Apr 27 18:49:11 UTC 2011
Author: ghedo-guest
Date: Wed Apr 27 18:48:53 2011
New Revision: 73653
URL: http://svn.debian.org/wsvn/pkg-perl/?sc=1&rev=73653
Log:
[svn-upgrade] new version perlbrew (0.19)
Added:
branches/upstream/perlbrew/current/t/03.test_get_available_versions.t
branches/upstream/perlbrew/current/t/04.find_available_perls.t
branches/upstream/perlbrew/current/t/04.test_uniq.t
branches/upstream/perlbrew/current/t/05.get_current_perl.t
Modified:
branches/upstream/perlbrew/current/Changes
branches/upstream/perlbrew/current/LICENSE
branches/upstream/perlbrew/current/MANIFEST
branches/upstream/perlbrew/current/META.yml
branches/upstream/perlbrew/current/Makefile.PL
branches/upstream/perlbrew/current/bin/perlbrew
branches/upstream/perlbrew/current/lib/App/perlbrew.pm
branches/upstream/perlbrew/current/t/02.format_perl_version.t
Modified: branches/upstream/perlbrew/current/Changes
URL: http://svn.debian.org/wsvn/pkg-perl/branches/upstream/perlbrew/current/Changes?rev=73653&op=diff
==============================================================================
--- branches/upstream/perlbrew/current/Changes (original)
+++ branches/upstream/perlbrew/current/Changes Wed Apr 27 18:48:53 2011
@@ -1,3 +1,10 @@
+0.19:
+- Auto run 'perlbrew init' after an install (or upgrade)
+- Symlink dev versions of executables. For example,'perl5.13.11' to 'perl', 'prove5.13.11' to 'prove'.
+- Automatically apply patches necessary to make older perls build again on
+ modern platforms with the help of Devel::PatchPerl.
+- A command "perlbrew available" to list recently available perls to build by trcjr
+
0.18:
- Spotted and fixed by chad.a.davis++, an issue when bash set "noclobber" option,
which breaks the creation of ~/.perlbrew/init. See https://rt.cpan.org/Ticket/Display.html?id=66518
Modified: branches/upstream/perlbrew/current/LICENSE
URL: http://svn.debian.org/wsvn/pkg-perl/branches/upstream/perlbrew/current/LICENSE?rev=73653&op=diff
==============================================================================
--- branches/upstream/perlbrew/current/LICENSE (original)
+++ branches/upstream/perlbrew/current/LICENSE Wed Apr 27 18:48:53 2011
@@ -1,6 +1,6 @@
The MIT License
-Copyright (c) 2010 Kang-mil Liu
+Copyright (c) 2010,2011 Kang-min Liu
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
Modified: branches/upstream/perlbrew/current/MANIFEST
URL: http://svn.debian.org/wsvn/pkg-perl/branches/upstream/perlbrew/current/MANIFEST?rev=73653&op=diff
==============================================================================
--- branches/upstream/perlbrew/current/MANIFEST (original)
+++ branches/upstream/perlbrew/current/MANIFEST Wed Apr 27 18:48:53 2011
@@ -21,3 +21,7 @@
t/01.options.t
t/02.format_perl_version.t
t/03.path_with_tilde.t
+t/03.test_get_available_versions.t
+t/04.find_available_perls.t
+t/04.test_uniq.t
+t/05.get_current_perl.t
Modified: branches/upstream/perlbrew/current/META.yml
URL: http://svn.debian.org/wsvn/pkg-perl/branches/upstream/perlbrew/current/META.yml?rev=73653&op=diff
==============================================================================
--- branches/upstream/perlbrew/current/META.yml (original)
+++ branches/upstream/perlbrew/current/META.yml Wed Apr 27 18:48:53 2011
@@ -4,6 +4,8 @@
- 'Kang-min Liu C<< <gugod at gugod.org> >>'
build_requires:
ExtUtils::MakeMaker: 6.42
+ Test::More: 0
+ Test::Output: 0
Test::Simple: 0
configure_requires:
ExtUtils::MakeMaker: 6.42
@@ -20,8 +22,9 @@
- inc
- t
requires:
+ Devel::PatchPerl: 0.26
perl: 5.8.0
resources:
license: http://opensource.org/licenses/mit-license.php
repository: git://github.com/gugod/App-perlbrew.git
-version: 0.18
+version: 0.19
Modified: branches/upstream/perlbrew/current/Makefile.PL
URL: http://svn.debian.org/wsvn/pkg-perl/branches/upstream/perlbrew/current/Makefile.PL?rev=73653&op=diff
==============================================================================
--- branches/upstream/perlbrew/current/Makefile.PL (original)
+++ branches/upstream/perlbrew/current/Makefile.PL Wed Apr 27 18:48:53 2011
@@ -48,7 +48,11 @@
repository 'git://github.com/gugod/App-perlbrew.git';
+requires 'Devel::PatchPerl' => '0.26';
+
test_requires 'Test::Simple';
+test_requires 'Test::More';
+test_requires 'Test::Output';
install_script 'bin/perlbrew';
Modified: branches/upstream/perlbrew/current/bin/perlbrew
URL: http://svn.debian.org/wsvn/pkg-perl/branches/upstream/perlbrew/current/bin/perlbrew?rev=73653&op=diff
==============================================================================
--- branches/upstream/perlbrew/current/bin/perlbrew (original)
+++ branches/upstream/perlbrew/current/bin/perlbrew Wed Apr 27 18:48:53 2011
@@ -115,6 +115,24 @@
You can also ask for the proper variables for a specific perl version.
+=item B<symlink_executables> <perl-version>
+
+Low-level command. Use this command to create the C<perl> executable
+symbolic link to C<perl5.13.6>.
+
+You don't need to do this unless you were using old perlbrew to
+install perls. The installation layout is changed since version 0.11.
+
+If you just upgraded perlbrew and found C<perlbrew switch> failed to work
+after you switch to a development release of perl, say, perl-5.13.6, run this command:
+
+ perlbrew symlink_executables perl-5.13.6
+
+This essentially creates this symlink:
+
+ ${PERLBREW_ROOT}/perls/perl-5.13.6/bin/perl
+ -> ${PERLBREW_ROOT}/perls/perl-5.13.6/bin/perl5.13.6
+
=item B<install-cpanm>
Install the C<cpanm> standalone executable in C<$PERLBREW_ROOT/bin>.
Modified: branches/upstream/perlbrew/current/lib/App/perlbrew.pm
URL: http://svn.debian.org/wsvn/pkg-perl/branches/upstream/perlbrew/current/lib/App/perlbrew.pm?rev=73653&op=diff
==============================================================================
--- branches/upstream/perlbrew/current/lib/App/perlbrew.pm (original)
+++ branches/upstream/perlbrew/current/lib/App/perlbrew.pm Wed Apr 27 18:48:53 2011
@@ -5,7 +5,7 @@
use Getopt::Long ();
use File::Spec::Functions qw( catfile );
-our $VERSION = "0.18";
+our $VERSION = "0.19";
our $CONF;
my $ROOT = $ENV{PERLBREW_ROOT} || "$ENV{HOME}/perl5/perlbrew";
@@ -20,15 +20,13 @@
source $HOME/.perlbrew/init
fi
-short_option=""
-
__perlbrew_reinit () {
if [[ ! -d $HOME/.perlbrew ]]; then
mkdir -p $HOME/.perlbrew
fi
echo '# DO NOT EDIT THIS FILE' >| $HOME/.perlbrew/init
- command perlbrew $short_option env $1 >> $HOME/.perlbrew/init
+ command perlbrew env $1 >> $HOME/.perlbrew/init
source $HOME/.perlbrew/init
__perlbrew_set_path
}
@@ -43,11 +41,14 @@
perlbrew () {
local exit_status
+ local short_option
export SHELL
if [[ `echo $1 | awk 'BEGIN{FS=""}{print $1}'` = '-' ]]; then
short_option=$1
shift
+ else
+ short_option=""
fi
case $1 in
@@ -305,6 +306,44 @@
Pod::Usage::pod2usage(-verbose => $verbose||0, -exitval => (defined $status ? $status : 1));
}
+sub run_command_available {
+ my ( $self, $dist, $opts ) = @_;
+
+ my @available = $self->get_available_perls(@_);
+ my @installed = $self->installed_perls(@_);
+
+ my $is_installed;
+ for my $available (@available) {
+ $is_installed = 0;
+ for my $installed (@installed) {
+ my $name = $installed->{name};
+ my $cur = $installed->{is_current};
+ if ( $available eq $installed->{name} ) {
+ $is_installed = 1;
+ last;
+ }
+ }
+ print $is_installed ? 'i ' : ' ', $available, "\n";
+ }
+}
+
+sub get_available_perls {
+ my ( $self, $dist, $opts ) = @_;
+
+ my $url = "http://www.cpan.org/src/README.html";
+ my $html = http_get( $url, undef, undef );
+
+ my @available_versions;
+
+ for ( split "\n", $html ) {
+ push @available_versions, $1
+ if m|<td><a href="http://www.cpan.org/src/.+?">(.+?)</a></td>|;
+ }
+ s/\.tar\.gz// for @available_versions;
+
+ return @available_versions;
+}
+
sub run_command_init {
my $self = shift;
my $HOME = $self->env('HOME');
@@ -331,7 +370,7 @@
$shrc = $yourshrc = 'bashrc';
}
- system("$0 env > ${HOME}/.perlbrew/init");
+ system("$0 env @{[ $self->current_perl ]}> ${HOME}/.perlbrew/init");
my $root_dir = $self->path_with_tilde($ROOT);
@@ -340,22 +379,12 @@
$root_dir
-Well-done! Congratulations! Please add the following line to the end
-of your ~/.${yourshrc}
+Paste the following line to the end of your ~/.${yourshrc} and start a
+new shell, perlbrew should be up and fully functional from there:
source $root_dir/etc/${shrc}
-After that, exit this shell, start a new one, and install some fresh
-perls:
-
- perlbrew install perl-5.12.1
- perlbrew install perl-5.10.1
-
-For further instructions, simply run:
-
- perlbrew
-
-The default help messages will popup and tell you what to do!
+For further instructions, simply run `perlbrew` to see de help message.
Enjoy perlbrew at \$HOME!!
INSTRUCTION
@@ -393,13 +422,9 @@
You may trash the downloaded $executable from now on.
-Next, if this is the first time you install perlbrew, run:
-
- $path init
-
-And follow the instruction on screen.
HELP
+ $self->run_command_init();
return;
}
@@ -511,6 +536,7 @@
$extract_command,
"cd $dist_extracted_dir",
"rm -f config.sh Policy.sh",
+ "patchperl",
"sh Configure $configure_flags " .
join( ' ',
( map { qq{'-D$_'} } @d_options ),
@@ -533,6 +559,10 @@
delete $ENV{$_} for qw(PERL5LIB PERL5OPT);
if (!system($cmd)) {
+ unless (-e "$ROOT/perls/$as/bin/perl") {
+ $self->run_command_symlink_executables($as);
+ }
+
print <<SUCCESS;
Installed $dist as $as successfully. Run the following command to switch to it.
@@ -756,7 +786,14 @@
}
sub run_command_symlink_executables {
- ## Ignore it silently for now
+ my($self, $perl) = @_;
+
+ return "" unless $perl;
+
+ for my $executable (<$ROOT/perls/$perl/bin/*>) {
+ my ($name, $version) = $executable =~ m/bin\/(.+?)(5\.\d.*)?$/;
+ system("ln -fs $executable $ROOT/perls/$perl/bin/$name") if $version;
+ }
}
sub run_command_install_cpanm {
@@ -859,6 +896,9 @@
# Pick a preferred CPAN mirror
perlbrew mirror
+
+ # See what is available
+ perlbrew available
# Install some Perls
perlbrew install perl-5.12.2
@@ -981,7 +1021,7 @@
=head1 COPYRIGHT
-Copyright (c) 2010, Kang-min Liu C<< <gugod at gugod.org> >>.
+Copyright (c) 2010, 2011 Kang-min Liu C<< <gugod at gugod.org> >>.
=head1 LICENCE
@@ -995,7 +1035,7 @@
Jesse Leuhrs, Andrew Rodland, Justin Davis, Masayoshi Sekimura,
castaway, jrockway, chromatic, Goro Fuji, Sawyer X, Danijel Tasov,
polettix, tokuhirom, Ãvar Arnfjörð Bjarmason, Pedro Melo,
-Chad A Davis, dagolden.
+Chad A Davis, dagolden, trcjr, rafl.
=head1 DISCLAIMER OF WARRANTY
Modified: branches/upstream/perlbrew/current/t/02.format_perl_version.t
URL: http://svn.debian.org/wsvn/pkg-perl/branches/upstream/perlbrew/current/t/02.format_perl_version.t?rev=73653&op=diff
==============================================================================
--- branches/upstream/perlbrew/current/t/02.format_perl_version.t (original)
+++ branches/upstream/perlbrew/current/t/02.format_perl_version.t Wed Apr 27 18:48:53 2011
@@ -22,12 +22,12 @@
},
);
+plan tests => scalar @test_cases;
{
my $app = App::perlbrew->new();
- TEST:
+ TEST:
foreach my $test (@test_cases) {
is( $app->format_perl_version( $test->{raw} ),
$test->{parsed}, "$test->{raw} -> $test->{parsed}" );
}
- done_testing();
}
Added: branches/upstream/perlbrew/current/t/03.test_get_available_versions.t
URL: http://svn.debian.org/wsvn/pkg-perl/branches/upstream/perlbrew/current/t/03.test_get_available_versions.t?rev=73653&op=file
==============================================================================
--- branches/upstream/perlbrew/current/t/03.test_get_available_versions.t (added)
+++ branches/upstream/perlbrew/current/t/03.test_get_available_versions.t Wed Apr 27 18:48:53 2011
@@ -1,0 +1,485 @@
+#!/usr/bin/env perl
+use strict;
+use warnings;
+use Test::More;
+use App::perlbrew;
+
+{
+ no warnings 'redefine';
+
+ my $html;
+
+ sub App::perlbrew::http_get {
+ return $html if $html;
+
+ local $/ = undef;
+ $html = <DATA>;
+ }
+}
+
+plan tests => 9;
+
+my $app = App::perlbrew->new();
+
+is scalar $app->get_available_perls(), 8, "Correct number of releases found";
+
+my @known_perl_versions = (
+ 'perl-5.13.11', 'perl-5.12.3', 'perl-5.10.1', 'perl-5.8.9',
+ 'perl-5.6.2', 'perl5.005_04', 'perl5.004_05', 'perl5.003_07'
+);
+
+for my $perl_version ( $app->get_available_perls() ) {
+ ok grep( $_ eq $perl_version, @known_perl_versions ), "$perl_version found";
+}
+
+__DATA__
+<!DOCTYPE html>
+<html lang="en">
+<head>
+ <title>Perl Source - www.cpan.org</title>
+ <meta http-equiv="Content-Type" content="text/html;charset=utf-8" /> <link rel="author" href="mailto:cpan+linkrelauthor at perl.org" />
+ <link rel="canonical" href="http://www.cpan.org/src/index.html" />
+ <link type="text/css" rel="stylesheet" href="../misc/css/cpan.css" />
+
+</head>
+<body class="section_source">
+
+<table id="wrapper" border="0" width="95%" cellspacing="0" cellpadding="2" align="center">
+ <tr>
+ <td id="header">
+
+ <div id="header_left">
+ <a href="../index.html"><img src="../misc/images/cpan.png" id="logo" alt="CPAN" /></a>
+ </div>
+
+ <div id="header_right">
+ <h1>Comprehensive Perl Archive Network</h1>
+ <p id="strapline">Stop reinventing wheels, start building space rockets
+
+
+</p>
+ </div>
+ </td>
+ </tr>
+ <tr>
+ <td id="menubar_holder">
+
+ <ul class="menubar">
+ <li><a href="../index.html">Home</a></li>
+ <li><a href="../modules/index.html">Modules</a></li>
+ <li><a href="../ports/index.html">Ports</a></li>
+ <li><a href="../src/README.html">Perl Source</a></li>
+ <li><a href="../misc/cpan-faq.html">FAQ</a></li>
+ <li><a href="../SITES.html">Mirrors</a></li>
+ </ul>
+
+ <div id="searchbar">
+ <form method="get" action="http://search.cpan.org/search" name="f" class="searchbox menubar" id="f">
+ <input type="hidden" name="mode" value="all" />
+ <a href="http://search.cpan.org">Search</a>:
+ <input id="searchfield" type="text" name="query" value="" placeholder="Module name" />
+ <input type="submit" value="Search" />
+ </form>
+ </div>
+ </td>
+ </tr>
+ <tr>
+ <td>
+ <div id="content">
+
+
+
+<h1>Perl Source</h1>
+
+<p>
+ Perl <a href="http://en.wikipedia.org/wiki/Compiler">compiles</a> on over <a href=
+ "http://perldoc.perl.org/perlport.html#PLATFORMS">100 platforms</a>, if you
+ want to install from a binary instead see the <a href=
+ "../ports/index.html">ports</a> page (especially for Windows).
+</p>
+
+
+<h2>
+ How to install from source
+</h2>
+
+
+<pre>
+ wget <a href="http://www.cpan.org/src/perl-5.12.3.tar.gz">http://www.cpan.org/src/perl-5.12.3.tar.gz</a>
+ tar -xzf perl-5.12.3.tar.gz
+ cd perl-5.12.3
+ ./Configure -des -Dprefix=$HOME/localperl
+ make
+ make test
+ make install
+</pre>
+<p>
+ Read both INSTALL and README.<strong>yoursystem</strong> in
+ the <code>perl-5.12.3</code> directory for more detailed information.
+</p>
+
+
+
+
+
+<h2>Latest releases in each branch of Perl</h2>
+
+
+<table class="os_version">
+ <tr class="table_header">
+ <th>Major</th>
+ <th>Version</th>
+ <th>Type</th>
+ <th>Released</th>
+ <th>Download</th>
+ </tr>
+
+
+ <tr >
+ <td>5.13</td>
+ <td>5.13.11
+ <td>Devel</td>
+ <td>2011-03-20</td>
+ <td><a href="http://www.cpan.org/src/perl-5.13.11.tar.gz">perl-5.13.11.tar.gz</a></td>
+ </tr>
+
+
+ <tr class="latest">
+ <td>5.12</td>
+ <td>5.12.3
+ <td>Maint</td>
+ <td>2011-01-22</td>
+ <td><a href="http://www.cpan.org/src/perl-5.12.3.tar.gz">perl-5.12.3.tar.gz</a></td>
+ </tr>
+
+
+ <tr >
+ <td>5.10</td>
+ <td>5.10.1
+ <td>Maint</td>
+ <td>2009-08-23</td>
+ <td><a href="http://www.cpan.org/src/perl-5.10.1.tar.gz">perl-5.10.1.tar.gz</a></td>
+ </tr>
+
+
+ <tr >
+ <td>5.8</td>
+ <td>5.8.9
+ <td>Maint</td>
+ <td>2008-12-14</td>
+ <td><a href="http://www.cpan.org/src/perl-5.8.9.tar.gz">perl-5.8.9.tar.gz</a></td>
+ </tr>
+
+
+ <tr >
+ <td>5.6</td>
+ <td>5.6.2
+ <td>Maint</td>
+ <td>2003-11-15</td>
+ <td><a href="http://www.cpan.org/src/perl-5.6.2.tar.gz">perl-5.6.2.tar.gz</a></td>
+ </tr>
+
+
+ <tr >
+ <td>5.5</td>
+ <td>5.5.4
+ <td>Maint</td>
+ <td>2004-02-23</td>
+ <td><a href="http://www.cpan.org/src/perl5.005_04.tar.gz">perl5.005_04.tar.gz</a></td>
+ </tr>
+
+
+ <tr >
+ <td>5.4</td>
+ <td>5.4.5
+ <td>Maint</td>
+ <td>1999-04-29</td>
+ <td><a href="http://www.cpan.org/src/perl5.004_05.tar.gz">perl5.004_05.tar.gz</a></td>
+ </tr>
+
+
+ <tr >
+ <td>5.3</td>
+ <td>5.3.7
+ <td>Maint</td>
+ <td>1996-10-10</td>
+ <td><a href="http://www.cpan.org/src/perl5.003_07.tar.gz">perl5.003_07.tar.gz</a></td>
+ </tr>
+
+</table>
+
+
+
+
+<p>
+ <a href="http://perldoc.perl.org/perlhist.html">Perl History</a>
+</p>
+<p>
+ If you want to help out developing new releases of Perl visit the <a href=
+ "http://dev.perl.org/perl5/">development site</a> and join the
+ <a href="http://lists.perl.org/list/perl5-porters.html">perl5-porters</a> mailing list.
+</p>
+
+<h2>
+ Version scheme
+</h2>
+<p>
+ Perl has used the following <a href=
+ "http://perldoc.perl.org/perlpolicy.html">policy</a> since the 5.6 release
+ of Perl:
+</p>
+<ul>
+ <li>Maintenance branches (ready for production use) are even numbers (5.8,
+ 5.10, 5.12 etc)
+ </li>
+ <li>Sub-branches of maintenance releases (5.12.1, 5.12.2 etc) are mostly
+ just for bug fixes
+ </li>
+ <li>Development branches are odd numbers (5.9, 5.11, 5.13 etc)
+ </li>
+ <li>RC (release candidates) leading up to a maintenance branch are called
+ testing releases
+ </li>
+</ul>
+<p>
+ Please note that branches earlier than 5.8 are no longer supported, though
+ fixes for urgent issues, for example severe security problems, may
+ still be issued.
+</p>
+<p>
+ Note: please avoid referring to the "symbolic" source releases like
+ "stable" and "latest", or "maint" and "devel". They are still used here but
+ only for backward compatibility. The symbolic names were found to cause
+ more confusion than they are worth because they don't really work with
+ multiple branches, especially not with multiple maintenance branches, and
+ especially the "latest" makes absolutely no sense. The "latest" and
+ "stable" are now just aliases for "maint", and "maint" in turn is the
+ maintenance branch with the largest release number.
+</p>
+
+
+<h2>First release in each branch of Perl</h2>
+
+
+<table class="os_version">
+ <tr class="table_header">
+ <th>Major</th>
+ <th>Version</th>
+ <th>Released</th>
+ </tr>
+
+
+ <tr>
+ <td>5.12</td>
+ <td>5.12.0
+ <td>2010-04-12</td>
+ </tr>
+
+
+ <tr>
+ <td>5.10</td>
+ <td>5.10.0
+ <td>2007-12-18</td>
+ </tr>
+
+
+ <tr>
+ <td>5.8</td>
+ <td>5.8.0
+ <td>2002-07-18</td>
+ </tr>
+
+
+ <tr>
+ <td>5.6</td>
+ <td>5.6.0
+ <td>2000-03-22</td>
+ </tr>
+
+
+ <tr>
+ <td>5.5</td>
+ <td>5.5.0
+ <td>1998-07-22</td>
+ </tr>
+
+
+ <tr>
+ <td>5.4</td>
+ <td>5.4.0
+ <td>1997-05-15</td>
+ </tr>
+
+
+ <tr>
+ <td>5.3</td>
+ <td>5.3.7
+ <td>1996-10-10</td>
+ </tr>
+
+</table>
+
+
+<p></p>
+
+<h2>
+ Other files and directories (mostly for posterity)
+</h2>
+<ul>
+ <li>
+ <a href="5.0/">5.0/</a>
+ <p>
+ Source archives for all releases of perl5. You should only need to
+ look here if you have an application which, for some reason or
+ another, does not run with the current release of perl5. Be aware
+ that only 5.004 and later versions of perl are maintained. If you
+ report a genuine bug in such a version, you will probably be
+ informed either that it is fixed in the current maintenance
+ release, or will be fixed in a subsequent one. If you report a bug
+ in an unmaintained version, you are likely to be advised to upgrade
+ to a maintained version which fixes the bug, or to await a fix in a
+ maintained version. No fix will be provided for the unmaintained
+ version.
+ </p>
+ </li>
+ <li>
+ <p>
+ Perl 6 or Parrot are not yet in CPAN. In the meanwhile, try
+ <a href="http://dev.perl.org/perl6/">here</a> or <a href=
+ "http://www.parrotcode.org/">here</a>.
+ </p>
+ </li>
+ <li>
+ <a href="5.0/jperl">5.0/jperl</a>
+ <p>
+ Path to patch files needed to adapt particular perl releases for
+ use with Japanese character sets.
+ </p>
+ </li>
+ <li>
+ <a href="ENDINGS">ENDINGS</a>
+ <p>
+ Discussion of the meanings of the endings of filenames (.gz, .ZIP
+ and so on). Read this file if you want to know how to handle a
+ source code archive after you've downloaded it.
+ </p>
+ </li>
+ <li>
+ <a href="README">README</a>
+ <p>
+ This file.
+ </p>
+ </li>
+ <li>
+ <a href="misc/">misc/</a>
+ <p>
+ Third-party and other add-on source packages needed in order to
+ build certain perl configurations. You do not need any of this
+ stuff to build a default configuration.
+ </p>
+ </li>
+ <li>perl-5.*.tar.gz, perl-5.*.tar.bz2, perl5_*.tar.gz
+ <p>
+ Source code archives for several recent production releases of
+ perl.
+ </p>
+ </li>
+ <li>
+ <a href="unsupported/">unsupported/</a>
+ <p>
+ This is where we hid the source for perl4, which was superseded by
+ perl5 years ago. We would really much rather that you didn't use
+ it. It is definitely obsolete and has security and other bugs. And,
+ since it's unsupported, it will continue to have them.
+ </p>
+ </li>
+ <li>
+ <a href="5.0/sperl-2000-08-05/">5.0/sperl-2000-08-05</a>
+ <p>
+ Files relevant to the security problem found in 'suidperl' in
+ August 2000, reported in the bugtraq mailing list. The problem was
+ found in all Perl release branches: 5.6, 5.005, and 5.004. The
+ 5.6.1 release has a fix for this, as have the 5.8 releases. The
+ (now obsolete) development branch 5.7 was unaffected, except for
+ very early (pre-5.7.0) developer-only snapshots. The bug affects
+ you only if you use an executable called 'suidperl', not if you use
+ 'perl', and it is very likely only to affect UNIX platforms, and
+ even more precisely, as of March 2001, the only platforms known to
+ be affected are Linux platforms (all of them, <a href=
+ "5.0/sperl-2000-08-05/sperl-2000-08-05.txt">as far as we know</a>).
+ The 'suidperl' is an optional component which is not installed, or
+ even built, by default. These files will help you in the case you
+ compile Perl yourself from the source and you want to close the
+ security hole.
+ </p>
+ </li>
+ <li>
+ <a href="5.0/CA-97.17.sperl">5.0/CA-97.17.sperl</a>
+ </li>
+ <li>
+ <a href="5.0/fixsperl-0">5.0/fixsperl-0</a>
+ </li>
+ <li>
+ <a href="5.0/fixsuid5-0.pat">5.0/fixsuid5-0.pat</a>
+ <p>
+ Files relevant to the CERT Advisory CA-97.17.sperl, a security
+ problem found in 'suidperl' back in 1997. The problem was found
+ both in Perl 4.036 (the final) (and last) release of Perl 4 and in
+ early versions of Perl 5 (pre-5.003). The bug affects you only if
+ you use an executable called 'suidperl', not if you use 'perl', and
+ it is very likely only to affect UNIX platform. The 'suidperl' is
+ an optional component which is not installed, or even built, by
+ default. These files will help you in the (very unlikely) case you
+ need to use (the obsolete and unsupported) Perl 4 or the early Perl
+ 5s, <b>Perl releases newer than Perl 5.003 do not have this
+ security problem.</b>
+ </p>
+ </li>
+</ul>
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ </div>
+ </td>
+ </tr>
+ <tr>
+ <td id="footer">
+ <div id="footer_copyright">
+ <p>Yours Eclectically, The Self-Appointed Master Librarians (<i>OOK!</i>) of the CPAN.<br/>
+ © 1995-2010 Jarkko Hietaniemi.
+ © 2011 <a href="http://www.perl.org">Perl.org</a>.
+ All rights reserved.
+ <a href="../disclaimer.html">Disclaimer</a>.
+ </p>
+ </div>
+
+
+ <div id="footer_mirror">
+ <p>Master mirror hosted by <a href="http://www.yellowbot.com/"><img alt="YellowBot" src="../misc/images/yellowbot.png" /></a></p>
+ </div>
+
+
+
+ </td>
+ </tr>
+</table>
+
+
+</body>
+</html>
Added: branches/upstream/perlbrew/current/t/04.find_available_perls.t
URL: http://svn.debian.org/wsvn/pkg-perl/branches/upstream/perlbrew/current/t/04.find_available_perls.t?rev=73653&op=file
==============================================================================
--- branches/upstream/perlbrew/current/t/04.find_available_perls.t (added)
+++ branches/upstream/perlbrew/current/t/04.find_available_perls.t Wed Apr 27 18:48:53 2011
@@ -1,0 +1,130 @@
+#!/usr/bin/env perl
+use strict;
+use warnings;
+use Test::More;
+use Data::Dumper;
+use App::perlbrew;
+
+plan tests => 52;
+
+my $html = <<HERE;
+<!-- LATEST_RELEASES -->
+<table border="1">
+<tr><th>Release</th><th>File</th><th>Type</th><th>Age</th></tr>
+<tr><td>5.13</td><td>5.13.11</td><td><a href="perl-5.13.11.tar.gz">perl-5.13.11.tar.gz</a>, <a href="perl-5.13.11.tar.bz2">perl-5.13.11.tar.bz2</a></td><td>devel</td><td>14 days</td></tr>
+<tr><td>5.12</td><td>5.12.3</td><td><a href="perl-5.12.3.tar.gz">perl-5.12.3.tar.gz</a>, <a href="perl-5.12.3.tar.bz2">perl-5.12.3.tar.bz2</a></td><td>maint</td><td>2 months, 11 days</td></tr>
+<tr><td>5.10</td><td>5.10.1</td><td><a href="perl-5.10.1.tar.gz">perl-5.10.1.tar.gz</a>, <a href="perl-5.10.1.tar.bz2">perl-5.10.1.tar.bz2</a></td><td>maint</td><td>1 year, 7 months</td></tr>
+<tr><td>5.8</td><td>5.8.9</td><td><a href="perl-5.8.9.tar.gz">perl-5.8.9.tar.gz</a>, <a href="perl-5.8.9.tar.bz2">perl-5.8.9.tar.bz2</a></td><td>maint</td><td>2 years, 3 months</td></tr>
+<tr><td>5.6</td><td>5.6.2</td><td><a href="perl-5.6.2.tar.gz">perl-5.6.2.tar.gz</a></td><td>maint</td><td>7 years, 4 months</td></tr>
+<tr><td>5.5</td><td>5.5.4</td><td><a href="perl5.005_04.tar.gz">perl5.005_04.tar.gz</a></td><td>maint</td><td>7 years, 1 month</td></tr>
+<tr><td>5.4</td><td>5.4.5</td><td><a href="perl5.004_05.tar.gz">perl5.004_05.tar.gz</a></td><td>maint</td><td>11 years, 11 months</td></tr>
+<tr><td>5.3</td><td>5.3.7</td><td><a href="perl5.003_07.tar.gz">perl5.003_07.tar.gz</a></td><td>maint</td><td>14 years, 5 months</td></tr>
+</table>
+
+<p><small>(A year is 365.2425 days and a month is 30.436875 days.)</small></p>
+HERE
+
+my @expected_releases = (
+ {
+ 'file' => 'perl-5.13.11.tar.gz',
+ 'type' => 'devel',
+ 'release' => '5.13.11',
+ 'age' => '14 days',
+ 'branch' => '5.13'
+ },
+ {
+ 'file' => 'perl-5.12.3.tar.gz',
+ 'type' => 'maint',
+ 'release' => '5.12.3',
+ 'age' => '2 months, 11 days',
+ 'branch' => '5.12'
+ },
+ {
+ 'file' => 'perl-5.10.1.tar.gz',
+ 'type' => 'maint',
+ 'release' => '5.10.1',
+ 'age' => '1 year, 7 months',
+ 'branch' => '5.10'
+ },
+ {
+ 'file' => 'perl-5.8.9.tar.gz',
+ 'type' => 'maint',
+ 'release' => '5.8.9',
+ 'age' => '2 years, 3 months',
+ 'branch' => '5.8'
+ },
+ {
+ 'file' => 'perl-5.6.2.tar.gz',
+ 'type' => 'maint',
+ 'release' => '5.6.2',
+ 'age' => '7 years, 4 months',
+ 'branch' => '5.6'
+ },
+ {
+ 'file' => 'perl5.005_04.tar.gz',
+ 'type' => 'maint',
+ 'release' => '5.5.4',
+ 'age' => '7 years, 1 month',
+ 'branch' => '5.5'
+ },
+ {
+ 'file' => 'perl5.004_05.tar.gz',
+ 'type' => 'maint',
+ 'release' => '5.4.5',
+ 'age' => '11 years, 11 months',
+ 'branch' => '5.4'
+ },
+ {
+ 'file' => 'perl5.003_07.tar.gz',
+ 'type' => 'maint',
+ 'release' => '5.3.7',
+ 'age' => '14 years, 5 months',
+ 'branch' => '5.3'
+ },
+ {
+ 'file' => 'perl5.003_07.tar.gz',
+ 'type' => 'maint',
+ 'release' => '5.3.7',
+ 'age' => '14 years, 5 months',
+ 'branch' => '5.3'
+ },
+ {
+ 'file' => 'perl5.003_07.tar.gz',
+ 'type' => 'maint',
+ 'release' => '5.3.7',
+ 'age' => '14 years, 5 months',
+ 'branch' => '5.3'
+ },
+ {
+ 'file' => 'perl5.003_07.tar.gz',
+ 'type' => 'maint',
+ 'release' => '5.3.7',
+ 'age' => '14 years, 5 months',
+ 'branch' => '5.3'
+ }
+);
+my $app = App::perlbrew->new();
+
+my @releases = ();
+for my $line ( split "\n", $html ) {
+ $line =~
+m|<tr><td>(.*)</td><td>(.*)</td><td><a href="(.*?)">.*<td>(.*)</td><td>(.*)</td>|;
+ push @releases,
+ { branch => $1, release => $2, file => $3, type => $4, age => $5 }
+ if ( $1 && $2 && $3 && $4 && $5 );
+}
+
+is @releases => 11, 'found 11 releases';
+is $releases[0]->{branch} => 5.13, '5.13 branch';
+
+#is $releases[0]->{release} => 5.13, '5.13 branch';
+
+TEST:
+for my $i ( 0 .. scalar @releases - 1 - 1 ) {
+ is $releases[$i]->{branch} => $expected_releases[$i]->{branch}, "branch " . $releases[$i]->{branch} . " found";
+ is $releases[$i]->{release} => $expected_releases[$i]->{release}, "release " . $releases[$i]->{release} . " found";
+ is $releases[$i]->{file} => $expected_releases[$i]->{file}, "file " . $releases[$i]->{file} . " found";
+ is $releases[$i]->{type} => $expected_releases[$i]->{type}, "type " . $releases[$i]->{type} . " found";
+ is $releases[$i]->{age} => $expected_releases[$i]->{age}, "age " . $releases[$i]->{age} . " found";
+}
+
Added: branches/upstream/perlbrew/current/t/04.test_uniq.t
URL: http://svn.debian.org/wsvn/pkg-perl/branches/upstream/perlbrew/current/t/04.test_uniq.t?rev=73653&op=file
==============================================================================
--- branches/upstream/perlbrew/current/t/04.test_uniq.t (added)
+++ branches/upstream/perlbrew/current/t/04.test_uniq.t Wed Apr 27 18:48:53 2011
@@ -1,0 +1,18 @@
+#!/usr/bin/env perl
+use strict;
+use warnings;
+use lib qw(lib);
+use English qw( -no_match_vars );
+use Test::More tests => 1;
+
+use App::perlbrew;
+
+my $app = App::perlbrew->new();
+
+my @values = ("a", "a", "b", "c");
+my @uniq_values = ("a", "b", "c");
+
+my @a = $app->uniq(@values);
+my @b = $app->uniq(@uniq_values);
+
+is_deeply \@a, \@b, "Successfully uniquified an array.";
Added: branches/upstream/perlbrew/current/t/05.get_current_perl.t
URL: http://svn.debian.org/wsvn/pkg-perl/branches/upstream/perlbrew/current/t/05.get_current_perl.t?rev=73653&op=file
==============================================================================
--- branches/upstream/perlbrew/current/t/05.get_current_perl.t (added)
+++ branches/upstream/perlbrew/current/t/05.get_current_perl.t Wed Apr 27 18:48:53 2011
@@ -1,0 +1,18 @@
+#!/usr/bin/env perl
+use strict;
+use warnings;
+use lib qw(lib);
+use Test::More tests => 1;
+use App::perlbrew;
+use Test::Output;
+
+my $app = App::perlbrew->new();
+
+stdout_is(
+ sub {
+ $app->run_command('version');
+ },
+ "t/05.get_current_perl.t - App::perlbrew/0.19\n",
+ 'Test version'
+);
+
More information about the Pkg-perl-cvs-commits
mailing list