METHODS

Constructors

$class->new( OPTIONS )
Option Default

rules

{}

rules => HASH

Attributes

$obj->rules

Returns a HASH to the simplified context maps.

Action

$obj->ctxtFor( MESSAGE, LANG, [CONTEXT] )

Returns a pair of the MSGID stripped from context markup, and the context evaluated into the msgctxt string. The MESSAGE is a Log::Report::Message object. The CONTEXT is the default context for a certain textdomain.

  my ($msgid, $msgctxt) = $context->ctxtFor($msg, $lang, $context);
$obj->expand( MSGID, LANGUAGE, OPTIONS )

Expand the context settings into all possible combinations which need translations in the PO file. This may depend on the LANGUAGE. The MSGID is used in error messages.

$obj->needDecode( SOURCE, STRING|ARRAY|HASH|LIST )
$class->needDecode( SOURCE, STRING|ARRAY|HASH|LIST )

Converts the context settings passed with the MSGID, into a HASH which will be matched to the context providers.