Result:
found more than 809 distributions - search limited to the first 2001 files matching your query ( run in 0.623 )


Catalyst-Controller-Mobile-JP

 view release on metacpan or  search on metacpan

lib/Catalyst/Controller/Mobile/JP.pm  view on Meta::CPAN


Catalyst::Controller::Mobile::JP works as a base controller
that automatically decode()/encode() with the recommended encoding
lead from values of UserAgent.

You can use unicode in your app that includes cross-carrier pictograms.

このモジュールは Catalyst::Controller で、SYNOPSIS にあるように使います。
C<begin> で C<< $c->req->params >> の Encode::decode()、C<end> で
C<< $c->res->body >> の Encode::encode() を行ないます。

 view all matches for this distribution


Catalyst-Controller-POD

 view release on metacpan or  search on metacpan

share/ext/resources/css/ext-all.css  view on Meta::CPAN

.x-panel-reset .x-panel-body center          { text-align: center }
.x-panel-reset .x-panel-body :link, .x-panel-reset .x-panel-body :visited { text-decoration: underline }
.x-panel-reset .x-panel-body :focus          { outline: invert dotted thin }

/* Begin bidirectionality settings (do not change) */
.x-panel-reset .x-panel-body BDO[DIR="ltr"]  { direction: ltr; unicode-bidi: bidi-override }
.x-panel-reset .x-panel-body BDO[DIR="rtl"]  { direction: rtl; unicode-bidi: bidi-override }
.x-window {
    zoom:1;
}

.x-window .x-window-handle {

 view all matches for this distribution


Catalyst-Controller-SimpleCAS

 view release on metacpan or  search on metacpan

lib/Catalyst/Controller/SimpleCAS/Role/TextTranscode.pm  view on Meta::CPAN

  ## New: throw the kitchen sink at trying to figure out the charset/encoding
  ##
  ## This solves the long-standing problem where MHT files saved by Word 2010
  ## would load garbled. These files are encoded as 'UTF-16LE', and the system
  ## is not able to realize this out of the box (I think because it lists the
  ## the charset ambiguously as ' charset="unicode" ' in the Content-Type
  ## MIME header, but I'm no expert on Unicode). Below we're basically trying 
  ## all of the functions of HTML::Encoding until we find one that gives us
  ## an answer, and if we do get an answer, we apply it to the MIME object before
  ## calling ->body_str() which will then use it to decode to text.
  ##

 view all matches for this distribution


Catalyst-Engine-Apache

 view release on metacpan or  search on metacpan

t/lib/TestApp/Controller/Engine/Request/URI.pm  view on Meta::CPAN


sub uri_with_utf8 : Local {
    my ( $self, $c ) = @_;

    # change the current uri
    my $uri = $c->req->uri_with( { unicode => "\x{2620}" } );
    
    $c->res->header( 'X-Catalyst-uri-with' => "$uri" );
    
    $c->forward('TestApp::View::Dump::Request');
}

 view all matches for this distribution


Catalyst-Engine-HTTP-POE

 view release on metacpan or  search on metacpan

t/lib/TestApp/Controller/Engine/Request/URI.pm  view on Meta::CPAN


sub uri_with_utf8 : Local {
    my ( $self, $c ) = @_;

    # change the current uri
    my $uri = $c->req->uri_with( { unicode => "\x{2620}" } );
    
    $c->res->header( 'X-Catalyst-uri-with' => "$uri" );
    
    $c->forward('TestApp::View::Dump::Request');
}

 view all matches for this distribution


Catalyst-Engine-HTTP-Prefork

 view release on metacpan or  search on metacpan

t/lib/TestApp/Controller/Engine/Request/URI.pm  view on Meta::CPAN


sub uri_with_utf8 : Local {
    my ( $self, $c ) = @_;

    # change the current uri
    my $uri = $c->req->uri_with( { unicode => "\x{2620}" } );
    
    $c->res->header( 'X-Catalyst-uri-with' => "$uri" );
    
    $c->forward('TestApp::View::Dump::Request');
}

 view all matches for this distribution


Catalyst-Model-WebService-MyGengo

 view release on metacpan or  search on metacpan

inc/Pod/Markdown.pm  view on Meta::CPAN

        if ($section){
            # TODO: sites/pod formatters differ on how to transform the section
            # TODO: we could do it according to specified url prefix or pod formatter
            # TODO: or allow a coderef?
            # TODO: (Pod::Simple::XHTML:idify() for metacpan)
            # TODO: (Pod::Simple::HTML section_escape/unicode_escape_url/section_url_escape for s.c.o.)
            $url .= '#' . $section;
        }
    }

    # if we don't know how to handle the url just print the pod back out

 view all matches for this distribution


