line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
1
|
|
|
|
|
|
|
# -*- perl -*-
|
2
|
|
|
|
|
|
|
|
3
|
1
|
|
|
1
|
|
616
|
use strict;
|
|
1
|
|
|
|
|
3
|
|
|
1
|
|
|
|
|
34
|
|
4
|
|
|
|
|
|
|
|
5
|
1
|
|
|
1
|
|
1064
|
use Data::Dumper ();
|
|
1
|
|
|
|
|
7891
|
|
|
1
|
|
|
|
|
29
|
|
6
|
1
|
|
|
1
|
|
978
|
use Symbol ();
|
|
1
|
|
|
|
|
1106
|
|
|
1
|
|
|
|
|
247
|
|
7
|
|
|
|
|
|
|
|
8
|
|
|
|
|
|
|
package XML::EP::Install;
|
9
|
|
|
|
|
|
|
|
10
|
|
|
|
|
|
|
$XML::EP::Install::VERSION = '0.01';
|
11
|
|
|
|
|
|
|
|
12
|
|
|
|
|
|
|
sub new {
|
13
|
0
|
|
|
0
|
0
|
|
my $proto = shift;
|
14
|
0
|
0
|
|
|
|
|
my $self = [ (@_ == 1) ? @{shift()} : @_ ];
|
|
0
|
|
|
|
|
|
|
15
|
0
|
|
|
|
|
|
bless($self, "XML::EP::Install");
|
16
|
|
|
|
|
|
|
}
|
17
|
|
|
|
|
|
|
|
18
|
|
|
|
|
|
|
sub Save {
|
19
|
0
|
|
|
0
|
0
|
|
my $self = shift; my $file = shift;
|
|
0
|
|
|
|
|
|
|
20
|
0
|
|
|
|
|
|
my $array = [ @$self ];
|
21
|
0
|
|
|
|
|
|
my $dump = Data::Dumper->new([$array])->Terse(1)->Indent(1)->Dump();
|
22
|
0
|
|
|
|
|
|
my $fh = Symbol::gensym();
|
23
|
0
|
0
|
0
|
|
|
|
(open($fh, ">$file") and
|
|
|
|
0
|
|
|
|
|
24
|
|
|
|
|
|
|
(print $fh "package XML::EP::Config;\n\$XML::EP::Config::config = $dump\n") and
|
25
|
|
|
|
|
|
|
close($fh)) || die "Failed to create config file $file: $!";
|
26
|
|
|
|
|
|
|
}
|