Commits

Shlomi Fish committed 505ccb2

Merge _read_file into TagsTree2XML.

Comments (0)

Files changed (3)

perl/modules/XML-Grammar-Fiction/lib/XML/Grammar/Fiction/FromProto.pm

     return;
 }
 
-sub _read_file
-{
-    my ($self, $filename) = @_;
-
-    open my $in, "<", $filename or
-        confess "Could not open the file \"$filename\" for slurping.";
-    binmode $in, ":utf8";
-    my $contents;
-    {
-        local $/;
-        $contents = <$in>;
-    }
-    close($in);
-
-    return $contents;
-}
-
 sub _write_body
 {
     my $self = shift;

perl/modules/XML-Grammar-Fiction/lib/XML/Grammar/FictionBase/TagsTree2XML.pm

     return;
 }
 
+sub _read_file
+{
+    my ($self, $filename) = @_;
+
+    open my $in, "<", $filename or
+        Carp::confess("Could not open the file \"$filename\" for slurping.");
+    binmode $in, ":utf8";
+    my $contents;
+    {
+        local $/;
+        $contents = <$in>;
+    }
+    close($in);
+
+    return $contents;
+}
+
 sub _calc_tree
 {
     my ($self, $args) = @_;

perl/modules/XML-Grammar-Fiction/lib/XML/Grammar/Screenplay/FromProto.pm

     return;
 }
 
-sub _read_file
-{
-    my ($self, $filename) = @_;
-
-    open my $in, "<", $filename or
-        confess "Could not open the file \"$filename\" for slurping.";
-    binmode $in, ":utf8";
-    my $contents;
-    {
-        local $/;
-        $contents = <$in>;
-    }
-    close($in);
-
-    return $contents;
-}
-
 sub _get_default_xml_ns
 {
     return $screenplay_ns;
Tip: Filter by directory path e.g. /media app.js to search for public/media/app.js.
Tip: Use camelCasing e.g. ProjME to search for ProjectModifiedEvent.java.
Tip: Filter by extension type e.g. /repo .js to search for all .js files in the /repo directory.
Tip: Separate your search with spaces e.g. /ssh pom.xml to search for src/ssh/pom.xml.
Tip: Use ↑ and ↓ arrow keys to navigate and return to view the file.
Tip: You can also navigate files with Ctrl+j (next) and Ctrl+k (previous) and view the file with Ctrl+o.
Tip: You can also navigate files with Alt+j (next) and Alt+k (previous) and view the file with Alt+o.