Catalyst-Plugin-Authorization-Abilities

 view release on metacpan or  search on metacpan

t/lib/Schema/Utils.pm  view on Meta::CPAN


sub _connect_info {
  my $self = shift;

  my $model = $self->model;
  my ($dsn, $user, $password, $unicode_option, $db_type);
  eval {
        if (ref $model->{'connect_info'}) {

          $dsn      = $self->dsn;
          $user     = ${$model->{'connect_info'}}[1];
          $password = ${$model->{'connect_info'}}[2];

          # Determine database type amongst: SQLite, Pg or MySQL
          $dsn =~ m/^dbi:(\w+)/;
          $db_type = lc($1);
          my %unicode_connection_for_db = (
                'sqlite' => { sqlite_unicode    => 1 },
                'pg'     => { pg_enable_utf8    => 1 },
                'mysql'  => { mysql_enable_utf8 => 1 },

                );
          $unicode_option = $unicode_connection_for_db{$db_type};
        }
  };

  if ($@) {
    die "Your DSN line in " . $self->dsn . " doesn't look like a valid DSN. : $@";

t/lib/Schema/Utils.pm  view on Meta::CPAN

    my $dir = dir($1)->parent;
    $dir->mkpath;
  }

  my $merge    = Hash::Merge->new( 'LEFT_PRECEDENT' );
  my $allattrs = $merge->merge( $unicode_option, $attrs );

  return $dsn, $user, $password, $allattrs;
}


 view all matches for this distribution



Catalyst-Plugin-CachedUriForAction

 view release on metacpan or  search on metacpan

t/unit_core_uri_for.t  view on Meta::CPAN


# test with utf-8
is(
    $context->uri_for_action( '/yada', 'quux', { param1 => "\x{2620}" } )->as_string,
    'http://127.0.0.1/foo/yada/quux?param1=%E2%98%A0',
    'URI for undef action with query params in unicode'
);
is(
    $context->uri_for_action( '/yada','quux', { 'param:1' => "foo" } )->as_string,
    'http://127.0.0.1/foo/yada/quux?param%3A1=foo',
    'URI for undef action with query params in unicode'
);

