Rosetta::Utility::SQLBuilder::L::en - Localization of Rosetta::Utility::SQLBuilder for English


Rosetta-Utility-SQLBuilder documentation  | view source Contained in the Rosetta-Utility-SQLBuilder distribution.

Index


NAME

Top

Rosetta::Utility::SQLBuilder::L::en - Localization of Rosetta::Utility::SQLBuilder for English

VERSION

Top

This document describes Rosetta::Utility::SQLBuilder::L::en version 0.3.0.

SYNOPSIS

Top

    use Locale::KeyedText;
    use Rosetta::Utility::SQLBuilder;

    # do work ...

    my $translator = Locale::KeyedText->new_translator(
        ['Rosetta::Utility::SQLBuilder::L::', 'Rosetta::Model::L::'], ['en'] );

    # do work ...

    eval {
        # do work with Rosetta::Utility::SQLBuilder, which may throw an exception ...
    };
    if (my $error_message_object = $@) {
        # examine object here if you want and programmatically recover...

        # or otherwise do the next few lines...
        my $error_user_text = $translator->translate_message( $error_message_object );
        # display $error_user_text to user by some appropriate means
    }

    # continue working, which may involve using Rosetta::Utility::SQLBuilder some more ...

DESCRIPTION

Top

The Rosetta::Utility::SQLBuilder::L::en Perl 5 module contains localization data for Rosetta::Utility::SQLBuilder. It is designed to be interpreted by Locale::KeyedText. Besides localizing generic error messages that Rosetta::Utility::SQLBuilder produces itself, this file also provides a ready-made set of generic database error strings that can be thrown by any Rosetta::Utility::SQLBuilder Engine.

This class is optional and you can still use Rosetta::Utility::SQLBuilder effectively without it, especially if you plan to either show users different error messages than this class defines, or not show them anything because you are "handling it".

FUNCTIONS

Top

get_text_by_key( MSG_KEY )

    my $user_text_template = Rosetta::Utility::SQLBuilder::L::en->get_text_by_key( 'foo' );

This function takes a Message Key string in MSG_KEY and returns the associated user text template string, if there is one, or undef if not.

DEPENDENCIES

Top

This module requires any version of Perl 5.x.y that is at least 5.8.1.

It also requires the Perl module version, which would conceptually be built-in to Perl, but isn't, so it is on CPAN instead.

This module has no enforced dependencies on Locale::KeyedText, which is on CPAN, or on Rosetta::Utility::SQLBuilder, which is in the current distribution, but it is designed to be used in conjunction with them.

INCOMPATIBILITIES

Top

None reported.

SEE ALSO

Top

perl(1), Locale::KeyedText, Rosetta::Utility::SQLBuilder.

BUGS AND LIMITATIONS

Top

The structure of this module is trivially simple and has no known bugs.

However, the locale data that this module contains may be subject to large changes in the future; you can determine the likeliness of this by examining the development status and/or BUGS AND LIMITATIONS documentation of the other module that this one is localizing; there tends to be a high correlation in the rate of change between that module and this one.

AUTHOR

Top

Darren R. Duncan (perl@DarrenDuncan.net)

LICENCE AND COPYRIGHT

Top


Rosetta-Utility-SQLBuilder documentation  | view source Contained in the Rosetta-Utility-SQLBuilder distribution.