view release on metacpan or search on metacpan
#layout: "main"
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/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: "HtmlTemplate"
engines:
HtmlTemplate:
view all matches for this distribution
view release on metacpan or search on metacpan
lib/Dancer/Plugin/Database/Core.pm view on Meta::CPAN
my $auto_utf8 = exists $settings->{auto_utf8} ? $settings->{auto_utf8} : 1;
if (lc $app_charset eq 'utf-8' && $auto_utf8) {
# The option to pass to the DBI->connect call depends on the driver:
my %param_for_driver = (
SQLite => 'sqlite_unicode',
mysql => 'mysql_enable_utf8',
Pg => 'pg_enable_utf8',
);
my $param = $param_for_driver{$driver};
view all matches for this distribution
view release on metacpan or search on metacpan
share/debugtoolbar/js/prettify/lang-vb.js view on Meta::CPAN
PR.registerLangHandler(PR.createSimpleLexer([["pln",/^[\t\n\r \xa0\u2028\u2029]+/,null,"\t\n\r Â\xa0â¨â©"],["str",/^(?:["\u201c\u201d](?:[^"\u201c\u201d]|["\u201c\u201d]{2})(?:["\u201c\u201d]c|$)|["\u201c\u201d](?:[^"\u201c\u201d]|["\u201c\u201d]{2...
null],["com",/^rem.*/i],["lit",/^(?:true\b|false\b|nothing\b|\d+(?:e[+-]?\d+[dfr]?|[dfilrs])?|(?:&h[\da-f]+|&o[0-7]+)[ils]?|\d*\.\d+(?:e[+-]?\d+)?[dfr]?|#\s+(?:\d+[/-]\d+[/-]\d+(?:\s+\d+:\d+(?::\d+)?(\s*(?:am|pm))?)?|\d+:\d+(?::\d+)?(\s*(?:am|pm))?)\...
view all matches for this distribution
view release on metacpan or search on metacpan
Example.pod 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
examples/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/Dancer/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
t/disabled_cart_and_checkout.t view on Meta::CPAN
schema_class => 'Interchange6::Schema',
connect_info => [
"dbi:SQLite:dbname=:memory:",
undef, undef,
{
sqlite_unicode => 1,
on_connect_call => 'use_foreign_keys',
on_connect_do => 'PRAGMA synchronous = OFF',
quote_names => 1,
}
]
view all matches for this distribution
view release on metacpan or search on metacpan
t/lib/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/Dancer/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
t/lib/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
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/TestApp.pm view on Meta::CPAN
post '/form' => sub {
params->{foo};
};
get '/unicode' => sub {
"cyrillic shcha \x{0429}",
};
get '/forward_to_unavailable_route' => sub {
forward "/some_route_that_does_not_exist"
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