# test with object
is(
    $context->uri_for_action( '/yada', 'quux', { param1 => $request->base } )->as_string,

 view all matches for this distribution


Catalyst-Plugin-Compress

 view release on metacpan or  search on metacpan

lib/Catalyst/Plugin/Compress.pm  view on Meta::CPAN

If you don't, You'll get error which is like:

[error] Caught exception in engine "Wide character in subroutine entry at
/usr/lib/perl5/site_perl/5.8.8/Compress/Zlib.pm line xxx."

If you upgrade to any version of L<Catalyst> 5.90080+ the unicode support has been
integrated into core code and this plugin is designed to work with that.

=head1 INTERNAL METHODS

=head2 should_compress_response

 view all matches for this distribution


Catalyst-Plugin-I18N

 view release on metacpan or  search on metacpan

lib/Catalyst/Plugin/I18N/Manual.pod  view on Meta::CPAN


L<http://search.cpan.org/dist/perl/pod/perluniintro.pod>

=item Perl Unicode support

L<http://search.cpan.org/dist/perl/pod/perlunicode.pod>

=item Unicode-processing issues in Perl and how to cope with it

L<http://www.ahinea.com/en/tech/perl-unicode-struggle.html>

=item Web Localization in Perl

L<http://search.cpan.org/dist/Locale-Maketext-Lexicon/docs/webl10n.html>

lib/Catalyst/Plugin/I18N/Manual.pod  view on Meta::CPAN


L<http://lists.cpan.org/showlist.cgi?name=perl-i18n>

=item Perl Unicode Mailing List

L<http://lists.cpan.org/showlist.cgi?name=perl-unicode>

=back

=head3 Portals

lib/Catalyst/Plugin/I18N/Manual.pod  view on Meta::CPAN


=over 4

=item Common Locale Data Repository (CLDR)

L<http://www.unicode.org/cldr/>

=item International Components for Unicode (ICU)

L<http://www-306.ibm.com/software/globalization/icu/index.jsp>

 view all matches for this distribution


Catalyst-Plugin-Params-Demoronize

 view release on metacpan or  search on metacpan

lib/Catalyst/Plugin/Params/Demoronize.pm  view on Meta::CPAN


  # Be sure and use the Unicode plugin if you want to handle Unicode
  # replacement.
  use Catalyst qw(Unicode Demoronize);

  # Optionally enable replacement of common unicode "smart" characters.
  MyApp->config->{demoronize} = { replace_unicode => 1 }

=head1 DESCRIPTION

to borrow a few passages from the documentation packaged
with john walker's demoronizer.pl:

lib/Catalyst/Plugin/Params/Demoronize.pm  view on Meta::CPAN

=back

these characters are commonly inserted into form elements
via cut and paste operations.  in many cases, they are
converted to UTF-8 by the browser.  this plugin will replace
both the unicode characters AND the Windows-1252 characters
with sane ASCII equivalents.

=head1 UNICODE

Demoronize assumes that you are using L<Catalyst::Plugin::Unicode>
to convert incoming parameters into Unicode characters.  If you are
not and enable optional C<replace_unicode>, you may have issues.

=head1 CONFIG

=head2 replace_unicode

If this flag is enabled (it is off by default) then commonly substituted
Unicode characters will be converted to their ASCII equivalents.

=head2 replace_map

lib/Catalyst/Plugin/Params/Demoronize.pm  view on Meta::CPAN

        '—' => '-',     # 97, EM DASH
        '‹' => '<',     # 8B, SINGLE LEFT-POINTING ANGLE QUOTATION MARK
        '›' => '>',     # 9B, SINGLE RIGHT-POINTING ANGLE QUOTATION MARK
    };

    if(exists($config->{'replace_unicode'}) && $config->{'replace_unicode'}) {

        foreach my $replace (keys(%{ $config->{replace_map} })) {
            next unless defined($str);
            $str =~ s/$replace/$config->{replace_map}->{$replace}/g;
        }

 view all matches for this distribution


Catalyst-Plugin-Server

 view release on metacpan or  search on metacpan

t/lib/TestApp/Controller/RPC/Functions.pm  view on Meta::CPAN

sub echo_plain_stash : XMLRPCLocal {
    my ($self, $c, %args) = @_;
    $c->stash->{'function'} = 'echo_plain_stash';
}

sub echo_unicode: XMLRPCLocal {
    my ($self, $c, %args) = @_;
    $c->stash->{'xmlrpc'} = '私はクリスです'
}

sub echo_path : XMLRPCPath('/rpc/functions/echo/path') {

 view all matches for this distribution


Catalyst-Plugin-Static-File

 view release on metacpan or  search on metacpan

MANIFEST  view on Meta::CPAN

t/author-critic.t
t/author-cve.t
t/author-eof.t
t/author-eol.t
t/author-minimum-version.t
t/author-mixed-unicode-scripts.t
t/author-no-tabs.t
t/author-pod-coverage.t
t/author-pod-linkcheck.t
t/author-pod-syntax.t
t/author-portability.t

 view all matches for this distribution


Catalyst-Plugin-Unicode

 view release on metacpan or  search on metacpan

t/lib/TestApp/Controller/Root.pm  view on Meta::CPAN

# your actions replace this one
sub main :Path { 
    $_[1]->res->body('<h1>It works</h1>') 
}

sub unicode :Local {
    my ($self, $c) = @_;
    my $data = "ほげ"; # hoge!
    $c->response->body($data); # should be decoded
}

sub not_unicode :Local {
    my ($self, $c) = @_;
    my $data = "\x{1234}\x{5678}";
    utf8::encode($data); # DO NOT WANT unicode
    $c->response->body($data); # just some octets
}

sub file :Local {
    my ($self, $c) = @_;

 view all matches for this distribution


Catalyst-Runtime

 view release on metacpan or  search on metacpan

lib/Catalyst.pm  view on Meta::CPAN

    my $c = shift;
    my $ret = $c->dispatcher->prepare_action( $c, @_);

    if($c->encoding) {
        foreach (@{$c->req->arguments}, @{$c->req->captures}) {
          $_ = $c->_handle_param_unicode_decoding($_);
        }
    }

    return $ret;
}

lib/Catalyst.pm  view on Meta::CPAN

        delete $c->config->{encoding} : 'UTF-8'; # not sure why we delete it... (JNAP)
      $c->encoding($enc);
    }
}

=head2 handle_unicode_encoding_exception

