| 1 | package Module::Build::Custom; | ||
| 2 | 1 | ▶ | use Module::Build; |
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||
| 3 | 1 | our @ISA = qw(Module::Build); | |
| 4 | |||
| 5 | sub ACTION_install { | ||
| 6 | 0 | ▶ | my $self = shift; |
|
Subroutine
ACTION_install: not called CC=1 SCAR=6.9
Pod
undocumented
| |||
| 7 | 0 | $self->SUPER::ACTION_install; | |
| 8 | # warn "\nDon't forget to set the variables CONFIG_DIR and LOCALE_DIR in the configuration file bioyatea.rc to the right path if necessary.\n\n"; | ||
| 9 | } | ||
| 10 | |||
| 11 | sub ACTION_fakeinstall { | ||
| 12 | 0 | ▶ | my $self = shift; |
|
Subroutine
ACTION_fakeinstall: not called CC=1 SCAR=6.9
Pod
undocumented
| |||
| 13 | 0 | $self->SUPER::ACTION_fakeinstall; | |
| 14 | |||
| 15 | # warn "\nDon't forget to set the variables CONFIG_DIR and LOCALE_DIR in the configuration file bioyatea.rc to the right path if necessary.\n\n"; | ||
| 16 | } | ||
| 17 | |||
| 18 | sub ACTION_build { | ||
| 19 | 0 | ▶ | my $self = shift; |
|
Subroutine
ACTION_build: not called CC=1 SCAR=6.9
Pod
undocumented
| |||
| 20 | |||
| 21 | 0 | require Config::General; | |
| 22 | |||
| 23 | # warn "Setting configuration variables in etc/bioyatea/bioyatea.rc\n"; | ||
| 24 | # my $rcfile = $self->base_dir() . "/etc/bioyatea/bioyatea.rc"; | ||
| 25 | # # warn "RCFILE: $rcfile\n"; | ||
| 26 | # chmod(0644, $rcfile); | ||
| 27 | # if (!( -f "$rcfile.orig") ) { | ||
| 28 | # File::Copy::copy($rcfile, "$rcfile.orig"); | ||
| 29 | # } | ||
| 30 | |||
| 31 | # my $conf = new Config::General('-ConfigFile' => $rcfile . ".orig", | ||
| 32 | # '-InterPolateVars' => 0, | ||
| 33 | # '-InterPolateEnv' => 0, | ||
| 34 | # '-StoreDelimiter' => " = ", | ||
| 35 | # ); | ||
| 36 | # my %config = $conf->getall; | ||
| 37 | # # warn "SHARE: " . $self->install_destination("share") . "\n"; | ||
| 38 | # $config{'DefaultConfig'}->{'CONFIG_DIR'} = $self->install_destination("share") . "/BioYaTeA/config"; | ||
| 39 | # $config{'DefaultConfig'}->{'LOCALE_DIR'} = $self->install_destination("share") . "/BioYaTeA/locale"; | ||
| 40 | |||
| 41 | # # warn $config{'DefaultConfig'}->{'CONFIG_DIR'} . "\n"; | ||
| 42 | |||
| 43 | # $conf->save_file($rcfile,\%config); | ||
| 44 | # warn "Done\n"; | ||
| 45 | |||
| 46 | # warn "Setting the default location of bioyatea.rc in lib/Lingua/BioYaTeA.pm\n"; | ||
| 47 | # my $mainpmfile = $self->base_dir() . "/lib/Lingua/BioYaTeA.pm"; | ||
| 48 | |||
| 49 | # require File::Copy; | ||
| 50 | |||
| 51 | # my $n = FileHandle->new($mainpmfile,"r"); | ||
| 52 | # # File::Copy->cp($n,"$mainpmfile.orig"); | ||
| 53 | |||
| 54 | # chmod(0644, $mainpmfile); | ||
| 55 | # if (!( -f "$mainpmfile.orig") ) { | ||
| 56 | # File::Copy::copy($mainpmfile, "$mainpmfile.orig"); | ||
| 57 | # } | ||
| 58 | # my $line; | ||
| 59 | # open MAINPMFILE, "$mainpmfile.orig" or die "No such file ($mainpmfile.orig)\n"; | ||
| 60 | # open MAINPMFILEDEST, ">$mainpmfile" or die "Can not open file $mainpmfile\n"; | ||
| 61 | # while($line = <MAINPMFILE>) { | ||
| 62 | # if ($line =~ /^(\s\$rcfile\s=\s\")\/etc\/bioyatea\/bioyatea.rc(\".*\n)/) { | ||
| 63 | # $line = $1 . $self->install_destination("conf") . "/bioyatea/bioyatea.rc" . $2; | ||
| 64 | # } | ||
| 65 | # print MAINPMFILEDEST $line; | ||
| 66 | # } | ||
| 67 | # close MAINPMFILE; | ||
| 68 | # close MAINPMFILEDEST; | ||
| 69 | # warn "Done\n"; | ||
| 70 | |||
| 71 | 0 | $self->SUPER::ACTION_build; | |
| 72 | } | ||
| 73 | |||
| 74 | sub ACTION_clean { | ||
| 75 | 0 | ▶ | my $self = shift; |
|
Subroutine
ACTION_clean: not called CC=1 SCAR=6.9
Pod
undocumented
| |||
| 76 | 0 | $self->SUPER::ACTION_clean; | |
| 77 | |||
| 78 | # require File::Copy; | ||
| 79 | # my $mainpmfile = $self->base_dir() . "/lib/Lingua/BioYaTeA.pm"; | ||
| 80 | # File::Copy::move("$mainpmfile.orig", $mainpmfile); | ||
| 81 | |||
| 82 | # my $rcfile = $self->base_dir() . "/etc/bioyatea/bioyatea.rc"; | ||
| 83 | # File::Copy::move("$rcfile.orig", $rcfile); | ||
| 84 | } | ||
| 85 | |||
| 86 | |||
| 87 | 1 | 1; | |