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;