Hook to let you customize how encoding errors are handled. By default
we just throw an exception and the default error page will pick it up.
Receives a hashref of debug information. Example of call (from the
Catalyst internals):

  my $decoded_after_fail = $c->handle_unicode_encoding_exception({
        param_value => $value,
        error_msg => $_,
        encoding_step => 'params',
   });

The calling code expects to receive a decoded string or an exception.

You can override this for custom handling of unicode errors. By
default we just die. If you want a custom response here, one approach
is to throw an HTTP style exception, instead of returning a decoded
string or throwing a generic exception.

    sub handle_unicode_encoding_exception {
      my ($c, $params) = @_;
      HTTP::Exception::BAD_REQUEST->throw(status_message=>$params->{error_msg});
    }

Alternatively you can 'catch' the error, stash it and write handling code later
in your application:

    sub handle_unicode_encoding_exception {
      my ($c, $params) = @_;
      $c->stash(BAD_UNICODE_DATA=>$params);
      # return a dummy string.
      return 1;
    }

lib/Catalyst.pm  view on Meta::CPAN

up correctly (since we haven't finished the setup yet). If you throw
an exception the setup is aborted.

=cut

sub handle_unicode_encoding_exception {
    my ( $self, $exception_ctx ) = @_;
    die $exception_ctx->{error_msg};
}

# Some unicode helpers cargo culted from the old plugin.  These could likely
# be neater.

sub _handle_unicode_decoding {
    my ( $self, $value ) = @_;

    return unless defined $value;

    ## I think this mess is to support the old nested
    if ( ref $value eq 'ARRAY' ) {
        foreach ( @$value ) {
            $_ = $self->_handle_unicode_decoding($_);
        }
        return $value;
    }
    elsif ( ref $value eq 'HASH' ) {
        foreach (keys %$value) {
            my $encoded_key = $self->_handle_param_unicode_decoding($_);
            $value->{$encoded_key} = $self->_handle_unicode_decoding($value->{$_});

            # If the key was encoded we now have two (the original and current so
            # delete the original.
            delete $value->{$_} if $_ ne $encoded_key;
        }
        return $value;
    }
    else {
        return $self->_handle_param_unicode_decoding($value);
    }
}

sub _handle_param_unicode_decoding {
    my ( $self, $value, $check ) = @_;
    return unless defined $value; # not in love with just ignoring undefs - jnap
    return $value if blessed($value); #don't decode when the value is an object.

    my $enc = $self->encoding;

lib/Catalyst.pm  view on Meta::CPAN

    $check ||= $self->_encode_check;
    return try {
      $enc->decode( $value, $check);
    }
    catch {
        return $self->handle_unicode_encoding_exception({
            param_value => $value,
            error_msg => $_,
            encoding_step => 'params',
        });
    };

lib/Catalyst.pm  view on Meta::CPAN

issue for you, you can disable this by setting C<skip_complex_post_part_handling>
to true (default is false).

=item *

C<skip_body_param_unicode_decoding>

Generally we decode incoming POST params based on your declared encoding (the
default for this is to decode UTF-8).  If this is causing you trouble and you
do not wish to turn all encoding support off (with the C<encoding> configuration
parameter) you may disable this step atomically by setting this configuration

lib/Catalyst.pm  view on Meta::CPAN


C<do_not_check_query_encoding>

Catalyst versions 5.90080 - 5.90106 would decode query parts of an incoming
request but would not raise an exception when the decoding failed due to
incorrect unicode.  It now does, but if this change is giving you trouble
you may disable it by setting this configuration to true.

=item *

C<default_query_encoding>

lib/Catalyst.pm  view on Meta::CPAN


Returns an instance of an C<Encode> encoding

    print $c->encoding->name

=item handle_unicode_encoding_exception ($exception_context)

Method called when decoding process for a request fails.

An C<$exception_context> hashref is provided to allow you to override the
behaviour of your application when given data with incorrect encodings.

 view all matches for this distribution


Catalyst-TraitFor-Model-DBIC-Schema-QueryLog-AdoptPlack

 view release on metacpan or  search on metacpan

inc/Pod/Markdown.pm  view on Meta::CPAN

        if ($section){
            # TODO: sites/pod formatters differ on how to transform the section
            # TODO: we could do it according to specified url prefix or pod formatter
            # TODO: or allow a coderef?
            # TODO: (Pod::Simple::XHTML:idify() for metacpan)
            # TODO: (Pod::Simple::HTML section_escape/unicode_escape_url/section_url_escape for s.c.o.)
            $url .= '#' . $section;
        }
    }

    # if we don't know how to handle the url just print the pod back out

 view all matches for this distribution


Catalyst-View-Component-jQuery

 view release on metacpan or  search on metacpan

Debian_CPANTS.txt  view on Meta::CPAN

"libtoolkit-perl", "Toolkit", "0.0.2", "0", "0"
"libtree-dagnode-perl", "Tree-DAG_Node", "1.06", "0", "0"
"libtree-redblack-perl", "Tree-RedBlack", "0.5", "0", "0"
"libtree-simple-perl", "Tree-Simple", "1.18", "0", "0"
"libtree-simple-visitorfactory-perl", "Tree-Simple-VisitorFactory", "0.10", "0", "0"
"libunicode-map-perl", "Unicode-Map", "0.112", "0", "0"
"libunicode-map8-perl-dfsg", "Unicode-Map8", "0.12", "0", "0"
"libunicode-maputf8-perl", "Unicode-MapUTF8", "1.11", "0", "0"
"libunicode-string-perl", "Unicode-String", "2.09", "0", "0"
"libuniversal-can-perl", "UNIVERSAL-can", "1.12", "0", "0"
"libuniversal-isa-perl", "UNIVERSAL-isa", "1.01", "0", "0"
"libuniversal-require-perl", "UNIVERSAL-require", "0.13", "0", "0"
"libunix-syslog-perl", "Unix-Syslog", "1.1", "0", "0"
"liburi-perl", "URI", "1.37", "1", "0"

 view all matches for this distribution


Catalyst-View-MobileJpFilter

 view release on metacpan or  search on metacpan

lib/Catalyst/View/MobileJpFilter.pm  view on Meta::CPAN

    - module: DoCoMoGUID
    - module: FallbackImage
      config:
        template: '<img src="%s.gif" />'
        params:
          - unicode_hex
  ...
  );
  
  1;

 view all matches for this distribution


