MooX-Locale-Passthrough-0.001/000755 000765 000024 00000000000 13113553277 016047 5ustar00snostaff000000 000000 MooX-Locale-Passthrough-0.001/Changes000644 000765 000024 00000000172 13113510114 017321 0ustar00snostaff000000 000000 Revision history for Perl module MooX::Locale::Passthrough 0.001 2017-05-31 Initial release to an unsuspecting world MooX-Locale-Passthrough-0.001/lib/000755 000765 000024 00000000000 13113553277 016615 5ustar00snostaff000000 000000 MooX-Locale-Passthrough-0.001/Makefile.PL000644 000765 000024 00000011034 13113316746 020016 0ustar00snostaff000000 000000 use strict; use warnings; use 5.008001; use ExtUtils::MakeMaker; my %RUN_DEPS = ( "Moo" => "1.003", ); my %CONFIGURE_DEPS = ( 'ExtUtils::MakeMaker' => 0, ); my %BUILD_DEPS = (); my %TEST_DEPS = ( 'Test::More' => 0.90, ); WriteMakefile1( MIN_PERL_VERSION => '5.008001', META_ADD => { 'meta-spec' => {version => 2}, resources => { homepage => 'https://metacpan.org/release/MooX-Locale-Passthrough', repository => { url => 'https://github.com:rehsack/MooX-Locale-Passthrough.git', web => 'https://github.com/rehsack/MooX-Locale-Passthrough', type => 'git', }, bugtracker => { web => 'http://rt.cpan.org/Public/Dist/Display.html?Name=MooX-Locale-Passthrough', mailto => 'bug-MooX-Locale-Passthrough@rt.cpan.org', }, license => 'http://dev.perl.org/licenses/', }, prereqs => { develop => { requires => { 'Test::CPAN::Changes' => 0, 'Test::CheckManifest' => 0, 'Module::CPANTS::Analyse' => '0.96', 'Test::Kwalitee' => 0, 'Test::Pod' => 0, 'Test::Pod::Coverage' => 0, 'Test::Pod::Spelling::CommonMistakes' => 0, 'Test::Spelling' => 0, 'Test::Perl::Critic' => 0, 'Test::PerlTidy' => 0, }, }, configure => { requires => {%CONFIGURE_DEPS}, }, build => {requires => {%BUILD_DEPS}}, test => { requires => {%TEST_DEPS}, }, runtime => { requires => { %RUN_DEPS, perl => '5.8.1', } }, }, }, NAME => 'MooX::Locale::Passthrough', VERSION_FROM => 'lib/MooX/Locale/Passthrough.pm', ABSTRACT_FROM => 'lib/MooX/Locale/Passthrough.pm', LICENSE => 'perl', AUTHOR => q{Jens Rehsack }, PREREQ_PM => \%RUN_DEPS, CONFIGURE_REQUIRES => \%CONFIGURE_DEPS, BUILD_REQUIRES => \%BUILD_DEPS, TEST_REQUIRES => \%TEST_DEPS, test => {TESTS => 't/*.t xt/*.t'}, ); sub WriteMakefile1 { # originally written by Alexandr Ciornii, version 0.21. Added by eumm-upgrade. my %params = @_; my $eumm_version = $ExtUtils::MakeMaker::VERSION; $eumm_version = eval $eumm_version; die "EXTRA_META is deprecated" if (exists($params{EXTRA_META})); die "License not specified" if (!exists($params{LICENSE})); $params{TEST_REQUIRES} and $eumm_version < 6.6303 and $params{BUILD_REQUIRES} = {%{$params{BUILD_REQUIRES} || {}}, %{delete $params{TEST_REQUIRES}}}; #EUMM 6.5502 has problems with BUILD_REQUIRES $params{BUILD_REQUIRES} and $eumm_version < 6.5503 and $params{PREREQ_PM} = {%{$params{PREREQ_PM} || {}}, %{delete $params{BUILD_REQUIRES}}}; ref $params{AUTHOR} and "ARRAY" eq ref $params{AUTHOR} and $eumm_version < 6.5702 and $params{AUTHOR} = join(", ", @{$params{AUTHOR}}); delete $params{CONFIGURE_REQUIRES} if ($eumm_version < 6.52); delete $params{MIN_PERL_VERSION} if ($eumm_version < 6.48); delete $params{META_MERGE} if ($eumm_version < 6.46); delete $params{META_ADD}{prereqs} if ($eumm_version < 6.58); delete $params{META_ADD}{'meta-spec'} if ($eumm_version < 6.58); delete $params{META_ADD} if ($eumm_version < 6.46); delete $params{LICENSE} if ($eumm_version < 6.31); delete $params{AUTHOR} if ($] < 5.005); delete $params{ABSTRACT_FROM} if ($] < 5.005); delete $params{BINARY_LOCATION} if ($] < 5.005); # more or less taken from Moose' Makefile.PL if ($params{CONFLICTS}) { my $ok = CheckConflicts(%params); exit(0) if ($params{PREREQ_FATAL} and not $ok); my $cpan_smoker = grep { $_ =~ m/(?:CR_SMOKER|CPAN_REPORTER|AUTOMATED_TESTING)/ } keys %ENV; unless ($cpan_smoker || $ENV{PERL_MM_USE_DEFAULT}) { sleep 4 unless ($ok); } delete $params{CONFLICTS}; } WriteMakefile(%params); } MooX-Locale-Passthrough-0.001/MANIFEST000644 000765 000024 00000000452 13113553277 017201 0ustar00snostaff000000 000000 Changes lib/MooX/Locale/Passthrough.pm Makefile.PL MANIFEST This list of files MANIFEST.SKIP README.md t/00-load.t t/01-rough.t META.yml Module YAML meta-data (added by MakeMaker) META.json Module JSON meta-data (added by MakeMaker) MooX-Locale-Passthrough-0.001/MANIFEST.SKIP000644 000765 000024 00000000512 13113315052 017726 0ustar00snostaff000000 000000 \B\.svn\b \B\.git\b \.gitignore$ \.[Bb][Aa][Kk]$ \.orig$ \.old$ \.tdy$ \.tmp$ \..*swp ^Makefile$ ^Build$ ^Build\.bat$ \.Inline/.* _Inline/.* \.bak$ \.tar$ \.tgz$ \.tar\.gz$ ^mess/ ^tmp/ ^testdata/ ^blib/ ^sandbox/ ^pm_to_blib$ ^cover_db/ ^_build/.* ~$ .*\.planner ^\..* MooX-Locale-Passthrough-.* \bxt ^MYMETA\.json$ ^MYMETA\..*$ MooX-Locale-Passthrough-0.001/META.json000644 000765 000024 00000004027 13113553277 017473 0ustar00snostaff000000 000000 { "abstract" : "provide API used in translator modules without translating", "author" : [ "Jens Rehsack " ], "dynamic_config" : 1, "generated_by" : "ExtUtils::MakeMaker version 7.24, CPAN::Meta::Converter version 2.150010", "license" : [ "perl_5" ], "meta-spec" : { "url" : "http://search.cpan.org/perldoc?CPAN::Meta::Spec", "version" : 2 }, "name" : "MooX-Locale-Passthrough", "no_index" : { "directory" : [ "t", "inc" ] }, "prereqs" : { "build" : { "requires" : {} }, "configure" : { "requires" : { "ExtUtils::MakeMaker" : "0" } }, "develop" : { "requires" : { "Module::CPANTS::Analyse" : "0.96", "Test::CPAN::Changes" : "0", "Test::CheckManifest" : "0", "Test::Kwalitee" : "0", "Test::Perl::Critic" : "0", "Test::PerlTidy" : "0", "Test::Pod" : "0", "Test::Pod::Coverage" : "0", "Test::Pod::Spelling::CommonMistakes" : "0", "Test::Spelling" : "0" } }, "runtime" : { "requires" : { "Moo" : "1.003", "perl" : "v5.8.1" } }, "test" : { "requires" : { "Test::More" : "0.9" } } }, "release_status" : "stable", "resources" : { "bugtracker" : { "mailto" : "bug-MooX-Locale-Passthrough@rt.cpan.org", "web" : "http://rt.cpan.org/Public/Dist/Display.html?Name=MooX-Locale-Passthrough" }, "homepage" : "https://metacpan.org/release/MooX-Locale-Passthrough", "license" : [ "http://dev.perl.org/licenses/" ], "repository" : { "type" : "git", "url" : "https://github.com:rehsack/MooX-Locale-Passthrough.git", "web" : "https://github.com/rehsack/MooX-Locale-Passthrough" } }, "version" : "0.001", "x_serialization_backend" : "JSON::PP version 2.93" } MooX-Locale-Passthrough-0.001/META.yml000644 000765 000024 00000001553 13113553277 017324 0ustar00snostaff000000 000000 --- abstract: 'provide API used in translator modules without translating' author: - 'Jens Rehsack ' build_requires: Test::More: '0.9' configure_requires: ExtUtils::MakeMaker: '0' dynamic_config: 1 generated_by: 'ExtUtils::MakeMaker version 7.24, CPAN::Meta::Converter version 2.150010' license: perl meta-spec: url: http://module-build.sourceforge.net/META-spec-v1.4.html version: '1.4' name: MooX-Locale-Passthrough no_index: directory: - t - inc requires: Moo: '1.003' perl: v5.8.1 resources: bugtracker: http://rt.cpan.org/Public/Dist/Display.html?Name=MooX-Locale-Passthrough homepage: https://metacpan.org/release/MooX-Locale-Passthrough license: http://dev.perl.org/licenses/ repository: https://github.com:rehsack/MooX-Locale-Passthrough.git version: '0.001' x_serialization_backend: 'CPAN::Meta::YAML version 0.018' MooX-Locale-Passthrough-0.001/README.md000644 000765 000024 00000004433 13113317433 017322 0ustar00snostaff000000 000000 # NAME MooX::Locale::Passthrough - provide API used in translator modules without translating # SYNOPSIS { package WonderBar; use Moo; with "MooX::Locale::Passthrough"; sub tell_me { my $self = shift; $self->__("Hello world"); } } WonderBar->new->tell_me; # DESCRIPTION `MooX::Locale::Passthrough` is made to allow CPAN modules use translator API without adding heavy dependencies (external software) or requirements (operating resulting solution). This software is released together with [MooX::Locale::TextDomain::OO](https://metacpan.org/pod/MooX::Locale::TextDomain::OO), which allowes then to plugin any desired translation. # METHODS ## \_\_ MSGID returns MSGID ## \_\_n MSGID, MSGID\_PLURAL, COUNT returns MSGID when count is equal 1, MSGID\_PLURAL otherwise ## \_\_p MSGCTX, MSGID returns MSGID # AUTHOR Jens Rehsack, `` # BUGS Please report any bugs or feature requests to `bug-MooX-Locale-Passthrough at rt.cpan.org`, or through the web interface at [http://rt.cpan.org/NoAuth/ReportBug.html?Queue=MooX-Locale-Passthrough](http://rt.cpan.org/NoAuth/ReportBug.html?Queue=MooX-Locale-Passthrough). I will be notified, and then you'll automatically be notified of progress on your bug as I make changes. # SUPPORT You can find documentation for this module with the perldoc command. perldoc MooX::Locale::Passthrough You can also look for information at: - RT: CPAN's request tracker [http://rt.cpan.org/NoAuth/Bugs.html?Dist=MooX-Locale-Passthrough](http://rt.cpan.org/NoAuth/Bugs.html?Dist=MooX-Locale-Passthrough) - AnnoCPAN: Annotated CPAN documentation [http://annocpan.org/dist/MooX-Locale-Passthrough](http://annocpan.org/dist/MooX-Locale-Passthrough) - CPAN Ratings [http://cpanratings.perl.org/m/MooX-Locale-Passthrough](http://cpanratings.perl.org/m/MooX-Locale-Passthrough) - Search CPAN [http://search.cpan.org/dist/MooX-Locale-Passthrough/](http://search.cpan.org/dist/MooX-Locale-Passthrough/) # LICENSE AND COPYRIGHT Copyright 2017 Jens Rehsack. This program is free software; you can redistribute it and/or modify it under the terms of either: the GNU General Public License as published by the Free Software Foundation; or the Artistic License. See http://dev.perl.org/licenses/ for more information. MooX-Locale-Passthrough-0.001/t/000755 000765 000024 00000000000 13113553277 016312 5ustar00snostaff000000 000000 MooX-Locale-Passthrough-0.001/t/00-load.t000644 000765 000024 00000000424 13113315052 017616 0ustar00snostaff000000 000000 #!perl use 5.008001; use strict; use warnings FATAL => 'all'; use Test::More; use Moo; BEGIN { use_ok('MooX::Locale::Passthrough') || print "Bail out!\n"; } diag("Testing MooX::Locale::Passthrough $MooX::Locale::Passthrough::VERSION, Perl $], $^X"); done_testing(); MooX-Locale-Passthrough-0.001/t/01-rough.t000644 000765 000024 00000001272 13113475563 020044 0ustar00snostaff000000 000000 #!perl use 5.008001; use strict; use warnings FATAL => 'all'; use Test::More; { package # TestMXLP; use Moo; with "MooX::Locale::Passthrough"; sub pure { shift->__("Hello world") } sub mayby_plural { my $self = shift; [$self->__n("Hello world", "Hello universe", 1), $self->__n("Hello world", "Hello universe", 2),]; } sub ctx { shift->__p("Alabama", "Sweet home") } } my $tmxlp = TestMXLP->new(); is $tmxlp->pure, "Hello world", "Pure passed through"; is_deeply $tmxlp->mayby_plural, ["Hello world", "Hello universe"], "Singular and Plural passed through"; is $tmxlp->ctx, "Sweet home", "Ctx msg passed through"; done_testing(); MooX-Locale-Passthrough-0.001/lib/MooX/000755 000765 000024 00000000000 13113553277 017477 5ustar00snostaff000000 000000 MooX-Locale-Passthrough-0.001/lib/MooX/Locale/000755 000765 000024 00000000000 13113553277 020676 5ustar00snostaff000000 000000 MooX-Locale-Passthrough-0.001/lib/MooX/Locale/Passthrough.pm000644 000765 000024 00000004603 13113317267 023543 0ustar00snostaff000000 000000 package MooX::Locale::Passthrough; use strict; use warnings FATAL => 'all'; our $VERSION = "0.001"; use Carp qw/croak/; use Moo::Role; =head1 NAME MooX::Locale::Passthrough - provide API used in translator modules without translating =head1 SYNOPSIS { package WonderBar; use Moo; with "MooX::Locale::Passthrough"; sub tell_me { my $self = shift; $self->__("Hello world"); } } WonderBar->new->tell_me; =head1 DESCRIPTION C is made to allow CPAN modules use translator API without adding heavy dependencies (external software) or requirements (operating resulting solution). This software is released together with L, which allowes then to plugin any desired translation. =head1 METHODS =head2 __ MSGID returns MSGID =cut ## no critic (Subroutines::RequireArgUnpacking) sub __ { $_[1] } =head2 __n MSGID, MSGID_PLURAL, COUNT returns MSGID when count is equal 1, MSGID_PLURAL otherwise =cut sub __n { my (undef, $s, $p, $v) = @_; defined $v and int($v) == 1 and return $s; $p; } =head2 __p MSGCTX, MSGID returns MSGID =cut sub __p { my (undef, $ctx, $m) = @_; $m; } =head1 AUTHOR Jens Rehsack, C<< >> =head1 BUGS Please report any bugs or feature requests to C, or through the web interface at L. I will be notified, and then you'll automatically be notified of progress on your bug as I make changes. =head1 SUPPORT You can find documentation for this module with the perldoc command. perldoc MooX::Locale::Passthrough You can also look for information at: =over 4 =item * RT: CPAN's request tracker L =item * AnnoCPAN: Annotated CPAN documentation L =item * CPAN Ratings L =item * Search CPAN L =back =head1 LICENSE AND COPYRIGHT Copyright 2017 Jens Rehsack. This program is free software; you can redistribute it and/or modify it under the terms of either: the GNU General Public License as published by the Free Software Foundation; or the Artistic License. See http://dev.perl.org/licenses/ for more information. =cut 1;