IkiWiki::Plugin::syntax::gettext - Fake gettext function


IkiWiki-Plugin-syntax documentation Contained in the IkiWiki-Plugin-syntax distribution.

Index


Code Index:

NAME

Top

IkiWiki::Plugin::syntax::gettext - Fake gettext function

VERSION

Top

This documentation refers to IkiWiki::Plugin::syntax::gettext version 0.1

SYNOPSIS

Top

    package IkiWiki::Plugin::syntax:XXXX;

    use IkiWiki;
	use IkiWiki::Plugin::syntax::gettext;

    ....
        my $text = gettext('Hola');

DESCRIPTION

Top

This module provides a fake gettext function in case of use a IkiWiki old version.

SUBROUTINES/METHODS

Top

gettext( )

This function returns the first parameter received.

BUGS AND LIMITATIONS

Top

There are no known bugs in this module. Please report problems to the author. Patches are welcome.

AUTHOR

Top

Víctor Moral <victor@taquiones.net>

LICENSE AND COPYRIGHT

Top


IkiWiki-Plugin-syntax documentation Contained in the IkiWiki-Plugin-syntax distribution.

package IkiWiki::Plugin::syntax::gettext;
use base qw(Exporter);
use strict;
use warnings;
use Carp;
use utf8;

our $VERSION    =   '0.1';
our @EXPORT     =   qw(gettext);

sub import {
    my  $package    =   (caller) [0];

    # try to export a gettext function into the caller's namespace
    eval "${package}::gettext('')";

    if ($@) {
        __PACKAGE__->export_to_level(1, $package, @EXPORT);
    }
}

sub gettext {
    return shift;
}

1;
__END__