Catalyst-View-TT-ForceUTF8

 view release on metacpan or  search on metacpan

lib/Catalyst/View/TT/ForceUTF8.pm  view on Meta::CPAN

Template View Class with utf8 encoding.

This allows you to prevent publishing garbled result.

Now this module is deprecated.
http://dev.catalystframework.org/wiki/gettingstarted/tutorialsandhowtos/using_unicode

=head1 CONFIG

  __PACKAGE__->config(
    INCLUDE_PATH        => [..],

 view all matches for this distribution


Catalyst-View-TT

 view release on metacpan or  search on metacpan

lib/Catalyst/View/TT.pm  view on Meta::CPAN

having a C<additional_template_paths> key with a value of additional directories
to search. See L</CAPTURING TEMPLATE OUTPUT> for an example showing this.

=head2 Unicode (pre Catalyst v5.90080)

B<NOTE> Starting with L<Catalyst> v5.90080 unicode and encoding has been
baked into core, and the default encoding is UTF-8.  The following advice
is for older versions of L<Catalyst>.

Be sure to set C<< ENCODING => 'utf-8' >> and use
L<Catalyst::Plugin::Unicode::Encoding> if you want to use non-ascii

 view all matches for this distribution


Catalyst-View-Templated

 view release on metacpan or  search on metacpan

t/encoding.t  view on Meta::CPAN

use ok 'TestApp::View::Raw';

my $catalyst = mk_catalyst;
$view = TestApp::View::Raw->COMPONENT($catalyst);

$stash = { unicode => "\x{65e5}\x{672c}\x{8a9e}" };
$view->process;
ok utf8::is_utf8($body), 'output is utf8';
like $content_type, qr/charset=utf-8/, 'is utf8';

$stash = { not_unicode => 'foo bar baz' };
$view->process;
ok !utf8::is_utf8($body), 'output is not utf8';
like $content_type, qr/charset=iso-8859-1/, 'is iso-8859-1';

$view = TestApp::View::Raw->COMPONENT($catalyst,

 view all matches for this distribution


Catalyst-View-XML-Feed

 view release on metacpan or  search on metacpan

MANIFEST  view on Meta::CPAN

MYMETA.yml
README
t/00-load.t
t/author/pod-coverage.t
t/author/pod.t
t/bad_unicode.t
t/lib/Makefile.PL
t/lib/MyEntry.pm
t/lib/MyFeed.pm
t/lib/script/testapp_server.pl
t/lib/script/testapp_test.pl

 view all matches for this distribution


CatalystX-Crudite

 view release on metacpan or  search on metacpan

lib/CatalystX/Crudite.pm  view on Meta::CPAN

        'Model::DB' => {
            schema_class => "${app_name}::Schema",
            connect_info => {
                dsn => 'dbi:SQLite:dbname='
                  . __PACKAGE__->path_to(lc "${app_name}.db"),
                sqlite_unicode => 1,
            },
        },
    );
    my $merged_config = merge_configs(\%config, \%args);
    $class->config(%$merged_config);

 view all matches for this distribution


Catmandu-BibTeX

 view release on metacpan or  search on metacpan

Changes  view on Meta::CPAN


0.17  2020-03-04 13:28:49 CET
  - fix travis build

0.16  2020-03-04 13:21:27 CET
  - translate latex field values to unicode
  - better author/editor field handling
  - author and fields are always an array

0.15  2019-12-20 08:43:00 CET
  - add fix latex_decode

 view all matches for this distribution


Catmandu-DBI

 view release on metacpan or  search on metacpan

lib/Catmandu/Store/DBI.pm  view on Meta::CPAN

        RaiseError                       => 1,
        mysql_auto_reconnect             => 1,
        mysql_enable_utf8                => 1,
        pg_utf8_strings                  => 1,
        sqlite_use_immediate_transaction => 1,
        sqlite_unicode                   => 1,
    };
    my $dbh
        = DBI->connect($self->data_source, $self->username, $self->password,
        $opts,);
    $self->_set_connect_time(time);

 view all matches for this distribution


