RHEL 6: Don't use OUTPUT => "self", only available in RHEL 7.
authorRichard W.M. Jones <rjones@redhat.com>
Mon, 17 Oct 2016 10:30:17 +0000 (11:30 +0100)
committerRichard W.M. Jones <rjones@redhat.com>
Mon, 17 Oct 2016 10:30:17 +0000 (11:30 +0100)
import-to-ovirt.pl

index 2828172..d9204b4 100755 (executable)
@@ -510,8 +510,9 @@ my %prefix_map = (
 );
 my @forced_ns_decls = keys %prefix_map;
 
+my $ovf = "";
 my $w = XML::Writer->new (
-    OUTPUT => "self",
+    OUTPUT => \$ovf,
     NAMESPACES => 1,
     PREFIX_MAP => \%prefix_map,
     FORCED_NS_DECLS => \@forced_ns_decls,
@@ -782,8 +783,6 @@ $w->endTag ("Content");
 $w->endTag ([$ovf_ns, "Envelope"]);
 $w->end ();
 
-my $ovf = $w->to_string;
-
 #print "OVF:\n$ovf\n";
 
 my $ovf_dir = "$esd_uuid_dir/master/vms/$vm_uuid";