-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathcheetsheet
More file actions
90 lines (65 loc) · 1.65 KB
/
cheetsheet
File metadata and controls
90 lines (65 loc) · 1.65 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
# config
use YAML::Tiny;
my $conf = YAML::Tiny->read( "$binary_path/../etc/config.yml" )->[0];
#Postgres
use DBI;
my $dbname = ;
$dbh = DBI->connect(
"dbi:Pg:dbname=$dbname;host=$host;port=$port;",
$username,
$password,
{ RaiseError => 1 },
) or die "Cant connect to db!";
# SQlite
use DBI;
my $dbname = ;
$dbh = DBI->connect(
"dbi:SQLite:dbname=$dbname", '', '', { RaiseError => 1 },
# Foreign key constraints are disabled by default in sqlite
"PRAGMA foreign_keys = ON;"
) or die "Cant connect to db!";
# встроенные переменные
http://citforum.ru/internet/perl_tut/sysvar.shtml
# m{-?} операторы
http://blog.perl5doc.ru/perlfunc/2010/07/perlfunc-X.html
# ae http server
https://github.com/Mons/AnyEvent-HTTP-Server-II/blob/master/README
# XS
h2xs -n path::name -b 5.18.0
# TYPEMAP
http://perldoc.perl.org/perlxstypemap.html
# API
http://perldoc.perl.org/perlapi.html
# guts
http://perldoc.perl.org/perlguts.html
# xs
http://perldoc.perl.org/perlxs.html
# WEB
# селекторы
https://learn.javascript.ru/css-selectors
# Web::Query
use Web::Query;
https://metacpan.org/pod/Web::Query
#URI
use URI;
# dancer
dancer2 -a `project_name`
https://metacpan.org/pod/Dancer2
# CSRF
use Dancer2::Plugin::CSRF;
https://metacpan.org/pod/Dancer2::Plugin::CSRF
# HTML::Entities
use HTML::Entities;
https://metacpan.org/pod/HTML::Entities
#Make Maker
use ExtUtils::MakeMaker;
WriteMakefile(
NAME => 'path::name',
);
# Test::More
use Test::More tests => 26;
# crypt
use Digest::MD5 qw(md5_hex);
use Digest::CRC qw(crc32);
# todo
переопределение операторов