Skip to content

Commit

Permalink
[November::Cache, November::Storage::File] :e
Browse files Browse the repository at this point in the history
It's C<$file.IO ~~ :e> nowadays, not C<$file ~~ :e>.
  • Loading branch information
Carl Masak committed Nov 16, 2010
1 parent 57a5c0e commit d157b1e
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 6 deletions.
4 changes: 2 additions & 2 deletions lib/November/Cache.pm
Expand Up @@ -15,14 +15,14 @@ method set-cache-entry( $key, $value ) {

method get-cache-entry( $key ) {
my $file = self.cache-dir ~ '/' ~ $key;
return Nil unless $file ~~ :e;
return Nil unless $file.IO ~~ :e;
my $string = slurp( $file );
return $string;
}

method remove-cache-entry( $key ) {
my $file = self.cache-dir ~ '/' ~ $key;
return unless $file ~~ :e;
return unless $file.IO ~~ :e;
unlink( $file );
}

Expand Down
8 changes: 4 additions & 4 deletions lib/November/Storage/File.pm
Expand Up @@ -26,11 +26,11 @@ class November::Storage::File is November::Storage {
}

method wiki_page_exists($page) {
return ($.content_path ~ $page) ~~ :e;
return ($.content_path ~ $page).IO ~~ :e;
}

method read_recent_changes {
return [] unless $.recent_changes_path ~~ :e;
return [] unless $.recent_changes_path.IO ~~ :e;
return eval( slurp( $.recent_changes_path ) );
}

Expand All @@ -42,7 +42,7 @@ class November::Storage::File is November::Storage {

method read_page_history($page) {
my $file = $.content_path ~ $page;
return [] unless $file ~~ :e;
return [] unless $file.IO ~~ :e;
my $page_history = eval( slurp($file) );
return $page_history;
}
Expand All @@ -56,7 +56,7 @@ class November::Storage::File is November::Storage {

method read_modification($modification_id) {
my $file = $.modifications_path ~ $modification_id;
return [] unless $file ~~ :e;
return [] unless $file.IO ~~ :e;
return eval( slurp($file) );
}

Expand Down

0 comments on commit d157b1e

Please sign in to comment.