1 | % $Id$ |
---|
2 | |
---|
3 | \section{Presentation} |
---|
4 | |
---|
5 | \begin{frame} |
---|
6 | \frametitle{PERL} |
---|
7 | \begin{block}{} |
---|
8 | Perl, écrit par Larry Wall en 1987. |
---|
9 | \pause |
---|
10 | |
---|
11 | Perl 5.10 maintenu par Rafael Garcia-Suarez |
---|
12 | \pause |
---|
13 | |
---|
14 | Dernière version: 5.10.0 |
---|
15 | \end{block} |
---|
16 | \pause |
---|
17 | \vfill |
---|
18 | \begin{block}{PERL ne signifie rien} |
---|
19 | \emph{Practical Extraction and Report Language} |
---|
20 | (\emph{langage pratique d'extraction et de génération de rapports}) |
---|
21 | |
---|
22 | \textbf{ou} |
---|
23 | |
---|
24 | \emph{Pathetically Eclectic Rubbish Lister} |
---|
25 | (\emph{collectionneur de déchets pathétiquement éclectiques}) |
---|
26 | \end{block} |
---|
27 | \pause |
---|
28 | \vfill |
---|
29 | |
---|
30 | \begin{alertblock}{Perl 5 !} |
---|
31 | Perl 6 sera très différent |
---|
32 | \end{alertblock} |
---|
33 | \end{frame} |
---|
34 | |
---|
35 | \begin{frame} |
---|
36 | \frametitle{Pourquoi PERL ?} |
---|
37 | \begin{itemize} |
---|
38 | \item langage scripté, non compilé |
---|
39 | \pause |
---|
40 | \item gestion de la mémoire dynamique et automatique |
---|
41 | \pause |
---|
42 | \item portable (existe sous Unix*, Windows, OS/2, VMS\ldots) |
---|
43 | \pause |
---|
44 | \item est orienté objet |
---|
45 | \pause |
---|
46 | \item possède un grand nombre de modules additionnels |
---|
47 | \pause |
---|
48 | \item est très documenté |
---|
49 | \pause |
---|
50 | \item la communauté perl est conviviale |
---|
51 | \end{itemize} |
---|
52 | \pause |
---|
53 | \vfill |
---|
54 | Utilisation: |
---|
55 | \begin{itemize} |
---|
56 | \item petits scripts type shell |
---|
57 | \pause |
---|
58 | \item des programmes complexes |
---|
59 | \pause |
---|
60 | \item des services de toutes sortes |
---|
61 | \pause |
---|
62 | \item des sites web |
---|
63 | \item \ldots |
---|
64 | \end{itemize} |
---|
65 | \end{frame} |
---|
66 | |
---|
67 | \begin{frame}[fragile] |
---|
68 | \frametitle{Exemples} |
---|
69 | \begin{exampleblock}{Exemple de script:} |
---|
70 | \begin{verbatim} |
---|
71 | #!env perl |
---|
72 | |
---|
73 | print "Hello World\n"; |
---|
74 | \end{verbatim} |
---|
75 | \end{exampleblock} |
---|
76 | \pause |
---|
77 | \vfill |
---|
78 | \begin{exampleblock}{One-liner} |
---|
79 | \verb+perl -e 'print "Hello World\n"'+ |
---|
80 | \end{exampleblock} |
---|
81 | \end{frame} |
---|
82 | |
---|
83 | \begin{frame}[fragile] |
---|
84 | \frametitle{Obfusacte perl} |
---|
85 | Sinon ça peut aussi ressembler à ça: |
---|
86 | \vfill |
---|
87 | \begin{exampleblock}{bestever.pl de Philippe Bruhat (Book)} |
---|
88 | \begin{tiny} |
---|
89 | \begin{verbatim} |
---|
90 | /;{}def/#{def}def/$_={/Times-Bold exch selectfont}#/_{rmoveto}#/"{dup}#/*/!/$ |
---|
91 | ;/q{exch}#/x ; {/J q #}#/.{/T q #}#{stringwidth}#{}#{}# 14 string dup dup dup |
---|
92 | 260 40 moveto 90 rotate ; %/}};$0='"\e[7m \e[0m"';@ARGV=split//,reverse |
---|
93 | q(ThePerl). q(Journal) x 220 ; q ; 0 T putinterval exch 7 J putinterval ; |
---|
94 | ; $_= q /m$ pop T($*!$"=!$ " )pop " * true% ? $ " $!" " !! !! % !" !" ! |
---|
95 | ! charpath {!"""}pop $ pop{""!}pop ! neg{!#}pop 220 ! neg _{!!}pop J false %T |
---|
96 | charpath clip " pop 0 " moveto 6{!!}pop $_= 105{!!}pop {$ ! $ " ! #! ##} |
---|
97 | pop{dup dup $ ! " pop pop q{"}pop 22{dup show}repeat {"}pop q 22 mul{$ "} pop |
---|
98 | neg{!#! $ "}pop ! 8 .65 mul{$ # # $}pop ! neg{"}pop _ pop{"}pop } repeat pop |
---|
99 | " { $ " ! ! ! $ " ! !" "#" #"!"""""! #" " # "m/;@ARGV=(@ARGV[-14..-1])x50;q} |
---|
100 | 0 "%};s/m[ou]|[-\dA-ln-z.\n_{}]|\$_=//gx;s/(.)(?{$*=''})/('$*.='.(++$# |
---|
101 | %2?'':"$0;").'pop;')x(ord($1)-31).'$*'/gee;s/((.(\e\[.m)*|.){77})/$1\n/g;print |
---|
102 | ; sub showpage {} |
---|
103 | \end{verbatim} |
---|
104 | \end{tiny} |
---|
105 | \end{exampleblock} |
---|
106 | \end{frame} |
---|
107 | |
---|