From: Matt S Trout Date: Wed, 26 Feb 2014 00:32:53 +0000 (+0000) Subject: mostly fix "not" stuff X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?p=scpubgit%2FDKit.git;a=commitdiff_plain;h=6d5315405254a96b847add9e83a642cc9649db69 mostly fix "not" stuff --- diff --git a/lib/DX/Lib/FS.pm b/lib/DX/Lib/FS.pm index 81bc3b7..ece7f62 100644 --- a/lib/DX/Lib/FS.pm +++ b/lib/DX/Lib/FS.pm @@ -61,7 +61,7 @@ our @RULES = ( [ _mode => qw(P M) ] ], [ is_directory => [ 'Path' ], - [ not => [ _is_directory => 'Path' ] ], + [ not => [ [ _is_directory => 'Path' ] ] ], [ act => [ 'Path' ], sub { DX::Lib::FS::Action::CreateDirectory->new( path => $_[0], @@ -70,7 +70,7 @@ our @RULES = ( [ _is_directory => 'Path' ] ], [ is_file => [ 'Path' ], - [ not => [ _is_file => 'Path' ] ], + [ not => [ [ _is_file => 'Path' ] ] ], [ act => [ 'Path' ], sub { DX::Lib::FS::Action::CreateFile->new( path => $_[0], @@ -95,7 +95,7 @@ our @RULES = ( [ mode => [ qw(P M) ], [ path_status_at => qw(PS P) ], - [ not => [ _mode => qw(P M) ] ], + [ not => [ [ _mode => qw(P M) ] ] ], [ act => [ qw(PS M) ], sub { DX::Lib::FS::Action::SetPathMode->new( path_status => $_[0], mode => $_[1] @@ -144,7 +144,7 @@ our @RULES = ( [ does => 'A' => \'DX::Lib::FS::Action::RewriteFile' ] ], [ contains_line => [ qw(P L) ], - [ not => [ _contains_line => qw(P L) ] ], + [ not => [ [ _contains_line => qw(P L) ] ] ], [ file_content_at => qw(FC P) ], [ has_action => qw(FC A) ], [ _action_modifying_fc => 'A' ], @@ -154,7 +154,7 @@ our @RULES = ( [ 'cut' ] ], [ contains_line => [ qw(P L) ], - [ not => [ _contains_line => qw(P L) ] ], + [ not => [ [ _contains_line => qw(P L) ] ] ], [ file_content_at => qw(FC P) ], [ act => [ qw(FC L) ], sub { DX::Lib::FS::Action::RewriteFile->new( @@ -163,7 +163,7 @@ our @RULES = ( } ] ], [ not_contains_line => [ qw(P L) ], - [ not => [ _contains_line => qw(P L) ] ] ], + [ not => [ [ _contains_line => qw(P L) ] ] ] ], [ _arrange_removal_of => [ qw(FC L) ], [ has_action => qw(FC A) ], diff --git a/t/dot_ssh.t b/t/dot_ssh.t index b8cb7ec..6557838 100644 --- a/t/dot_ssh.t +++ b/t/dot_ssh.t @@ -194,7 +194,7 @@ lives_ok { paths_for([ path_status_at => 'PS', \'.ssh' ]) } $path_status{'.ssh/authorized_keys'} = $protos{'.ssh/authorized_keys'}; is( - paths_for([ path_status => 'PS' ], [ not => [ is_directory => 'PS' ] ]), + paths_for([ path_status => 'PS' ], [ not => [ [ is_directory => 'PS' ] ] ]), '.ssh/authorized_keys', 'Negation' ); @@ -229,7 +229,7 @@ is_deeply( $solver->add_rule(@$_) for ( [ is_directory => [ qw(PS) ], - [ not => [ exists_path => 'PS' ] ], + [ not => [ [ exists_path => 'PS' ] ] ], [ act => [ 'PS' ], sub { my ($value) = @_; @@ -288,7 +288,7 @@ $solver->add_rule(@$_) for ( [ catfile => qw(DirPath FileName FilePath) ], [ file_at => qw(FileStatus FilePath) ] ], [ is_file => [ qw(PS) ], - [ not => [ exists_path => 'PS' ] ], + [ not => [ [ exists_path => 'PS' ] ] ], [ act => [ 'PS' ], sub { my ($value) = @_;