App-MtAws
view release on metacpan or search on metacpan
### 2013-12-10 v1.102
* Fixed: memory/reasource leak, introduced in v1.100. Usually resulting in crash after uploading ~ 1000 files ( too
many open files error)
* Minor improvements to process termination code
### 2013-12-08 v1.101
* Fixed: CPAN install was failing for non-English locales due to brittle test related to new FSM (introduced in 1.100)
Also error message when reading from file failed in the middle of transfer was wrong for non-English locales.
* Added validation - max allowed by Amazon --partsize is 4096 Mb
* Fixed: --check-max-file-size option validation upper limit was wrong. Was: 40 000 000 Mb; Fixed: 4 096 0000 Mb
### 2013-12-07 v1.100
* Nothing new for end users (I hope so ). Huge internal refactoring of FSM (task queue engine) + unit
tests for all new FSM + integration testing for all mtglacier commands.
### 2013-09-03 v1.051
* Installation instructions reworked
* Alpha testing on Cygwin platform
### 2013-08-31 v1.050
* Optimized Journal memory usage by 12%
* Fixed: system error messages (i.e. ERRNO - like Permission denied etc) where clobbered on non-English locales (i.e.
when message is not ASCII-7bit). Error messages and check-local-hash output were affected.
* CPAN/Cosmetic: testsuite does not produce strings which looks like a warnings anymore.
### 2013-08-27 v1.000
* After one year since first public version released, beta testing now finished and version 1.000 released.
Current project status is non-beta, stable.
* New version scheme: 1.xyz (x - major change or major internal change, y - new version, z - tiny fixes)
Sets the timeout value in seconds, default value is 180 seconds. Request to Amazon Glacier is retried, if if no activity
on the connection to the server is observed for `timeout` seconds. This means that the time it takes for the complete whole
request might be longer.
9. `follow` (only `sync` command)
Follow symbolic links during directory traversal. This option hits performance and increases memory usage. Similar to `find -L`
## Configuring Character Encodings
Autodetection of locale/encodings not implemented yet, but currently there is ability to tune encodings manually.
Below 4 options, that can be used in config file and in command line.
1. `terminal-encoding` - Encoding of your terminal (STDOUT/STDERR for system messages)
2. `filenames-encoding` - Encoding of filenames in filesystem.
Under most *nix filesystems filenames stored as byte sequences, not characters. So in theory application is responsible for managing encodings.
3. `config-encoding` - Encoding of your config file (`glacier.cfg` in examples above)
t/unit/exceptions.t view on Meta::CPAN
# parsing args with errno ERRNO - unit
{
no warnings 'redefine';
local $! = EACCES;
local *App::MtAws::Exceptions::get_errno = sub { "checkme" };
cmp_deeply exception('mycode' => 'MyMessage', 'ERRNO'),
{ MTEXCEPTION => bool(1), message => 'MyMessage', code => 'mycode', errno => "checkme", errno_code => EACCES+0 };
}
# parsing args with errno ERRNO - integration
{
my $expect_errno = get_errno(POSIX::strerror(EACCES)); # real integration test with current locale
local $! = EACCES;
cmp_deeply exception('mycode' => 'MyMessage', 'ERRNO'),
{ MTEXCEPTION => bool(1), message => 'MyMessage', code => 'mycode', errno => $expect_errno, errno_code => EACCES};
cmp_deeply exception('mycode' => 'MyMessage', 'ERRNO', A => 123),
{ MTEXCEPTION => bool(1), message => 'MyMessage', code => 'mycode', errno=> $expect_errno, errno_code => EACCES, A => 123};
cmp_deeply exception('mycode' => 'MyMessage', A => 123, 'ERRNO'),
{ MTEXCEPTION => bool(1), message => 'MyMessage', code => 'mycode', errno => $expect_errno, errno_code => EACCES, A => 123};
cmp_deeply exception('mycode' => 'MyMessage', A => 123, 'ERRNO', B => 456),
t/unit/exceptions.t view on Meta::CPAN
{
for my $err (EACCES, EAGAIN, ENOMEM, EEXIST) {
local $App::MtAws::Exceptions::_errno_encoding = undef;
local $! = $err;
my $res_errno = get_errno($!);
my $enc = $App::MtAws::Exceptions::_errno_encoding;
my $expect = POSIX::strerror($err);
check_localized { # dont use $! inside this block
if ($enc eq App::MtAws::Exceptions::BINARY_ENCODING()) {
is $res_errno, hex_dump_string($expect), "get_errno should work in real with real locales";
} else {
if (utf8::is_utf8($expect)) { # workaround issue https://rt.perl.org/rt3/Ticket/Display.html?id=119499
is $res_errno, $expect, "get_errno should work in real with real locales";
} else {
is $res_errno, decode($enc, $expect), "get_errno should work in real with real locales";
}
}
};
}
}
1;
( run in 0.511 second using v1.01-cache-2.11-cpan-ceb78f64989 )