Ceph-Rados-Striper

 view release on metacpan or  search on metacpan

ppport.h  view on Meta::CPAN

parse_listexpr||5.013008|
parse_lparen_question_flags|||
parse_stmtseq||5.013006|
parse_subsignature|||
parse_termexpr||5.013008|
parse_unicode_opts|||
parser_dup|||
parser_free_nexttoke_ops|||
parser_free|||
path_is_searchable|||n
peep|||

ppport.h  view on Meta::CPAN

#ifndef PERL_PV_PRETTY_REGPROP
#  define PERL_PV_PRETTY_REGPROP         PERL_PV_PRETTY_ELLIPSES|PERL_PV_PRETTY_LTGT|PERL_PV_ESCAPE_RE
#endif

/* Hint: pv_escape
 * Note that unicode functionality is only backported to
 * those perl versions that support it. For older perl
 * versions, the implementation will fall back to bytes.
 */

#ifndef pv_escape

 view all matches for this distribution


Ceph-Rados

 view release on metacpan or  search on metacpan

ppport.h  view on Meta::CPAN

pad_sv||5.011000|
pad_swipe|||
pad_tidy|||
pad_undef|||
parse_body|||
parse_unicode_opts|||
parser_dup|||
parser_free|||
path_is_absolute|||n
peep|||
pending_Slabs_to_ro|||

ppport.h  view on Meta::CPAN

#ifndef PERL_PV_PRETTY_REGPROP
#  define PERL_PV_PRETTY_REGPROP         PERL_PV_PRETTY_ELLIPSES|PERL_PV_PRETTY_LTGT|PERL_PV_ESCAPE_RE
#endif

/* Hint: pv_escape
 * Note that unicode functionality is only backported to
 * those perl versions that support it. For older perl
 * versions, the implementation will fall back to bytes.
 */

#ifndef pv_escape

 view all matches for this distribution


Chandra

 view release on metacpan or  search on metacpan

t/34_socket_edge.t  view on Meta::CPAN

    my @decoded = Chandra::Socket::Connection->decode_frames($frame);
    is(scalar @decoded, 1, 'empty data decoded');
    is_deeply($decoded[0]->{data}, {}, 'empty data preserved');
}

# === encode_frame / decode_frames with unicode ===
{
    my $frame = Chandra::Socket::Connection->encode_frame({ channel => 'unicode', data => { text => "日本語" } });
    my @decoded = Chandra::Socket::Connection->decode_frames($frame);
    is($decoded[0]->{data}{text}, "日本語", 'unicode preserved through encode/decode');
}

# === decode_frames with empty buffer ===
{
    my @decoded = Chandra::Socket::Connection->decode_frames('');

 view all matches for this distribution


( run in 0.623 second using v1.01-cache-2.11-cpan-39bf76dae61 )