App-Fetchware
view release on metacpan or search on metacpan
6465666768697071727374757677787980818283841.013 2014-09-06 22:01:01-04:00 America/New_York
- Fixed dozens of CPAN Tester FAIL reports. These reports FAILed mostly
beause they were run under a smoker, which is a different environment, then
I test Fetchware under.
- Fixed the upgrade tests actually using the users own fetchware
package
path. Now a temp file is used instead.
smoker configurations.
- Fixed a hilarious bug due to localizations. I used a direct string
comparison where $! was in the string, and I guess under different
locales you can get languages other than english to come from using $!
in a string.
1.012 2014-09-05 21:23:55-04:00 America/New_York
command tests.
experimental.
1.011 2014-09-05 00:59:30-04:00 America/New_York
lib/App/Fetchware.pm view on Meta::CPAN
746174627463746474657466746774687469747074717472747374747475747674777478747974807481This extension mechanism is also very easy
for
Perl programmers, because you're
basically I<subclassing> App::Fetchware, only you
do
it using
L<App::Fetchware::ExportAPI> and L<App::Fetchware::CreateConfigOptions>. See
section L<Implement your fetchware extension.>
for
full details.
=head2 How do I fix the verification failed error.
Fetchware is designed to always attempt to verify the software archives it
downloads even if you failed to configure fetchware's verification settings. It
will try to guess what those setting should be using simple heuristics. First it
will try gpg verificaton, then sha1 verification, and finally md5 verification.
If all fail, then fetchware exit failure with an appropriate error message.
When you get this error message
L<read fetchware's documentation on how to set this up|/4. Add mandatory verification settings>.
=head2 How do I make fetchware log to a file instead of STDOUT?
You can't fetchware does not have any log file support. However, you can simply
redirect STDOUT to a file to make your shell redirect STDOUT to a file for you.
lib/App/Fetchware/Util.pm view on Meta::CPAN
12621263126412651266126712681269127012711272127312741275127612771278127912801281{
# Bareblock just for the $MAGIC_NUMBER.
# Determine $front_magic
my
$front_magic
;
$front_magic
=
int
(
rand
(8128389023));
# For no particular reason convert the random integer into hex, because I
# never store something in decimal and then exact same thing in hex.
$front_magic
=
$front_magic
.
sprintf
(
"%x"
,
$front_magic
);
# Run srand() again to change random number generator between rand() calls.
# Not really necessary, but should make it harder to guess correct magic
# numbers.
srand
(
time
());
# Same a $front_magic.
my
$back_magic
=
int
(
rand
(986487516));
# Octal this time :) for no real reason.
$back_magic
=
$back_magic
.
sprintf
(
"%o"
,
$back_magic
);
my
$MAGIC_NUMBER
=
$front_magic
.
'MAGIC_NUMBER_REPLACING_NEWLINE'
.
$back_magic
;
t/App-Fetchware-verify.t view on Meta::CPAN
194195196197198199200201202203204205206207208209210211212213214};
subtest
'test verify()'
=>
sub
{
skip_all_unless_release_testing();
# test verify_method
# test gpg verify_method
# test sha1 verify_method
# test md5 verify_method
# Specify a DownloadURL to test some gpg_verify() guessing magic.
for
my
$verify_method
(
qw(gpg sha md5)
) {
config_replace(
'verify_method'
,
"$verify_method"
);
eval
{verify(
$download_path
,
$package_path
)};
unless
($@) {
pass(
"checked verify() verify_method $verify_method"
);
}
else
{
fail(
"checked verify() verify_method $verify_method"
);
}
}
( run in 0.779 second using v1.01-cache-2.11-cpan-3cd7ad12f66 )