#!/usr/bin/perl ########################################### # perlsnap -- Get the latest bleeding edge perl ########################################### use Net::FTP; use File::Listing; our $VERSION = "1.01"; our $CVSVERSION = '$Revision: 1.3 $'; our $REMOTE_HOST = "ftp.funet.fi"; our $REMOTE_USERID = "anonymous"; our $REMOTE_PASSWD = "perlsnap10\@perlmeister.com"; our $REMOTE_DIR = "/pub/languages/perl/snap/"; $ftp = Net::FTP->new($REMOTE_HOST) or die "Cannot connect to $REMOTE_HOST"; $ftp->login($REMOTE_USERID, $REMOTE_PASSWD) or die "Cannot login"; $ftp->cwd($REMOTE_DIR) or die "Cannot chdir to $REMOTE_DIR"; my $dist = ""; foreach my $entry (File::Listing::parse_dir($ftp->dir())) { my($name, $type, $size, $mtime, $mode) = @$entry; $dist = $name if $name =~ /\.tgz/; } $ftp->binary; print "Downloading $dist ...\n"; $ftp->get("$dist") or die "Cannot get $dist"; print "Done.\n"; $ftp->quit; __END__ =head1 NAME perlsnap - Get the latest P5P bleeding edge perl =head1 DOWNLOAD _SRC_HERE_ =head1 SYNOPSIS perlsnap =head1 DESCRIPTION First a word of caution: Don't use the bleeding edge perl releases unless you're willing to experiment with a potentially highly unstable perl release. They're generally only useful for Perl 5 porters or anyone interested in watching their work. I publishes the latest perl development snapshots on an FTP server in Finland, whenever they're ready. This script will connect to this server, select the latest release and download its compressed tar file. =head1 LEGALESE Copyright 2002 by Mike Schilli, all rights reserved. This program is free software, you can redistribute it and/or modify it under the same terms as Perl itself. =head1 AUTHOR Mike Schilli Em@perlmeister.comE