Skip to content
This repository
Browse code

[November::Cache, November::Storage::File] :e

It's C<$file.IO ~~ :e> nowadays, not C<$file ~~ :e>.
  • Loading branch information...
commit d157b1e59d06df794cae9f4a1a2b72d4889f1588 1 parent 57a5c0e
Carl Mäsak authored November 16, 2010
4  lib/November/Cache.pm
@@ -15,14 +15,14 @@ method set-cache-entry( $key, $value ) {
15 15
 
16 16
 method get-cache-entry( $key ) {
17 17
     my $file = self.cache-dir ~ '/' ~ $key;
18  
-    return Nil unless $file ~~ :e;
  18
+    return Nil unless $file.IO ~~ :e;
19 19
     my $string = slurp( $file );
20 20
     return $string;
21 21
 }
22 22
 
23 23
 method remove-cache-entry( $key ) {
24 24
     my $file = self.cache-dir ~ '/' ~ $key;
25  
-    return unless $file ~~ :e;
  25
+    return unless $file.IO ~~ :e;
26 26
     unlink( $file );
27 27
 }
28 28
 
8  lib/November/Storage/File.pm
@@ -26,11 +26,11 @@ class November::Storage::File is November::Storage {
26 26
     }
27 27
 
28 28
     method wiki_page_exists($page) {
29  
-        return ($.content_path ~ $page) ~~ :e;
  29
+        return ($.content_path ~ $page).IO ~~ :e;
30 30
     }
31 31
 
32 32
     method read_recent_changes {
33  
-        return [] unless $.recent_changes_path ~~ :e;
  33
+        return [] unless $.recent_changes_path.IO ~~ :e;
34 34
         return eval( slurp( $.recent_changes_path ) );
35 35
     }
36 36
 
@@ -42,7 +42,7 @@ class November::Storage::File is November::Storage {
42 42
 
43 43
     method read_page_history($page) {
44 44
         my $file = $.content_path ~ $page;
45  
-        return [] unless $file ~~ :e;
  45
+        return [] unless $file.IO ~~ :e;
46 46
         my $page_history = eval( slurp($file) );
47 47
         return $page_history;
48 48
     }
@@ -56,7 +56,7 @@ class November::Storage::File is November::Storage {
56 56
 
57 57
     method read_modification($modification_id) {
58 58
         my $file = $.modifications_path ~ $modification_id;
59  
-        return [] unless $file ~~ :e;
  59
+        return [] unless $file.IO ~~ :e;
60 60
         return eval( slurp($file) );
61 61
     }
62 62
 

0 notes on commit d157b1e

Please sign in to comment.
Something went wrong with that request. Please try again.