Changeset 5967 for trunk/Locale-Msgfmt


Ignore:
Timestamp:
07/09/09 02:02:16 (3 years ago)
Author:
ryan52
Message:

fix a mess with Module::Install::Msgfmt :P

Location:
trunk/Locale-Msgfmt
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • trunk/Locale-Msgfmt/Changes

    r5952 r5967  
    11Revision history for Locale-Msgfmt 
     2 
     30.14    Jul 09, 2009 
     4        - fix a mess with Module::Install::Msgfmt :P 
    25 
    360.13    Jul 08, 2009 
  • trunk/Locale-Msgfmt/lib/Locale/Msgfmt.pm

    r5956 r5967  
    1414our @EXPORT = qw/msgfmt/; 
    1515 
    16 our $VERSION = '0.13'; 
     16our $VERSION = '0.14'; 
     17 
     18sub do_msgfmt_for_module_install { 
     19    my $lib       = shift; 
     20    my $sharepath = shift; 
     21    my $fullpath  = File::Spec->catfile( $lib, $sharepath, 'locale' ); 
     22    if ( !-d $fullpath ) { 
     23        die("$fullpath isn't a directory"); 
     24    } 
     25    msgfmt( { in => $fullpath, verbose => 1, remove => 1 } ); 
     26} 
    1727 
    1828sub msgfmt { 
  • trunk/Locale-Msgfmt/lib/Module/Install/Msgfmt.pm

    r5950 r5967  
    1313    my $self      = shift; 
    1414    my $class     = ref($self); 
    15     my $inc_class = join( '::', @{ $self->_top }{qw(prefix name)} ); 
     15    my $prefix    = $self->_top->{prefix}; 
     16    my $name      = $self->_top->{name}; 
    1617    my $dir       = @_ ? pop : 'share'; 
    1718    my $type      = @_ ? shift : 'dist'; 
    1819    my $module    = @_ ? shift : ''; 
    19     $self->build_requires( 'Locale::Msgfmt' => '0.09' ); 
     20    $self->build_requires( 'Locale::Msgfmt' => '0.14' ); 
    2021    install_share(@orig); 
    2122    my $distname = ""; 
     
    3031    $self->postamble(<<"END_MAKEFILE"); 
    3132config :: 
    32 \t\$(NOECHO) \$(PERL) "-M$inc_class" -e "do_msgfmt(q(\$(INST_LIB)), q($path))" 
     33\t\$(NOECHO) \$(PERL) "-MLocale::Msgfmt" -e "Locale::Msgfmt::do_msgfmt_for_module_install(q(\$(INST_LIB)), q($path))" 
    3334 
    3435END_MAKEFILE 
    3536} 
    36  
    37 # blib/lib/auto/share/dist/Padre/locale/he.po 
    38 sub do_msgfmt { 
    39     my $self      = shift; 
    40     my $lib       = shift; 
    41     my $sharepath = shift; 
    42     my $fullpath  = File::Spec->catfile( $lib, $sharepath, 'locale' ); 
    43     if ( !-d $fullpath ) { 
    44         die("$fullpath isn't a directory"); 
    45     } 
    46     require Locale::Msgfmt; 
    47     Locale::Msgfmt::msgfmt( { in => $fullpath, verbose => 1, remove => 1 } ); 
    48 } 
Note: See TracChangeset for help on using the changeset viewer.