App-MtAws
view release on metacpan or search on metacpan
# so, specifying as '0.092'
'Test::Deep' => '0.092',
# Test::Simple, Test::More, Test::Builder are part of Test-Simple disto, minimum version 0.88 required as it used by Test::Spec
# (and Test::Spec failed to declare minimim version)
'Test::Simple' => '0.88',
'Test::More' => '0.88',
'Test::MockModule' => 0,
'DateTime' => 0,
'Test::Spec' => 0,
'HTTP::Daemon' => '1.36',
$ENV{MT_DEB_BUILD} ? () : ('Test::Tabs' => '0.003'),
# CORE MODULES OR DUAL-LIFE MODULES
'B' => 0, # test that some scalar IV only to save memory
'Data::Dumper' => 0,
'Time::HiRes' => 0,
'open' => 0,
'Scalar::Util' => '1.11',
cycletest.sh
lib/App/MtAws.pm
lib/App/MtAws/ChildWorker.pm
lib/App/MtAws/Command/CheckLocalHash.pm
lib/App/MtAws/Command/DownloadInventory.pm
lib/App/MtAws/Command/ListVaults.pm
lib/App/MtAws/Command/Retrieve.pm
lib/App/MtAws/Command/Sync.pm
lib/App/MtAws/ConfigDefinition.pm
lib/App/MtAws/ConfigEngine.pm
lib/App/MtAws/DateTime.pm
lib/App/MtAws/Exceptions.pm
lib/App/MtAws/FileVersions.pm
lib/App/MtAws/Filter.pm
lib/App/MtAws/ForkEngine.pm
lib/App/MtAws/Glacier/Inventory.pm
lib/App/MtAws/Glacier/Inventory/CSV.pm
lib/App/MtAws/Glacier/Inventory/JSON.pm
lib/App/MtAws/Glacier/ListJobs.pm
lib/App/MtAws/Glacier/ListVaults.pm
lib/App/MtAws/GlacierRequest.pm
"meta-spec" : {
"url" : "http://search.cpan.org/perldoc?CPAN::Meta::Spec",
"version" : "2"
},
"name" : "App-MtAws",
"prereqs" : {
"build" : {
"requires" : {
"B" : "0",
"Data::Dumper" : "0",
"DateTime" : "0",
"HTTP::Daemon" : "1.36",
"Module::Build" : "0.36",
"Scalar::Util" : "1.11",
"TAP::Harness" : "0",
"Test::Deep" : "0.092",
"Test::MockModule" : "0",
"Test::More" : "0.88",
"Test::Simple" : "0.88",
"Test::Spec" : "0",
"Test::Tabs" : "0.003",
"version" : "1.120"
},
"App::MtAws::ConfigDefinition" : {
"file" : "lib/App/MtAws/ConfigDefinition.pm",
"version" : "1.120"
},
"App::MtAws::ConfigEngine" : {
"file" : "lib/App/MtAws/ConfigEngine.pm",
"version" : "1.120"
},
"App::MtAws::DateTime" : {
"file" : "lib/App/MtAws/DateTime.pm",
"version" : "1.120"
},
"App::MtAws::Exceptions" : {
"file" : "lib/App/MtAws/Exceptions.pm",
"version" : "1.120"
},
"App::MtAws::FileVersions" : {
"file" : "lib/App/MtAws/FileVersions.pm",
"version" : "1.120"
},
---
abstract: 'mt-aws/glacier - Perl Multithreaded Multipart sync to Amazon Glacier'
author:
- 'Victor Efimov <vs@vs-dev.com>'
build_requires:
B: 0
Data::Dumper: 0
DateTime: 0
HTTP::Daemon: 1.36
Module::Build: 0.36
Scalar::Util: 1.11
TAP::Harness: 0
Test::Deep: 0.092
Test::MockModule: 0
Test::More: 0.88
Test::Simple: 0.88
Test::Spec: 0
Test::Tabs: 0.003
version: 1.120
App::MtAws::Command::Sync:
file: lib/App/MtAws/Command/Sync.pm
version: 1.120
App::MtAws::ConfigDefinition:
file: lib/App/MtAws/ConfigDefinition.pm
version: 1.120
App::MtAws::ConfigEngine:
file: lib/App/MtAws/ConfigEngine.pm
version: 1.120
App::MtAws::DateTime:
file: lib/App/MtAws/DateTime.pm
version: 1.120
App::MtAws::Exceptions:
file: lib/App/MtAws/Exceptions.pm
version: 1.120
App::MtAws::FileVersions:
file: lib/App/MtAws/FileVersions.pm
version: 1.120
App::MtAws::Filter:
file: lib/App/MtAws/Filter.pm
version: 1.120
lib/App/MtAws/Command/DownloadInventory.pm view on Meta::CPAN
use strict;
use warnings;
use utf8;
use Carp;
use App::MtAws::Utils;
use App::MtAws::ForkEngine qw/with_forks fork_engine/;
use App::MtAws::TreeHash;
use App::MtAws::Exceptions;
use App::MtAws::Journal;
use App::MtAws::MetaData;
use App::MtAws::DateTime;
use App::MtAws::Glacier::Inventory::JSON;
use App::MtAws::Glacier::Inventory::CSV;
use App::MtAws::QueueJob::FetchAndDownloadInventory;
sub run
{
my ($options, $j) = @_;
with_forks 1, $options, sub {
lib/App/MtAws/DateTime.pm view on Meta::CPAN
# (at your option) any later version.
#
# mt-aws-glacier is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program. If not, see <http://www.gnu.org/licenses/>.
package App::MtAws::DateTime;
our $VERSION = '1.120';
use strict;
use warnings;
use utf8;
use POSIX;
use Time::Local;
use App::MtAws::Utils;
lib/App/MtAws/MetaData.pm view on Meta::CPAN
use strict;
use warnings;
use utf8;
use Encode;
use MIME::Base64;
use JSON::XS;
use POSIX;
use Time::Local;
use App::MtAws::DateTime;
use constant MAX_SIZE => 1024;
use constant META_JOB_TYPE_FULL => 'full';
use Exporter 'import';
our @EXPORT = qw/meta_decode meta_job_decode meta_encode meta_job_encode META_JOB_TYPE_FULL/;
=head1 MT-AWS-GLACIER metadata format ('x-amz-archive-description' field).
Function definitions:
t/integration/datetime.t view on Meta::CPAN
use strict;
use warnings;
use utf8;
use Test::More tests => 94;
use Test::Deep;
use FindBin;
use lib map { "$FindBin::RealBin/$_" } qw{../lib ../../lib};
use TestUtils 'w_fatal';
#TODO: rewrite using core Time::Piece ? https://github.com/azumakuniyuki/perl-benchmark-collection/blob/master/module/datetime-vs-time-piece.pl
use App::MtAws::DateTime;
use App::MtAws::Utils;
use Carp;
use Digest::SHA qw/sha256_hex/;
use DateTime;
# test iso8601_to_epoch
{
for (
['20121225T100000Z', 1356429600],
['20130101T000000Z', 1356998400],
['20120229T000000Z', 1330473600],
['20130228T000000Z', 1362009600],
t/integration/datetime.t view on Meta::CPAN
['20081231T235959Z', 1230767999], # before leap second
#['20081231T235960Z', 1230768000], # leap second is broken
['20090101T000000Z', 1230768000], # after leap second
['19070809T082454Z', -1969112106], # negative value
['19070809T084134Z', -1969111106], # negative value
['19700101T000000Z', 0],
) {
my $result = iso8601_to_epoch($_->[0]);
ok($result == $_->[1], 'should parse iso8601');
my $dt = DateTime->from_epoch( epoch => $_->[1] );
my $dt_8601 = sprintf("%04d%02d%02dT%02d%02d%02dZ", $dt->year, $dt->month, $dt->day, $dt->hour, $dt->min, $dt->sec);
ok( $_->[0] eq $dt_8601, "iso8601 $dt_8601 should be correct string");
}
}
# test different formats iso8601_to_epoch
{
for (
['20121225T100000Z', 1356429600],
['20130101t000000Z', 1356998400],
use Config;
# build requirements
use JSON::XS ();
use Test::Deep ();
use Test::Simple ();
use File::Temp ();
use Test::More ();
use Test::MockModule ();
use LWP::UserAgent ();
use DateTime ();
use Test::Spec ();
use MIME::Base64;
# for 5.8.x stock perl
use Digest::SHA ();
# /build requirements
my $testplan = 105;
my $harness = TAP::Harness->new({
formatter_class => 'TAP::Formatter::Console',
( run in 0.329 second using v1.01-cache-2.11-cpan-2b0bae70ee8 )