1 2require 5; 3use Test; 4BEGIN { plan tests => 6; } 5use Locale::Maketext 1.01; 6print "# Hi there...\n"; 7ok 1; 8 9# declare some classes... 10{ 11 package Woozle; 12 @ISA = ('Locale::Maketext'); 13 sub dubbil { return $_[1] * 2 } 14 sub numerate { return $_[2] . 'en' } 15} 16{ 17 package Woozle::elx; 18 @ISA = ('Woozle'); 19 %Lexicon = ( 20 'd2' => 'hum [dubbil,_1]', 21 'd3' => 'hoo [quant,_1,zaz]', 22 'd4' => 'hoo [*,_1,zaz]', 23 ); 24 keys %Lexicon; # dodges the 'used only once' warning 25} 26 27ok defined( $lh = Woozle->get_handle('elx') ) && ref($lh); 28ok $lh && $lh->maketext('d2', 7), "hum 14" ; 29ok $lh && $lh->maketext('d3', 7), "hoo 7 zazen" ; 30ok $lh && $lh->maketext('d4', 7), "hoo 7 zazen" ; 31 32print "# Byebye!\n"; 33ok 1; 34 35