Colloquy-Data
view release on metacpan or search on metacpan
else { plan tests => 3; }
use lib qw(./lib ../lib);
use Colloquy::Data qw(:all);
eval {
for my $file (
qw(users/jane users/john
lists/vent lists/perl lists/girlsonly)
) {
chmod(0644, "data1.4/$file");
}
};
my $data = _data();
cmp_deeply((users("data1.4"))[0], $data->{users}, "users()");
cmp_deeply((lists("data1.4"))[0], $data->{lists}, "lists()");
SKIP: {
skip( "Permissions test skipped for v1.15 or higher because of use of the Safe module",
1)
if $Colloquy::Data::VERSION >= 1.15;
eval {
my $oldW = $^W;
$^W = 0;
chmod(0666, "data1.4/lists/girlsonly");
my ($lists) = lists("data1.4");
$^W = $oldW;
};
ok($@ =~ /insecure/, 'dies properly on insecure permissions');
}
sub _data {
my $return = {
'lists' => {
'perl' => { 'owner' => 'neech',
( run in 0.300 second using v1.01-cache-2.11-cpan-8d75d55dd25 )