JSAN-Client-0.16 (the programmatic client) has some tweaks to protect
against cache-merging (a bug) when the mirror is changed after a cache
already exists on disk. It now caches in a subdirectory of the
configured cache location, based on an MD5 hash of the URI.
JSAN-Shell-2.00_05 (the user shell) integrates the new Mirror::YAML
which does mirror detection, auto-discovery, and master-recovery based
on a mirror.yml file on the servers.
The result of these changes is that now when you start the jsan2 test
client, it will both check for working access to the internet, and will
discovery, benchmark, and select the closest and fastest non-stale
mirror for you (with some pseudo-randomness to avoid concentrating on
one large mirror).
On a typical broadband connection in Australia (i.e. for me) this takes
about 7 seconds. I can optimise this later (with more aggressive
timeouts and such and smarter selection logic), but for now 7 seconds to
guarantee a current and fast mirror without the need for config files is
worth it.
Adam K
01_compile.t needs a patch under win32. This line is bogus:
my $cmd = "perl $include -c $script 1>/dev/null 2>/dev/null";
must be:
my $NULL = $^O eq 'MSWin32' ? '>NUL 2>NUL' : '>/dev/null 2>/dev/null';
my $cmd = "perl $include -c $script 1 $NULL";
Also see my bug report for TermReadKey
http://rt.cpan.org/Ticket/Display.html?id=24598
After applying these two patches, JSAN-Shell-2.00_05 passes all tests
(except the skipped one -- 99_author.t) under windows.
> On a typical broadband connection in Australia (i.e. for me) this takes
> about 7 seconds.
What can I say? I'm jealous, since my speed is limited to 256K :p
Btw, these two distributions have a lot of dependencies and this makes
them uneasy to install for the average people...
http://rt.cpan.org/Public/Bug/Display.html?id=24633
And there are some problematic distros on JSAN. I noticed one with
a .tgz extension which makes JSAN::Client croak. Also, Mochikit has
css files, which JSAN::Client ignores and skips.
use strict;
use JSAN::Client;
my $client = JSAN::Client->new(
prefix => 'C:/jsan',
verbose => 1,
);
my $iterator = JSAN::Index::Library->retrieve_all;
while( my $lib = $iterator->next ) {
warn "Installing $lib->{name}\n";
$client->install_library( $lib->{name} );
}