view release on metacpan or search on metacpan
inc/My/Builder.pm view on Meta::CPAN
view all matches for this distribution
233234235236237238239240241242243return
1
if
$sha1sum
eq
'DO_NOT_CHECK_SHA1'
;
warn
"Checking checksum for '$file'...\n"
;
my
$sha1
= Digest::SHA->new;
my
$fh
;
open
(
$fh
,
$file
) or
die
"###ERROR## Cannot check checksum for '$file'\n"
;
binmode
(
$fh
);
$sha1
->addfile(
$fh
);
close
(
$fh
);
my
$file_sha1sum
=
$sha1
->hexdigest;
my
$rv
= (
$file_sha1sum
eq
$sha1sum
) ? 1 : 0;
warn
"###WARN## sha1 mismatch: got '"
,
$file_sha1sum
,
"'\n"
,
view release on metacpan or search on metacpan
inc/MY/Build.pm view on Meta::CPAN
view all matches for this distribution
73747576777879808182}
# Write it to disk
open
my
$fd
,
'>'
,
$self
->ibapi_archive()
or
die
"\nCannot write to "
.
$self
->ibapi_archive() .
": $!"
;
binmode
(
$fd
);
my
$bytes
=
syswrite
(
$fd
,
$response
->{content} );
die
"\nError writing to "
.
$self
->ibapi_archive() .
": $!"
unless
(
$bytes
==
length
(
$response
->{content} ) );
close
(
$fd
);
view release on metacpan or search on metacpan
xt/author/00-compile.t view on Meta::CPAN
view all matches for this distribution
3536373839404142434445diag(
'Running: '
,
join
(
', '
,
map
{
my
$str
=
$_
;
$str
=~ s/
'/\\'
/g;
q{'}
.
$str
.
q{'}
}
$^X,
@switches
,
'-e'
,
"require q[$lib]"
))
if
$ENV
{PERL_COMPILE_TEST_DEBUG};
my
$pid
= open3(
$stdin
,
'>&STDERR'
,
$stderr
, $^X,
@switches
,
'-e'
,
"require q[$lib]"
);
binmode
$stderr
,
':crlf'
if
$^O eq
'MSWin32'
;
my
@_warnings
= <
$stderr
>;
waitpid
(
$pid
, 0);
is($?, 0,
"$lib loaded ok"
);
shift
@_warnings
if
@_warnings
and
$_warnings
[0] =~ /^Using .*\bblib/
view release on metacpan or search on metacpan
xt/author/00-compile.t view on Meta::CPAN
view all matches for this distribution
3536373839404142434445diag(
'Running: '
,
join
(
', '
,
map
{
my
$str
=
$_
;
$str
=~ s/
'/\\'
/g;
q{'}
.
$str
.
q{'}
}
$^X,
@switches
,
'-e'
,
"require q[$lib]"
))
if
$ENV
{PERL_COMPILE_TEST_DEBUG};
my
$pid
= open3(
$stdin
,
'>&STDERR'
,
$stderr
, $^X,
@switches
,
'-e'
,
"require q[$lib]"
);
binmode
$stderr
,
':crlf'
if
$^O eq
'MSWin32'
;
my
@_warnings
= <
$stderr
>;
waitpid
(
$pid
, 0);
is($?, 0,
"$lib loaded ok"
);
shift
@_warnings
if
@_warnings
and
$_warnings
[0] =~ /^Using .*\bblib/
view release on metacpan or search on metacpan
xt/author/00-compile.t view on Meta::CPAN
view all matches for this distribution
3536373839404142434445diag(
'Running: '
,
join
(
', '
,
map
{
my
$str
=
$_
;
$str
=~ s/
'/\\'
/g;
q{'}
.
$str
.
q{'}
}
$^X,
@switches
,
'-e'
,
"require q[$lib]"
))
if
$ENV
{PERL_COMPILE_TEST_DEBUG};
my
$pid
= open3(
$stdin
,
'>&STDERR'
,
$stderr
, $^X,
@switches
,
'-e'
,
"require q[$lib]"
);
binmode
$stderr
,
':crlf'
if
$^O eq
'MSWin32'
;
my
@_warnings
= <
$stderr
>;
waitpid
(
$pid
, 0);
is($?, 0,
"$lib loaded ok"
);
shift
@_warnings
if
@_warnings
and
$_warnings
[0] =~ /^Using .*\bblib/
view release on metacpan or search on metacpan
xt/author/00-compile.t view on Meta::CPAN
view all matches for this distribution
3536373839404142434445diag(
'Running: '
,
join
(
', '
,
map
{
my
$str
=
$_
;
$str
=~ s/
'/\\'
/g;
q{'}
.
$str
.
q{'}
}
$^X,
@switches
,
'-e'
,
"require q[$lib]"
))
if
$ENV
{PERL_COMPILE_TEST_DEBUG};
my
$pid
= open3(
$stdin
,
'>&STDERR'
,
$stderr
, $^X,
@switches
,
'-e'
,
"require q[$lib]"
);
binmode
$stderr
,
':crlf'
if
$^O eq
'MSWin32'
;
my
@_warnings
= <
$stderr
>;
waitpid
(
$pid
, 0);
is($?, 0,
"$lib loaded ok"
);
shift
@_warnings
if
@_warnings
and
$_warnings
[0] =~ /^Using .*\bblib/
view release on metacpan or search on metacpan
t/compile.t view on Meta::CPAN
view all matches for this distribution
3637383940414243444546{
# see L<perlfaq8/How can I capture STDERR from an external command?>
my
$stderr
= IO::Handle->new;
my
$pid
= open3(
$stdin
,
'>&STDERR'
,
$stderr
, $^X,
$inc_switch
,
'-e'
,
"require q[$lib]"
);
binmode
$stderr
,
':crlf'
if
$^O eq
'MSWin32'
;
my
@_warnings
= <
$stderr
>;
waitpid
(
$pid
, 0);
is($?, 0,
"$lib loaded ok"
);
if
(
@_warnings
)
view release on metacpan or search on metacpan
t/00-compile.t view on Meta::CPAN
view all matches for this distribution
3536373839404142434445diag(
'Running: '
,
join
(
', '
,
map
{
my
$str
=
$_
;
$str
=~ s/
'/\\'
/g;
q{'}
.
$str
.
q{'}
}
$^X,
@switches
,
'-e'
,
"require q[$lib]"
))
if
$ENV
{PERL_COMPILE_TEST_DEBUG};
my
$pid
= open3(
$stdin
,
'>&STDERR'
,
$stderr
, $^X,
@switches
,
'-e'
,
"require q[$lib]"
);
binmode
$stderr
,
':crlf'
if
$^O eq
'MSWin32'
;
my
@_warnings
= <
$stderr
>;
waitpid
(
$pid
, 0);
is($?, 0,
"$lib loaded ok"
);
shift
@_warnings
if
@_warnings
and
$_warnings
[0] =~ /^Using .*\bblib/
view release on metacpan or search on metacpan
t/00-compile.t view on Meta::CPAN
view all matches for this distribution
3536373839404142434445diag(
'Running: '
,
join
(
', '
,
map
{
my
$str
=
$_
;
$str
=~ s/
'/\\'
/g;
q{'}
.
$str
.
q{'}
}
$^X,
@switches
,
'-e'
,
"require q[$lib]"
))
if
$ENV
{PERL_COMPILE_TEST_DEBUG};
my
$pid
= open3(
$stdin
,
'>&STDERR'
,
$stderr
, $^X,
@switches
,
'-e'
,
"require q[$lib]"
);
binmode
$stderr
,
':crlf'
if
$^O eq
'MSWin32'
;
my
@_warnings
= <
$stderr
>;
waitpid
(
$pid
, 0);
is($?, 0,
"$lib loaded ok"
);
shift
@_warnings
if
@_warnings
and
$_warnings
[0] =~ /^Using .*\bblib/
view release on metacpan or search on metacpan
lib/Alien/Libarchive/Installer.pm view on Meta::CPAN
view all matches for this distribution
5354555657585960616263
my
$fn
= File::Spec->catfile(
$dir
,
"libarchive-$version.tar.gz"
);
open
my
$fh
,
'>'
,
$fn
;
binmode
$fh
;
$fh
$response
->{content};
close
$fh
;
wantarray
? (
$fn
,
$version
) :
$fn
;
}
view release on metacpan or search on metacpan
inc/Alien/LZO/Installer.pm view on Meta::CPAN
182183184185186187188189190191192
my
$fn
= _catfile(
$dir
,
"lzo-$version.tar.gz"
);
open
my
$fh
,
'>'
,
$fn
;
binmode
$fh
;
$fh
$response
->{content};
close
$fh
;
wantarray
? (
$fn
,
$version
) :
$fn
;
}
inc/Alien/LZO/Installer.pm view on Meta::CPAN
view all matches for this distribution
451452453454455456457458459460461foreach
my
$object
(
@objects
)
{
my
$fh
;
my
$fn
= _catfile(
$dir
,
$object
);
open
(
$fh
,
'>'
,
$fn
) ||
die
"unable to write $fn $!"
;
binmode
$fh
;
$fh
$ar
->get_content(
$object
)->{data};
close
$fh
;
}
system
'dlltool'
,
'--export-all-symbols'
,
view release on metacpan or search on metacpan
t/author-00-compile.t view on Meta::CPAN
view all matches for this distribution
4344454647484950515253diag(
'Running: '
,
join
(
', '
,
map
{
my
$str
=
$_
;
$str
=~ s/
'/\\'
/g;
q{'}
.
$str
.
q{'}
}
$^X,
@switches
,
'-e'
,
"require q[$lib]"
))
if
$ENV
{PERL_COMPILE_TEST_DEBUG};
my
$pid
= open3(
$stdin
,
'>&STDERR'
,
$stderr
, $^X,
@switches
,
'-e'
,
"require q[$lib]"
);
binmode
$stderr
,
':crlf'
if
$^O eq
'MSWin32'
;
my
@_warnings
= <
$stderr
>;
waitpid
(
$pid
, 0);
is($?, 0,
"$lib loaded ok"
);
shift
@_warnings
if
@_warnings
and
$_warnings
[0] =~ /^Using .*\bblib/
view release on metacpan or search on metacpan
share/download.pl view on Meta::CPAN
view all matches for this distribution
203204205206207208209210211212213
unless
$http_response
->{success};
my
$fh
;
open
(
$fh
,
'>'
,
"$filename.tmp"
)
||
die
"unable to open $filename.tmp $!"
;
binmode
$fh
;
(
$fh
$http_response
->{content})
||
die
"unable to write to $filename.tmp $!"
;
close
(
$fh
)
||
die
"unable to close $filename.tmp $!"
;
rename
(
"$filename.tmp"
=>
$filename
)
view release on metacpan or search on metacpan
xt/author/00-compile.t view on Meta::CPAN
view all matches for this distribution
3536373839404142434445diag(
'Running: '
,
join
(
', '
,
map
{
my
$str
=
$_
;
$str
=~ s/
'/\\'
/g;
q{'}
.
$str
.
q{'}
}
$^X,
@switches
,
'-e'
,
"require q[$lib]"
))
if
$ENV
{PERL_COMPILE_TEST_DEBUG};
my
$pid
= open3(
$stdin
,
'>&STDERR'
,
$stderr
, $^X,
@switches
,
'-e'
,
"require q[$lib]"
);
binmode
$stderr
,
':crlf'
if
$^O eq
'MSWin32'
;
my
@_warnings
= <
$stderr
>;
waitpid
(
$pid
, 0);
is($?, 0,
"$lib loaded ok"
);
shift
@_warnings
if
@_warnings
and
$_warnings
[0] =~ /^Using .*\bblib/
view release on metacpan or search on metacpan
t/00-compile.t view on Meta::CPAN
view all matches for this distribution
3637383940414243444546diag(
'Running: '
,
join
(
', '
,
map
{
my
$str
=
$_
;
$str
=~ s/
'/\\'
/g;
q{'}
.
$str
.
q{'}
}
$^X,
@switches
,
'-e'
,
"require q[$lib]"
))
if
$ENV
{PERL_COMPILE_TEST_DEBUG};
my
$pid
= open3(
$stdin
,
'>&STDERR'
,
$stderr
, $^X,
@switches
,
'-e'
,
"require q[$lib]"
);
binmode
$stderr
,
':crlf'
if
$^O eq
'MSWin32'
;
my
@_warnings
= <
$stderr
>;
waitpid
(
$pid
, 0);
is($?, 0,
"$lib loaded ok"
);
shift
@_warnings
if
@_warnings
and
$_warnings
[0] =~ /^Using .*\bblib/
view release on metacpan or search on metacpan
t/00-compile.t view on Meta::CPAN
view all matches for this distribution
3637383940414243444546diag(
'Running: '
,
join
(
', '
,
map
{
my
$str
=
$_
;
$str
=~ s/
'/\\'
/g;
q{'}
.
$str
.
q{'}
}
$^X,
@switches
,
'-e'
,
"require q[$lib]"
))
if
$ENV
{PERL_COMPILE_TEST_DEBUG};
my
$pid
= open3(
$stdin
,
'>&STDERR'
,
$stderr
, $^X,
@switches
,
'-e'
,
"require q[$lib]"
);
binmode
$stderr
,
':crlf'
if
$^O eq
'MSWin32'
;
my
@_warnings
= <
$stderr
>;
waitpid
(
$pid
, 0);
is($?, 0,
"$lib loaded ok"
);
shift
@_warnings
if
@_warnings
and
$_warnings
[0] =~ /^Using .*\bblib/
view release on metacpan or search on metacpan
xt/author/00-compile.t view on Meta::CPAN
view all matches for this distribution
3536373839404142434445diag(
'Running: '
,
join
(
', '
,
map
{
my
$str
=
$_
;
$str
=~ s/
'/\\'
/g;
q{'}
.
$str
.
q{'}
}
$^X,
@switches
,
'-e'
,
"require q[$lib]"
))
if
$ENV
{PERL_COMPILE_TEST_DEBUG};
my
$pid
= open3(
$stdin
,
'>&STDERR'
,
$stderr
, $^X,
@switches
,
'-e'
,
"require q[$lib]"
);
binmode
$stderr
,
':crlf'
if
$^O eq
'MSWin32'
;
my
@_warnings
= <
$stderr
>;
waitpid
(
$pid
, 0);
is($?, 0,
"$lib loaded ok"
);
shift
@_warnings
if
@_warnings
and
$_warnings
[0] =~ /^Using .*\bblib/
view release on metacpan or search on metacpan
xt/author/00-compile.t view on Meta::CPAN
view all matches for this distribution
3536373839404142434445diag(
'Running: '
,
join
(
', '
,
map
{
my
$str
=
$_
;
$str
=~ s/
'/\\'
/g;
q{'}
.
$str
.
q{'}
}
$^X,
@switches
,
'-e'
,
"require q[$lib]"
))
if
$ENV
{PERL_COMPILE_TEST_DEBUG};
my
$pid
= open3(
$stdin
,
'>&STDERR'
,
$stderr
, $^X,
@switches
,
'-e'
,
"require q[$lib]"
);
binmode
$stderr
,
':crlf'
if
$^O eq
'MSWin32'
;
my
@_warnings
= <
$stderr
>;
waitpid
(
$pid
, 0);
is($?, 0,
"$lib loaded ok"
);
shift
@_warnings
if
@_warnings
and
$_warnings
[0] =~ /^Using .*\bblib/
view release on metacpan or search on metacpan
t/00-compile.t view on Meta::CPAN
view all matches for this distribution
2930313233343536373839{
# see L<perlfaq8/How can I capture STDERR from an external command?>
my
$stderr
= IO::Handle->new;
my
$pid
= open3(
$stdin
,
'>&STDERR'
,
$stderr
, $^X,
$inc_switch
,
'-e'
,
"require q[$lib]"
);
binmode
$stderr
,
':crlf'
if
$^O eq
'MSWin32'
;
my
@_warnings
= <
$stderr
>;
waitpid
(
$pid
, 0);
is($?, 0,
"$lib loaded ok"
);
if
(
@_warnings
)
view release on metacpan or search on metacpan
xt/author/00-compile.t view on Meta::CPAN
view all matches for this distribution
3536373839404142434445diag(
'Running: '
,
join
(
', '
,
map
{
my
$str
=
$_
;
$str
=~ s/
'/\\'
/g;
q{'}
.
$str
.
q{'}
}
$^X,
@switches
,
'-e'
,
"require q[$lib]"
))
if
$ENV
{PERL_COMPILE_TEST_DEBUG};
my
$pid
= open3(
$stdin
,
'>&STDERR'
,
$stderr
, $^X,
@switches
,
'-e'
,
"require q[$lib]"
);
binmode
$stderr
,
':crlf'
if
$^O eq
'MSWin32'
;
my
@_warnings
= <
$stderr
>;
waitpid
(
$pid
, 0);
is($?, 0,
"$lib loaded ok"
);
shift
@_warnings
if
@_warnings
and
$_warnings
[0] =~ /^Using .*\bblib/
view release on metacpan or search on metacpan
xt/author/00-compile.t view on Meta::CPAN
view all matches for this distribution
3536373839404142434445diag(
'Running: '
,
join
(
', '
,
map
{
my
$str
=
$_
;
$str
=~ s/
'/\\'
/g;
q{'}
.
$str
.
q{'}
}
$^X,
@switches
,
'-e'
,
"require q[$lib]"
))
if
$ENV
{PERL_COMPILE_TEST_DEBUG};
my
$pid
= open3(
$stdin
,
'>&STDERR'
,
$stderr
, $^X,
@switches
,
'-e'
,
"require q[$lib]"
);
binmode
$stderr
,
':crlf'
if
$^O eq
'MSWin32'
;
my
@_warnings
= <
$stderr
>;
waitpid
(
$pid
, 0);
is($?, 0,
"$lib loaded ok"
);
shift
@_warnings
if
@_warnings
and
$_warnings
[0] =~ /^Using .*\bblib/
view release on metacpan or search on metacpan
t/00-compile.t view on Meta::CPAN
view all matches for this distribution
3536373839404142434445diag(
'Running: '
,
join
(
', '
,
map
{
my
$str
=
$_
;
$str
=~ s/
'/\\'
/g;
q{'}
.
$str
.
q{'}
}
$^X,
@switches
,
'-e'
,
"require q[$lib]"
))
if
$ENV
{PERL_COMPILE_TEST_DEBUG};
my
$pid
= open3(
$stdin
,
'>&STDERR'
,
$stderr
, $^X,
@switches
,
'-e'
,
"require q[$lib]"
);
binmode
$stderr
,
':crlf'
if
$^O eq
'MSWin32'
;
my
@_warnings
= <
$stderr
>;
waitpid
(
$pid
, 0);
is($?, 0,
"$lib loaded ok"
);
shift
@_warnings
if
@_warnings
and
$_warnings
[0] =~ /^Using .*\bblib/
view release on metacpan or search on metacpan
inc/My/Builder.pm view on Meta::CPAN
view all matches for this distribution
326327328329330331332333334335sub
check_sha1sum {
my
(
$self
,
$file
,
$sha1sum
) =
@_
;
my
$sha1
= Digest::SHA->new;
my
$fh
;
open
(
$fh
,
$file
) or
die
"###ERROR## Cannot check checksum for '$file'\n"
;
binmode
(
$fh
);
$sha1
->addfile(
$fh
);
close
(
$fh
);
return
(
$sha1
->hexdigest eq
$sha1sum
) ? 1 : 0
}
view release on metacpan or search on metacpan
xt/author/00-compile.t view on Meta::CPAN
view all matches for this distribution
3536373839404142434445diag(
'Running: '
,
join
(
', '
,
map
{
my
$str
=
$_
;
$str
=~ s/
'/\\'
/g;
q{'}
.
$str
.
q{'}
}
$^X,
@switches
,
'-e'
,
"require q[$lib]"
))
if
$ENV
{PERL_COMPILE_TEST_DEBUG};
my
$pid
= open3(
$stdin
,
'>&STDERR'
,
$stderr
, $^X,
@switches
,
'-e'
,
"require q[$lib]"
);
binmode
$stderr
,
':crlf'
if
$^O eq
'MSWin32'
;
my
@_warnings
= <
$stderr
>;
waitpid
(
$pid
, 0);
is($?, 0,
"$lib loaded ok"
);
shift
@_warnings
if
@_warnings
and
$_warnings
[0] =~ /^Using .*\bblib/
view release on metacpan or search on metacpan
t/00-compile.t view on Meta::CPAN
view all matches for this distribution
3637383940414243444546diag(
'Running: '
,
join
(
', '
,
map
{
my
$str
=
$_
;
$str
=~ s/
'/\\'
/g;
q{'}
.
$str
.
q{'}
}
$^X,
@switches
,
'-e'
,
"require q[$lib]"
))
if
$ENV
{PERL_COMPILE_TEST_DEBUG};
my
$pid
= open3(
$stdin
,
'>&STDERR'
,
$stderr
, $^X,
@switches
,
'-e'
,
"require q[$lib]"
);
binmode
$stderr
,
':crlf'
if
$^O eq
'MSWin32'
;
my
@_warnings
= <
$stderr
>;
waitpid
(
$pid
, 0);
is($?, 0,
"$lib loaded ok"
);
shift
@_warnings
if
@_warnings
and
$_warnings
[0] =~ /^Using .*\bblib/
view release on metacpan or search on metacpan
inc/inc_File-Fetch/File/Fetch.pm view on Meta::CPAN
673674675676677678679680681682
"Could not open '%1' for writing: %2"
,
$to
,$!));
}
$fh
->autoflush(1);
binmode
$fh
;
my
$rc
=
$http
->request(
$uri
,
sub
{
my
(
$self
,
$dref
,
$cbargs
) =
@_
;
local
$\;
{
$cbargs
}
$$dref
},
$fh
);
close
$fh
;
inc/inc_File-Fetch/File/Fetch.pm view on Meta::CPAN
view all matches for this distribution
748749750751752753754755756757
return
$self
->_error(loc(
"Could not open '%1' for writing: %2"
,
$to
,$!));
}
$fh
->autoflush(1);
binmode
$fh
;
my
$path
= File::Spec::Unix->catfile(
$self
->path,
$self
->file );
my
$req
=
"GET $path HTTP/1.0\x0d\x0aHost: "
.
$self
->host .
"\x0d\x0a\x0d\x0a"
;
$sock
->
send
(
$req
);
view release on metacpan or search on metacpan
xt/author/00-compile.t view on Meta::CPAN
view all matches for this distribution
3536373839404142434445diag(
'Running: '
,
join
(
', '
,
map
{
my
$str
=
$_
;
$str
=~ s/
'/\\'
/g;
q{'}
.
$str
.
q{'}
}
$^X,
@switches
,
'-e'
,
"require q[$lib]"
))
if
$ENV
{PERL_COMPILE_TEST_DEBUG};
my
$pid
= open3(
$stdin
,
'>&STDERR'
,
$stderr
, $^X,
@switches
,
'-e'
,
"require q[$lib]"
);
binmode
$stderr
,
':crlf'
if
$^O eq
'MSWin32'
;
my
@_warnings
= <
$stderr
>;
waitpid
(
$pid
, 0);
is($?, 0,
"$lib loaded ok"
);
shift
@_warnings
if
@_warnings
and
$_warnings
[0] =~ /^Using .*\bblib/
view release on metacpan or search on metacpan
xt/author/00-compile.t view on Meta::CPAN
view all matches for this distribution
3536373839404142434445diag(
'Running: '
,
join
(
', '
,
map
{
my
$str
=
$_
;
$str
=~ s/
'/\\'
/g;
q{'}
.
$str
.
q{'}
}
$^X,
@switches
,
'-e'
,
"require q[$lib]"
))
if
$ENV
{PERL_COMPILE_TEST_DEBUG};
my
$pid
= open3(
$stdin
,
'>&STDERR'
,
$stderr
, $^X,
@switches
,
'-e'
,
"require q[$lib]"
);
binmode
$stderr
,
':crlf'
if
$^O eq
'MSWin32'
;
my
@_warnings
= <
$stderr
>;
waitpid
(
$pid
, 0);
is($?, 0,
"$lib loaded ok"
);
shift
@_warnings
if
@_warnings
and
$_warnings
[0] =~ /^Using .*\bblib/
view release on metacpan or search on metacpan
inc/My/Builder.pm view on Meta::CPAN
view all matches for this distribution
419420421422423424425426427428429sub
check_sha1sum {
my
(
$self
,
$file
,
$sha1sum
) =
@_
;
my
$sha1
= Digest::SHA->new;
my
$fh
;
open
(
$fh
,
$file
) or
die
"###ERROR## Cannot check checksum for '$file'\n"
;
binmode
(
$fh
);
$sha1
->addfile(
$fh
);
close
(
$fh
);
my
$_sha1sum
=
$sha1
->hexdigest;
warn
"###WARN## checksum for file $file is $_sha1sum but we expect $sha1sum\n"
if
$_sha1sum
ne
$sha1sum
;
return
(
$_sha1sum
eq
$sha1sum
) ? 1 : 0
view release on metacpan or search on metacpan
inc/My/Builder.pm view on Meta::CPAN
view all matches for this distribution
393394395396397398399400401402403sub
check_sha1sum {
my
(
$self
,
$file
,
$sha1sum
) =
@_
;
my
$sha1
= Digest::SHA->new;
my
$fh
;
open
(
$fh
,
$file
) or
die
"###ERROR## Cannot check checksum for '$file'\n"
;
binmode
(
$fh
);
$sha1
->addfile(
$fh
);
close
(
$fh
);
my
$_sha1sum
=
$sha1
->hexdigest;
warn
"###WARN## checksum for file $file is $_sha1sum but we expect $sha1sum\n"
if
$_sha1sum
ne
$sha1sum
;
return
(
$_sha1sum
eq
$sha1sum
) ? 1 : 0