view release on metacpan or search on metacpan
examples/MyApp/config.yml view on Meta::CPAN
# views/layouts/main.tt)
layout: "main"
# When the charset is set to UTF-8 Dancer will handle for you
# all the magic of encoding and decoding. You should not care
# about unicode within your app when this setting is set (recommended).
charset: "UTF-8"
# template engine
# simple: default and very basic template engine
# template_toolkit: TT
view all matches for this distribution
view release on metacpan or search on metacpan
eg/example/config.yml view on Meta::CPAN
# views/layouts/main.tt)
layout: "main"
# when the charset is set to UTF-8 Dancer will handle for you
# all the magic of encoding and decoding. You should not care
# about unicode within your app when this setting is set (recommended).
charset: "UTF-8"
session: YAML
session_dir: /tmp/dancer-sessions
view all matches for this distribution
view release on metacpan or search on metacpan
# views/layouts/bootstrap3.tt)
layout: "bootstrap3"
# when the charset is set to UTF-8 Dancer will handle for you
# all the magic of encoding and decoding. You should not care
# about unicode within your app when this setting is set (recommended).
charset: "UTF-8"
# template engine
# simple: default and very basic template engine
# template_toolkit: TT
view all matches for this distribution
view release on metacpan or search on metacpan
t/lib/config.yml view on Meta::CPAN
plugins:
DBIC:
schema1:
dsn: 'dbi:SQLite:dbname=:memory:'
schema_class: t::lib::Schema1
sqlite_unicode: 1
on_connect_call: use_foreign_keys
on_connect_do: 'PRAGMA synchronous = OFF'
quote_names: 1
schema2:
dsn: 'dbi:SQLite:dbname=:memory:'
schema_class: t::lib::Schema2
sqlite_unicode: 1
on_connect_call: use_foreign_keys
on_connect_do: 'PRAGMA synchronous = OFF'
quote_names: 1
schema3:
dsn: 'dbi:SQLite:dbname=:memory:'
schema_class: t::lib::Schema1
sqlite_unicode: 1
on_connect_call: use_foreign_keys
on_connect_do: 'PRAGMA synchronous = OFF'
quote_names: 1
Auth::Extensible:
realms:
view all matches for this distribution
view release on metacpan or search on metacpan
t/MyApp/config.yml view on Meta::CPAN
# views/layouts/main.tt)
layout: "main"
# when the charset is set to UTF-8 Dancer2 will handle for you
# all the magic of encoding and decoding. You should not care
# about unicode within your app when this setting is set (recommended).
charset: "UTF-8"
# === Engines ===
#
# NOTE: All the engine configurations need to be under a single "engines:"
view all matches for this distribution
view release on metacpan or search on metacpan
t/01-plugin.t view on Meta::CPAN
my $loop = IO::Async::Loop->new;
my $schema = DBIx::Class::Async::Schema->connect(
"dbi:SQLite:dbname=$db_file",
'',
'',
{ sqlite_unicode => 1 },
{
schema_class => 'Test::Schema',
workers => 2,
loop => $loop,
}
view all matches for this distribution
view release on metacpan or search on metacpan
lib/Dancer2/Plugin/FontSubset.pm view on Meta::CPAN
if ($subsetter->keep_glyph($t->{$k}))
{ $t->{$k} = $subsetter->map_glyph($t->{$k}); }
else
{ delete $t->{$k}; }
}
if ($self->is_unicode($i))
{
foreach my $k (keys %{$subsetter->{'remaps'}})
{ $t->{$k} = $subsetter->map_glyph($subsetter->{'remaps'}{$k}); }
}
}
view all matches for this distribution
view release on metacpan or search on metacpan
lib/Dancer2/Plugin/FormValidator.pm view on Meta::CPAN
Validate that string only contain of alphabetic symbols.
By default encoding is ascii, i.e B</^[[:alpha:]]+$/a>.
field => [ qw(alpha) ]
To set encoding to unicode you need to pass 'u' argument:
field => [ qw(alpha:u) ]
Then the validation rule will be B</^[[:alpha:]]+$/>.
lib/Dancer2/Plugin/FormValidator.pm view on Meta::CPAN
Validate that string only contain of alphabetic symbols, underscore and numbers 0-9.
By default encoding is ascii, i.e. B</^\w+$/a>.
field => [ qw(alpha_num) ]
To set encoding to unicode you need to pass 'u' argument:
field => [ qw(alpha_num:u) ]
Rule will be B</^\w+$/>.
view all matches for this distribution
view release on metacpan or search on metacpan
t/environment/disabled_cart_and_checkout.yml view on Meta::CPAN
dsn: 'dbi:SQLite:dbname=:memory:'
options:
on_connect_call: use_foreign_keys
on_connect_do: 'PRAGMA synchronous = OFF'
quote_names: 1
sqlite_unicode: 1
'Interchange6::Routes':
navigation: ~
cart:
active: 0
checkout:
view all matches for this distribution
view release on metacpan or search on metacpan
lib/Dancer2/Plugin/Locale.pm view on Meta::CPAN
use Dancer2::Plugin;
$Dancer2::Plugin::Locale::VERSION = '0.07';
package Dancer2::Plugin::Locale::Obj;
use Locales 0.33 unicode => 1;
use Locale::Maketext::Utils;
use base 'Locale::Maketext::Utils';
our %Lexicon;
package Dancer2::Plugin::Locale;
view all matches for this distribution
view release on metacpan or search on metacpan
examples/MyApp/config.yml view on Meta::CPAN
# views/layouts/main.tt)
layout: "main"
# When the charset is set to UTF-8 Dancer will handle for you
# all the magic of encoding and decoding. You should not care
# about unicode within your app when this setting is set (recommended).
charset: "UTF-8"
# template engine
# simple: default and very basic template engine
# template_toolkit: TT
view all matches for this distribution
view release on metacpan or search on metacpan
lib/Dancer2/Plugin/Passphrase.pm view on Meta::CPAN
of deeper problems within your app's code.
You will save yourself a lot of trouble if you read up on the
L<Encode> module sooner rather than later.
For further reading on UTF-8, unicode, and text encoding in perl,
see L<http://training.perl.com/OSCON2011/index.html>
=head1 SEE ALSO
view all matches for this distribution
view release on metacpan or search on metacpan
lib/Dancer2/Plugin/UnicodeNormalize.pm view on Meta::CPAN
L</"CONFIGURATION">.
This plugin was inspired by L<Mojolicious::Plugin::UnicodeNormalize>. For
information on why Unicode Normalization is important, please see:
L<http://www.perl.com/pub/2012/05/perlunicookbook-unicode-normalization.html>
L<http://www.modernperlbooks.com/mt/2013/11/mojolicious-unicode-normalization-plugin-released.html>
=head1 CONFIGURATION
plugins:
UnicodeNormalize:
view all matches for this distribution
view release on metacpan or search on metacpan
CREATE_SAMPLE_APPLICATION view on Meta::CPAN
get '/Protected_text_ref' => sub { Error('ok'); reply \'hello world' }; # text reference
get '/project/commit' => sub { reply 'commited' };
# UniCode tests
any['get','post']=> '/unicode_test_mirror' => sub { reply UserData() };
any['get','post']=> '/unicode_test_session_set' => sub { reply SessionSet( UserData ) };
any['delete'] => '/unicode_test_session_del' => sub { reply SessionDel( UserData ) };
get '/unicode_test_session_get' => sub { reply { SessionGet( UserData ) } };
# Store persistent data
# SessionSet( { k1=>'v1' , k2=>'v2' } );
# SessionSet( k1=>'v1' , k2=>'v2' );
CREATE_SAMPLE_APPLICATION view on Meta::CPAN
- "????:????:????:6d00:20c:29ff:*:ffa3"
- "10.*.?.*"
- "*"
Routes:
unicode_test_mirror : { Protected: false }
unicode_test_session_set : { Protected: false }
unicode_test_session_get : { Protected: false }
unicode_test_session_del : { Protected: false }
text : { Protected: false }
mirror : { Protected: false }
Protected : { Protected: true }
Protected_text_ref : { Protected: true }
list : { Protected: false }
CREATE_SAMPLE_APPLICATION view on Meta::CPAN
curl $url/logout?token=$token
curl $url/logout -H "$H" -X POST -d "{\"token\":\"$token\"}"
Unicode
Test if the unicode posted or replied data are handled successufully. Login is required
curl -X POST $url/unicode_test_mirror -H "$H" -d '{"Latin":"Hello world", "Îλληνικά":"Îειά ÏοÏ
κÏÏμε", "íêµ":"ìë
ì¸ê³"}'
curl -X POST "$url/unicode_test_mirror?from=xml&to=xml" -H "HXML" -d '<?xml version="1.0" encoding="UTF-8"?><root><Latin>hello world</Latin><Îλληνικά>Îειά ÏοÏ
κÏÏμε</Îλληνικά><íêµ>ìë
ì¸ê³</íêµ></root>'
curl -X POST $url/login -H "$H" -d '{"username":"joe", "password":"SomePassword"}'
export token=1767608823-2166cefaeba07576c7989e58-0
curl -X POST $url/unicode_test_session_set?token=$token -H "$H" -d '{ "Latin":"Hello world", "Îλληνικά":"Îειά ÏοÏ
κÏÏμε", "íêµ":"ìë
ì¸ê³" }'
curl -X GET $url/unicode_test_session_get?token=$token -H "$H" -d '[ "Latin", "Îλληνικά", "íêµ" ]'
curl -X DELETE $url/unicode_test_session_del?token=$token -H "$H" -d '[ "Latin", "Îλληνικά", "íêµ" ]'
curl -X POST $url/logout -H "$H" -d "{\"token\":\"$token\"}"
To start your application as Linux service
If you plan to use a reverse proxy change the listening IP (BIND) from 0.0.0.0 to 127.0.0.1
view all matches for this distribution
view release on metacpan or search on metacpan
t/plugin_dbic.t view on Meta::CPAN
DBIC => {
default => {
dsn => 'dbi:SQLite:dbname=:memory:',
schema_class => 'Test::Schema',
options => {
sqlite_unicode => 1,
quote_names => 1,
},
},
},
};
view all matches for this distribution
view release on metacpan or search on metacpan
share/skel/default/config.yml view on Meta::CPAN
# views/layouts/main.tt)
layout: "main"
# when the charset is set to UTF-8 Dancer2 will handle for you
# all the magic of encoding and decoding. You should not care
# about unicode within your app when this setting is set (recommended).
charset: "UTF-8"
# When strict_config is true, Dancer2 will warn you about unknown
# top-level configuration keys, and warn about unknown engine
# configuration options.
view all matches for this distribution
view release on metacpan or search on metacpan
-- let subclasses overwrite the behavior on incomplete writes.
default, as always, is just to force watching of writability.
but during, say, SSL stuff, it's useful to disable that.
1.50: (2006-04-17)
-- use bytes. was affecting djabberd with unicode XML messages.
diagnosis by Artur Bergman and Tatsuhiko Miyagawa.
1.49: (2006-03-02)
-- patch to allow pluggable writer functions per socket. so you
can have SSL connections that do Net::SSLeay writes (or whatever)
view all matches for this distribution
view release on metacpan or search on metacpan
share/assets/dash_core_components/async~datepicker.js view on Meta::CPAN
(window.webpackJsonpdash_core_components=window.webpackJsonpdash_core_components||[]).push([[2],Array(195).concat([function(e,t,n){(function(e){e.exports=function(){"use strict";var t,r;function a(){return t.apply(null,arguments)}function o(e){return...
//# sourceMappingURL=async~datepicker.js.map
view all matches for this distribution
view release on metacpan or search on metacpan
t/json/upstream/01_utf8.t view on Meta::CPAN
# and with utf8 triple encodes it to ["I âÃÂä perl"]
if ($Encode::VERSION < 2.40 || $Encode::VERSION >= 2.54) { # Encode stricter check: Cannot decode string with wide characters
# see also http://stackoverflow.com/questions/12994100/perl-encode-pm-cannot-decode-string-with-wide-character
$love = "I \342\235\244 perl";
}
my $s = Encode::decode_utf8($love); # User tries to double decode wide-char to unicode with Encode
is(Data::AnyXfer::JSON->new->utf8->encode ([$s]), "[\"I \342\235\244 perl\"]", 'utf8 enc utf8 [RT #84244]');
}
is(Data::AnyXfer::JSON->new->binary->encode ([$love]), '["I \xe2\x9d\xa4 perl"]', 'utf8 enc binary');
view all matches for this distribution
view release on metacpan or search on metacpan
t/40.roundtrip.t view on Meta::CPAN
my @tests;
BEGIN {
my $struct = {
unicode => 'Ï',
nums => [ -1, 12345678, 1.25 ],
nested => {
hash => { slashed => '\\\\\\' },
array => [ [], [], {} ],
},
};
my $no_float = {
unicode => 'Ï',
nums => [ -1, 12345678, 0 ],
nested => {
hash => { name => '\\\\\\' },
array => [ [], [], {} ],
},
view all matches for this distribution
view release on metacpan or search on metacpan
databb-boost/boost/config/compiler/clang.hpp view on Meta::CPAN
#if !__has_feature(cxx_alias_templates)
# define BOOST_NO_CXX11_TEMPLATE_ALIASES
#endif
#if !__has_feature(cxx_unicode_literals)
# define BOOST_NO_CXX11_UNICODE_LITERALS
#endif
#if !__has_feature(cxx_variadic_templates)
# define BOOST_NO_CXX11_VARIADIC_TEMPLATES
view all matches for this distribution
view release on metacpan or search on metacpan
t/perlcriticrc view on Meta::CPAN
# max_characters = 60
# Use named character classes instead of explicit character lists.
[RegularExpressions::ProhibitEnumeratedClasses]
# set_themes = core cosmetic pbp unicode
# add_themes =
# severity = 1
# maximum_violations_per_document = no_limit
view all matches for this distribution
view release on metacpan or search on metacpan
return $reader->($config, $filename);
} ## end sub read_data
sub read_data_yaml {
my ($config, $filename) = @_;
my $unicode_string = slurp($filename, $config{encoding});
for my $class (qw< YAML::XS YAML YAML::Tiny >) {
eval "use $class";
next if $EVAL_ERROR;
my $function = $class->can('Load');
return $function->($unicode_string);
} ## end for my $class (qw< YAML::XS YAML YAML::Tiny >)
die "cannot find any YAML module\n";
return;
} ## end sub read_data_yaml
sub read_data_json {
my ($config, $filename) = @_;
my $unicode_string = slurp($filename, $config{encoding});
require Encode;
my $utf8_octets =
Encode::encode('UTF-8', $unicode_string, Encode::FB_CROAK());
my @cs = qw< Cpanel::JSON::XS JSON::XS Mojo::JSON JSON::PP >;
for my $class (@cs) {
eval "use $class";
next if $EVAL_ERROR;
view all matches for this distribution
view release on metacpan or search on metacpan
lib/Data/Decode.pm view on Meta::CPAN
Data::Decode implements a pluggable "decoder". The main aim is to provide
a uniform interface to decode a given data while allowing the actual
algorithm being used to be changed depending on your needs..
For now this is aimed at decoding miscellaneous text to perl's internal
unicode encoding.
=head1 DECODING TO UNICODE
Japanese, which is the language that I mainly deal with, has an annoying
property, in that it can come in at least 4 different flavors (utf-8,
shift-jis, euc-jp and iso-2022-jp).
Even worse, vendors may have more vendor-specific symbols, such as the
pictograms in mobile phones.
Ways to decode these strings into unicode varies between each environment
and application.
Many modules require that the strings be normalized to unicode, but they
all handle this normalization process differently, which is, well, not exactly
an optimal solution.
Data::Decode provides a uniform interface to this problem, and a few common
ways decoding is handled. The actual decoding strategies are separated out
view all matches for this distribution
view release on metacpan or search on metacpan
readability and completeness. YAML's number one design goal is human
readability.
Another large benefit of YAML is that it is a programming language
independent serialization language. Implementations currently exist for
Perl, Python, Ruby and Java. In addition, YAML is unicode based, has
extensible typing and allows stream based processing.
C<Data::Denter> has served its purpose and is now being fully deprecated
in favor of C<YAML.pm>. I have made C<YAML.pm> a module prerequisite for
C<Data::Denter>, so if you used the CPAN shell to install
view all matches for this distribution
view release on metacpan or search on metacpan
lib/Data/Dmp.pm view on Meta::CPAN
Bool, default: 0.
If set to 1, then pragmas at the start of coderef dump will be removed. Coderef
dump is produced by L<B::Deparse> and is of the form like:
sub { use feature 'current_sub', 'evalbytes', 'fc', 'say', 'state', 'switch', 'unicode_strings', 'unicode_eval'; $a <=> $b }
If you want to dump short coderefs, the pragmas might be distracting. You can
turn turn on this option which will make the above dump become:
sub { $a <=> $b }
view all matches for this distribution
view release on metacpan or search on metacpan
lib/Data/Dump/HTML/Collapsible.pm view on Meta::CPAN
Bool, default: 0.
If set to 1, then pragmas at the start of coderef dump will be removed. Coderef
dump is produced by L<B::Deparse> and is of the form like:
sub { use feature 'current_sub', 'evalbytes', 'fc', 'say', 'state', 'switch', 'unicode_strings', 'unicode_eval'; $a <=> $b }
If you want to dump short coderefs, the pragmas might be distracting. You can
turn turn on this option which will make the above dump become:
sub { $a <=> $b }
view all matches for this distribution
view release on metacpan or search on metacpan
lib/Data/Dump/HTML/PopUp.pm view on Meta::CPAN
Bool, default: 0.
If set to 1, then pragmas at the start of coderef dump will be removed. Coderef
dump is produced by L<B::Deparse> and is of the form like:
sub { use feature 'current_sub', 'evalbytes', 'fc', 'say', 'state', 'switch', 'unicode_strings', 'unicode_eval'; $a <=> $b }
If you want to dump short coderefs, the pragmas might be distracting. You can
turn turn on this option which will make the above dump become:
sub { $a <=> $b }
view all matches for this distribution
view release on metacpan or search on metacpan
t/00-compile.t
t/dd.t
t/dump.t
t/eval.t
t/glob.t
t/quote-unicode.t
t/quote.t
t/ref-php.t
t/ref.t
t/regexp.t
t/release-pod-coverage.t
view all matches for this distribution