File: Msgfmt.pm

package info (click to toggle)
libpadre-plugin-pdl-perl 0.05-2
  • links: PTS, VCS
  • area: main
  • in suites: jessie, jessie-kfreebsd, wheezy
  • size: 204 kB
  • ctags: 135
  • sloc: perl: 1,604; makefile: 9
file content (39 lines) | stat: -rw-r--r-- 1,003 bytes parent folder | download | duplicates (8)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
#line 1
package Module::Install::Msgfmt;

use 5.008005;
use strict;
use warnings;
use File::Spec            ();
use Module::Install::Base ();

our $VERSION = '0.15';
our @ISA     = 'Module::Install::Base';

sub install_share_with_mofiles {
	my $self      = shift;
	my @orig      = (@_);
	my $class     = ref($self);
	my $prefix    = $self->_top->{prefix};
	my $name      = $self->_top->{name};
	my $dir       = @_ ? pop   : 'share';
	my $type      = @_ ? shift : 'dist';
	my $module    = @_ ? shift : '';
	$self->build_requires( 'Locale::Msgfmt' => '0.15' );
	$self->install_share(@orig);
	my $distname = "";
	if ( $type eq 'dist' ) {
		$distname = $self->name;
	} else {
		$distname = Module::Install::_CLASS($module);
		$distname =~ s/::/-/g;
	}
	my $path = File::Spec->catfile( 'auto', 'share', $type, $distname );
	$self->postamble(<<"END_MAKEFILE");
config ::
\t\$(NOECHO) \$(PERL) "-MLocale::Msgfmt" -e "Locale::Msgfmt::do_msgfmt_for_module_install(q(\$(INST_LIB)), q($path))"

END_MAKEFILE
}

1;