Acme-MetaSyntactic

 view release on metacpan or  search on metacpan

Changes  view on Meta::CPAN

Revision history for Acme-MetaSyntactic

1.015 2021-03-30 BOOK
    [ENHANCEMENT]
    - add one transliteration for tr_utf8_basic

1.014 2017-10-30 BOOK
    [ENHANCEMENTS]
    - Restore meta/metafy script installation (ILMARI)
    - Minor encoding patch

1.013 2017-04-17 BOOK
    [ENHANCEMENTS]
    - Test::MetaSyntactic now prints a summary of failed themes at the end of
      the all_themes_ok test suite

lib/Acme/MetaSyntactic/RemoteList.pm  view on Meta::CPAN

    "\x{014c}"     => 'o',
    "\x{014d}"     => 'o',
    "\x{016b}"     => 'u',
    "\xe2\x99\x80" => 'female',
    "\xe2\x99\x82" => 'male',
    "\x{2640}"     => 'female',
    "\x{2642}"     => 'male',
);
my $utf_re = qr/(@{[join( '|', sort keys %utf2asc )]})/; 

sub tr_utf8_basic {
    my $str = shift;
    $str =~ s/$utf_re/$utf2asc{$1}/go;
    return $str;
}

1;

__END__

=head1 NAME

lib/Acme/MetaSyntactic/RemoteList.pm  view on Meta::CPAN

=item tr_nonword( $str )

Return a copy of C<$str> with all non-word characters turned into
underscores (C<_>).

=item tr_accent( $str )

Return a copy of C<$str> will all iso-8859-1 accented characters turned
into basic ASCII characters.

=item tr_utf8_basic( $str )

Return a copy of C<$str> with some of the utf-8 accented characters turned
into basic ASCII characters. This is very crude, but I didn't to bother
and depend on the proper module to do that.

=back

=head1 AUTHOR

Philippe 'BooK' Bruhat, C<< <book@cpan.org> >>.

lib/Test/MetaSyntactic.pm  view on Meta::CPAN

SKIP: {
        if ($why) {
            $tb->skip($why) for 1 .. @metas;
            last SKIP;
        }


        for my $test (@metas) {
            my ( $ams, $theme ) = @$test;

            no warnings 'utf8';
            my $current = [ sort $ams->name(0) ];
            my $remote  = [ sort $ams->remote_list() ];

            if ( !@$remote ) {
                $tb->skip("Fetching remote items for $theme probably failed");
                next;
            }

            # compare both lists
            my %seen;

lib/eta.pm  view on Meta::CPAN

package eta;
use strict;
use Acme::MetaSyntactic;
our @ISA = qw(Acme::MetaSyntactic);
our $VERSION = '1.001';
"holy cow";

__END__

=encoding utf8

=head1 NAME

eta - A shortcut for Acme::MetaSyntactic one-liners

=head1 SYNOPSIS

    $ perl -Meta -E say+metaname
    plugh

t/33locale_territory.t  view on Meta::CPAN

use strict;
use lib 't/lib';
use NoLang;
use Acme::MetaSyntactic;

my %tests = (
    'en'               => ['seventy'],
    'fr_BE.iso-8859-1' => ['septante'],
    'fr_be'            => ['septante'],
    'fr_BE'            => ['septante'],
    'fr_BE_zlonk.utf8' => ['septante'],
    'fr_CH'            => [ 'septante', 'soixante_dix' ],
    'fr_FR.iso-8859-1' => ['soixante_dix'],
    'fr.utf8'          => [ 'septante', 'soixante_dix' ],
    'it_no'            => ['seventy'],
    ''                 => ['seventy'],
);

plan tests => scalar keys %tests;

END {
    for my $t ( sort keys %tests ) {
        $ENV{LANG} = $t;
        my $meta = Acme::MetaSyntactic::test_ams_digits->new();



( run in 1.063 second using v1.01-cache-2.11-cpan-49f99fa48dc )