Xacobeo
view release on metacpan or search on metacpan
inc/MyBuilder.pm view on Meta::CPAN
sub ACTION_build {
my $self = shift;
# Copy the files in share/
foreach my $entry (@{ $self->rscan_dir('share') }) {
# Skip hidden entries or folders
next if $entry =~ m,(^|/)\., or -d $entry;
$self->copy_if_modified(
from => $entry,
to => catfile($self->blib, $entry)
);
}
# Translate the PO files into .mo files
foreach my $entry (@{ $self->rscan_dir('po') }) {
next unless $entry =~ /([a-zA-Z_]+)\.po$/;
my $lang = $1;
inc/MyBuilder.pm view on Meta::CPAN
mkpath($dir);
my $mo_file = catfile($dir, 'xacobeo.mo');
print "Translating $entry -> $mo_file\n";
system('msgfmt', '-o', $mo_file, $entry);
}
# Copy the XS.xs and the typemap file to the lib folder. This way
# Module::Build will handle the compilation and installation of the XS
# library.
foreach my $file ('XS.xs', 'libxml2-perl.typemap') {
$self->copy_if_modified(
from => catfile('xs', $file),
to => catfile('lib', 'Xacobeo', $file),
);
}
# Proceed normally
$self->SUPER::ACTION_build(@_);
}
( run in 2.190 seconds using v1.01-cache-2.11-cpan-39bf76dae61 )