use Cwd qw[cwd];
use Carp qw[carp];
-use IPC::Cmd qw[can_run run];
+use IPC::Cmd qw[can_run run QUOTE];
use File::Path qw[mkpath];
use Params::Check qw[check];
use Module::Load::Conditional qw[can_load];
$FTP_PASSIVE $TIMEOUT $DEBUG $WARN
];
-use constant QUOTE => do { $^O eq 'MSWin32' ? q["] : q['] };
-
-
-$VERSION = '0.16';
+$VERSION = '0.18';
$VERSION = eval $VERSION; # avoid warnings with development releases
$PREFER_BIN = 0; # XXX TODO implement
$FROM_EMAIL = 'File-Fetch@example.com';
-$USER_AGENT = 'File::Fetch/$VERSION';
+$USER_AGENT = "File::Fetch/$VERSION";
$BLACKLIST = [qw|ftp|];
$METHOD_FAIL = { };
$FTP_PASSIVE = 1;
local $Module::Load::Conditional::VERBOSE = 0;
### see what OS we are on, important for file:// uris ###
-use constant ON_WIN => ($^O eq 'MSWin32');
-use constant ON_VMS => ($^O eq 'VMS');
-use constant ON_UNIX => (!ON_WIN);
-use constant HAS_VOL => (ON_WIN);
-use constant HAS_SHARE => (ON_WIN);
+use constant ON_WIN => ($^O eq 'MSWin32');
+use constant ON_VMS => ($^O eq 'VMS');
+use constant ON_UNIX => (!ON_WIN);
+use constant HAS_VOL => (ON_WIN);
+use constant HAS_SHARE => (ON_WIN);
+
+
=pod
=head1 NAME
##########################
{
- ### template for new() and autogenerated accessors ###
+ ### template for autogenerated accessors ###
my $Tmpl = {
scheme => { default => 'http' },
host => { default => 'localhost' },
) if &File::Fetch::ON_WIN;
+### sanity tests
+{ like( $File::Fetch::USER_AGENT, qr/$File::Fetch::VERSION/,
+ "User agent contains version" );
+ like( $File::Fetch::FROM_EMAIL, qr/@/,
+ q[Email contains '@'] );
+}
+
### parse uri tests ###
for my $entry (@map ) {
my $uri = $entry->{'uri'};