Group
Extension

Matches 5

Apache2-Translation ( O/OP/OPI/Apache2-Translation-0.34.tar.gz, OPI, 2011; MetaCPAN )
Apache2-Translation/lib/Apache2/Translation/_base.pm ( view source; MetaCPAN )
o, don't rely on the
      # existence of these modules.
      die "Please install JSON::XS" unless eval "require JSON::XS";
      die "Please install Algorithm::Diff"
	unless eval "require Algorithm:
r; my $el=$it->(); ) {
	$#{$el}=nNOTE;		# drop ID
	$el->[nBLOCK]+=0;	# convert to numbers because JSON::XS
	$el->[nORDER]+=0;	# shows 0 as 0 but '0' as "0"
	push @my_stuff, $el if( (ref($key)
				 ? $
r; my $el=$it->(); ) {
	$#{$el}=nNOTE;		# drop ID
	$el->[nBLOCK]+=0;	# convert to numbers because JSON::XS
	$el->[nORDER]+=0;	# shows 0 as 0 but '0' as "0"
	push @other_stuff, $el if( (ref($key)
				 
Apache2-Translation ( O/OP/OPI/Apache2-Translation-0.34.tar.gz, OPI, 2011; MetaCPAN )
Apache2-Translation/lib/Apache2/Translation/Config.pm ( view source; MetaCPAN )
ted';
  }

  my $args=lc $r->args;
  if( $args ne 'yaml' and eval 'require JSON::XS' ) {
    $r->print( JSON::XS::encode_json
	       ( {
		  TranslationKey=>$cf->{key},
		  TranslationProvider=>$cf->
key},
		  TranslationProvider=>$cf->{provider_param},
		  TranslationEvalCache=>$cache,
		 } ) );
  } else {
    die "Please install JSON::XS or YAML";
  }

  return Apache2::Const::OK;
}

1;
__END__
Apache2-Translation ( O/OP/OPI/Apache2-Translation-0.34.tar.gz, OPI, 2011; MetaCPAN )
Apache2-Translation/lib/Apache2/Translation/_base.pod ( view source; MetaCPAN )
en notes are not
copied.

=item B<diff( $other_provider, %options )>

If L<Algorithm::Diff> and L<JSON::XS> are installed this method computes
a difference between 2 providers. If C<key> or C<uri> are
Apache2-Translation ( O/OP/OPI/Apache2-Translation-0.34.tar.gz, OPI, 2011; MetaCPAN )
Apache2-Translation/lib/Apache2/Translation/Config.pod ( view source; MetaCPAN )
PTION

This module implements a simple C<modperl> handler that exports our
provider parameters in JSON or YAML to the WEB, e.g.:

  $ curl http://localhost/-/config?yaml
  ---
  TranslationEvalCache: 
nfig

Since C<Apache2::Translation> version 0.31 JSON is default.
C<Apache2::Translation::Admin> can decode both formats provided the
L<YAML> and L<JSON::XS> modules are installed.

This format can be
Apache2-Translation ( O/OP/OPI/Apache2-Translation-0.34.tar.gz, OPI, 2011; MetaCPAN )
Apache2-Translation/lib/Apache2/Translation/Admin.pm ( view source; MetaCPAN )
ider_url);
  if( $resp->is_success ) {
    my $x;
    unless( eval 'require JSON::XS' and
	    $x=eval {JSON::XS::decode_json($resp->content)} ) {
      eval 'require YAML' and $x=eval {YAML::Load($re

Powered by Groonga
Maintained by Kenichi Ishigaki <ishigaki@cpan.org>. If you find anything, submit it on GitHub.