This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
sub render($$$) { | |
my ($self, $template, $tokens) = @_; | |
# in cases of different extensions we need to check | |
# samples: template 'index' vs template 'index.txt' | |
# template 'index' will be autoconverted to template 'index.tmpl' and | |
# template 'index.txt' to template 'index.txt.htm' without this fix. | |
# $template =~ s/\.[a-zA-Z0-9]+?$// if !ref($template) and !-f $template; | |
$template =~ s/\.\w+?$// if !ref($template) and !-f $template; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package Dancer::Plugin::Database::KISS; | |
use strict; | |
use Carp; | |
use DBI; | |
use base qw(DBI::db); | |
our $VERSION = '0.01'; | |
=head1 NAME |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!perl | |
use 5.014; | |
use warnings; | |
use lib::abs './Here-Template/lib'; | |
use Here::Template; | |
use Text::Xslate; | |
use Benchmark qw(cmpthese); | |
my %vpath = ( 'test.tx' => <<'XSLATETT' ); | |
Hello, my pid is <: $a :> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# I did a little patch, which shows Dancer routes in Padre's Function List. It's work fine for me. | |
# Any ideas about committing it to mainstream? | |
# pwd | |
# /usr/local/share/perl/5.14.2/Padre/Document/Perl | |
# =========================================================================== | |
# diff -c FunctionList.pm.orig FunctionList.pm | |
# =========================================================================== | |
*** FunctionList.pm.orig 2013-02-19 14:19:35.000000000 +0600 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Padre-Plugin-Dancer # perl Makefile.PL | |
include /root/padre/Padre-Plugin-Dancer/inc/Module/Install.pm | |
include inc/Module/Install/Metadata.pm | |
include inc/Module/Install/Base.pm | |
include inc/Module/Install/Makefile.pm | |
open(lib/Padre/Plugin/Catalyst/Util.pm): No such file or directory at (eval 11) line 3. | |
cd ../Padre-Plugin-Catalyst/ | |
# cpanm --installdeps . |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# mtr dobrohost.bitrix24.ru -r -c50 | |
HOST: kola-VirtualBox Loss% Snt Last Avg Best Wrst StDev | |
1.|-- WL-0018F3EF9376 0.0% 50 0.9 0.9 0.6 2.2 0.3 | |
2.|-- lo.bsr01.perm.ertelecom.r 74.0% 50 31376 30057 29065 31376 630.9 | |
3.|-- prm01.prm27.transtelecom. 0.0% 50 2.1 2.5 1.4 18.2 2.7 | |
4.|-- equinix01-iad2.amazon.com 0.0% 50 163.8 164.4 162.0 215.9 7.6 | |
5.|-- 72.21.220.53 0.0% 50 164.0 165.5 162.9 198.4 6.3 | |
6.|-- 205.251.245.65 0.0% 50 166.6 167.9 165.0 206.2 6.6 | |
7.|-- ??? 100.0 50 0.0 0.0 0.0 0.0 0.0 | |
8.|-- ??? 100.0 50 0.0 0.0 0.0 0.0 0.0 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# http://blogs.perl.org/users/joel_berger/2013/01/a-quick-static-file-webserver.html | |
# alias pws="plackup -MPlack::App::File -e 'Plack::App::File->new->to_app'" | |
# theory: directory requests (by that i assume directory indexes) would work if you s/File/Directory/g :) | |
#!/usr/bin/env perl | |
package Plack::App::IndexFile; | |
use parent 'Plack::App::File'; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
kola-VirtualBox src # tar xzf Dancer-Session-Cookie-0.17.tar.gz | |
kola-VirtualBox src # cd Dancer-Session-Cookie-0.17/ | |
kola-VirtualBox Dancer-Session-Cookie-0.17 # ls -l | |
total 60 | |
-rw-r--r-- 1 501 staff 1427 февр. 8 02:37 Changes | |
-rw-r--r-- 1 501 staff 405 февр. 8 02:37 dist.ini | |
drwxr-xr-x 3 501 staff 4096 февр. 15 04:46 lib | |
-rw-r--r-- 1 501 staff 18353 февр. 8 02:37 LICENSE | |
-rw-r--r-- 1 501 staff 1644 февр. 8 02:37 Makefile.PL | |
-rw-r--r-- 1 501 staff 399 февр. 8 02:37 MANIFEST |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
TTK: | |
My traceroute [v0.75] | |
K001 (0.0.0.0) Thu Feb 21 18:14:44 2013 | |
Keys: Help Display mode Restart statistics Order of fields quit | |
Packets Pings | |
Host Loss% Snt Last Avg Best Wrst StDev | |
1. ip-static-94-242-250-1.as5577.net 0.0% 173 0.3 2.5 0.2 63.9 9.5 | |
2. stnsl.lux.as5577.net 0.0% 173 0.2 14.0 0.2 213.3 38.2 | |
3. ic-root.lux.as5577.net 0.0% 173 0.3 1.8 0.3 166.2 13.1 | |
4. te3-2.r1.de.iptransit.com 0.0% 173 9.5 16.1 9.4 214.7 27.3 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Конфигурация 83.26 30 | |
Среднее время отклика 0.0120 0.0330 секунд | |
Процессор (CPU) 10.9 9.0 миллионов операций в секунду | |
Файловая система 14 776.2 10 000 файловых операций в секунду | |
Почтовая система 0.0011 0.0100 время отправки одного письма (в секундах) | |
Время старта сессии 0.0001 0.0002 секунд | |
Конфигурация PHP оптимально оптимально рекомендации | |
База данных MySQL (запись) 657 5 600 количество запросов на запись в секунду | |
База данных MySQL (чтение) 10 483 7 800 количество запросов на чтение в секунду | |
База данных MySQL (изменение) 658 5 800 количество запросов на изменение в секунду |
OlderNewer