SlideShare uma empresa Scribd logo
1 de 48
YAPC::Tiny
             Thanks for Coming!




tags: yapctiny, taichung   #chupei.pm freenode
Today’s Talks
    gugod                                /   Perl
 nothingmuch        1. Try::Tiny, 2.Continuation::Delimited
    shelling       Beautify code through extending module
      Ijs                        Jifty
     clkao                    Trading with Perl
    ihower             key-value store (TokyoCabinet)
St. Keven (zard)
    imacat


    penkia


    BlueT
      c9s
long long time_t ago ...
shell script




ps -e | wc | expand | sed
-e s/    /:/g | awk -
F":" '{ print $2 }'
Larry Wall
Father of Perl
Just Perl It!




  Larry Wall
Father of Perl
!$@%&*




  Larry Wall
Father of Perl
Version      Date
1.000     1987-Dec-18
2.000     1988-Jun-05
3.000     1989-Oct-18
4.000     1991-Mar-21
5.000     1994-Oct-17
 5.6.0    1995-Mar-13
 5.8.0     2002-Jul-18
 5.9.0    2003-Oct-27
5.10.0    2007-Dec-18
5.10.1    2009-Aug-22
Version      Date
      1.000     1987-Dec-18
      2.000     1988-Jun-05
      3.000     1989-Oct-18
      4.000     1991-Mar-21
      5.000     1994-Oct-17
       5.6.0    1995-Mar-13
       5.8.0     2002-Jul-18
       5.9.0    2003-Oct-27
20y   5.10.0    2007-Dec-18
      5.10.1    2009-Aug-22
Perl 5: The Big Nouns
•   Compatibility   •   Maintainability

•   Extensibility   •   Portability

•   Usability       •   Responsibility

•   Reusability     •   Embeddibility

•   Readability     •   Respectability?

•   Scalability
Perl 6
@a »+« @b
• pugs http://pugscode.org
• rakudo http://rakudo.org/
Modern Perl
    Perl5
Modern Sense
Best Practices
Damian
Conway
Damian
Conway
Clear Semantic
  Trivial to Understand
Moose




Postmodern OO /
package Point;
use Moose;

has 'x' => (is => 'rw', isa => 'Int');
has 'y' => (is => 'rw', isa => 'Int');

sub clear {
  my $self = shift;
  $self->x(0);
  $self->y(0);
}
package Point3D;
use Moose;

extends 'Point';

has 'z' => (is => 'rw', isa => 'Int');

after 'clear' => sub {
   my $self = shift;
   $self->z(0);
};
package Point3D;
use Moose;

extends 'Point';

has 'z' => (is => 'rw', isa => 'Int');

after 'clear' => sub {
   my $self = shift;
   $self->z(0);
};
package Point3D;
use Moose;

extends 'Point';

has 'z' => (is => 'rw', isa => 'Int');

after 'clear' => sub {
   my $self = shift;
   $self->z(0);
};
package Point3D;
use Moose;

extends 'Point';

has 'z' => (is => 'rw', isa => 'Int');

after 'clear' => sub {
   my $self = shift;
   $self->z(0);
};
use MooseX::Declare;

class Point {
   has 'x' => (is => 'rw', isa => 'Int');
   has 'y' => (is => 'rw', isa => 'Int');

    method clear {
      $self->x(0);
      $self->y(0);
    }
}
Extendibility
Self-Modifying Perl
App->start {
    say "Hello";
 };


Not-really valid Perl5
App->start(sub {
    say "Hello";
});


   Valid Perl5
WHY ?


•   / Augmented Syntax

•   / Extended Semantic
As a modern Perl
 programmer...
        Perl
We Learn Perl
We Learn Perl
We Write Perl
perl -MTime::JulianDay -lwe'@r=reverse(M=>(0)x99=>CM=>(0)x399=>D=>(0)x99=>CD=>(
0)x299=>C=>(0)x9=>XC=>(0)x39=>L=>(0)x9=>XL=>(0)x29=>X=>IX=>0=>0=>0=>V=>IV=
>0=>0
=>I=>$==-2449231+gm_julian_day+time);do{until($=<$#r){$_.=$r[$#r];$=-=$#r}for(;
!$r[--$#r];){}}while$=;$,="x20";print+$_=>September=>MCMXCIII=>=>=>=>=>=>=>=>'
#!/usr/bin/perl -w                   # camel code
use strict;

                                $_='ev
                             al("seek040D
         ATA,0,              0;");foreach(1..3)
      {<DATA>;}my                @camel1hump;my$camel;
  my$Camel ;while(              <DATA>){$_=sprintf("%-6
9s",$_);my@dromedary               1=split(//);if(defined($
_=<DATA>)){@camel1hum                p=split(//);}while(@dromeda
 ry1){my$camel1hump=0             ;my$CAMEL=3;if(defined($_=shif
       t(@dromedary1 ))&&/S/){$camel1hump+=1<<$CAMEL;}
      $CAMEL--;if(d efined($_=shift(@dromedary1))&&/S/){
     $camel1hump+=1 <<$CAMEL;}$CAMEL--;if(defined($_=shift(
    @camel1hump))&&/S/){$camel1hump+=1<<$CAMEL;}$CAMEL--;if(
    defined($_=shift(@camel1hump))&&/S/){$camel1hump+=1<<$CAME
    L;;}$camel.=(split(//,"040..m`{/J047134}L^7FX"))[$camel1h
     ump];}$camel.="n";}@camel1hump=split(/n/,$camel);foreach(@
     camel1hump){chomp;$Camel=$_;y/LJF7173175`047/061062063
     064065066067070/;y/12345678/JL7F175173047`/;$_=reverse;
      print"$_040$Cameln";}foreach(@camel1hump){chomp;$Camel=$_;y
       /LJF7173175`047/12345678/;y/12345678/JL7F1751730 47`/;
        $_=reverse;print"040$_$Cameln";}';;s/s*//g;;eval; eval
         ("seek040DATA,0,0;");undef$/;$_=<DATA>;s/s*//g;( );;s
           ;^.*_;;;map{eval"print"$_"";}/.{4}/g; __DATA__ 124
             1 501450401651631450401571 460401 410
                40143141 1551451 540401 51155 141
                1471450 40151156 040141 16316 3
                 157143 15114116 41511              57156
                 040167 1511641 50040              1201
                 45162 15404015 1163               04014
                 10401 641621          41144        145
                 15514 1162          15304         0157
                  146   04011       7047         1221
                  4515     11541 54171             040
                  046       01210116             316
                  315        714315             114
                  116         4145163            054
                 040         11115614           3056
                040       12516314514             4040
                1671       511641 500            40160
               145162                       155151
              163163                        1511
            57156056
We Promote Perl
    http://www.pm.org/
   http://chupei.pm.org/
We Rock Perl
       YAPC 10 years
      http://yapc.org/
 http://yapc.asia/ (     )
We Extend Perl
We &heart; Perl
We &heart; Perl
Thanks for Listening

Mais conteúdo relacionado

Mais procurados

I, For One, Welcome Our New Perl6 Overlords
I, For One, Welcome Our New Perl6 OverlordsI, For One, Welcome Our New Perl6 Overlords
I, For One, Welcome Our New Perl6 Overlordsheumann
 
Good Evils In Perl
Good Evils In PerlGood Evils In Perl
Good Evils In PerlKang-min Liu
 
Vim Script Programming
Vim Script ProgrammingVim Script Programming
Vim Script ProgrammingLin Yo-An
 
Discovering functional treasure in idiomatic Groovy
Discovering functional treasure in idiomatic GroovyDiscovering functional treasure in idiomatic Groovy
Discovering functional treasure in idiomatic GroovyNaresha K
 
PHPerのためのPerl入門@ Kansai.pm#12
PHPerのためのPerl入門@ Kansai.pm#12PHPerのためのPerl入門@ Kansai.pm#12
PHPerのためのPerl入門@ Kansai.pm#12Kazuki KOMORI
 
Modern Getopt for Command Line Processing in Perl
Modern Getopt for Command Line Processing in PerlModern Getopt for Command Line Processing in Perl
Modern Getopt for Command Line Processing in PerlNova Patch
 
Rubinius - A Tool of the Future
Rubinius - A Tool of the FutureRubinius - A Tool of the Future
Rubinius - A Tool of the Futureevanphx
 
The promise of asynchronous php
The promise of asynchronous phpThe promise of asynchronous php
The promise of asynchronous phpWim Godden
 
Good Evils In Perl (Yapc Asia)
Good Evils In Perl (Yapc Asia)Good Evils In Perl (Yapc Asia)
Good Evils In Perl (Yapc Asia)Kang-min Liu
 
Crystal: Fundamentos, objetivos y desafios - Cacic 2019
Crystal: Fundamentos, objetivos y desafios - Cacic 2019Crystal: Fundamentos, objetivos y desafios - Cacic 2019
Crystal: Fundamentos, objetivos y desafios - Cacic 2019Brian Cardiff
 
Happy Go Programming
Happy Go ProgrammingHappy Go Programming
Happy Go ProgrammingLin Yo-An
 

Mais procurados (19)

Perl dancer
Perl dancerPerl dancer
Perl dancer
 
I, For One, Welcome Our New Perl6 Overlords
I, For One, Welcome Our New Perl6 OverlordsI, For One, Welcome Our New Perl6 Overlords
I, For One, Welcome Our New Perl6 Overlords
 
Perl Moderno
Perl ModernoPerl Moderno
Perl Moderno
 
Good Evils In Perl
Good Evils In PerlGood Evils In Perl
Good Evils In Perl
 
Vim Script Programming
Vim Script ProgrammingVim Script Programming
Vim Script Programming
 
Vim Hacks
Vim HacksVim Hacks
Vim Hacks
 
Follow the White Rabbit - Message Queues with PHP
Follow the White Rabbit - Message Queues with PHPFollow the White Rabbit - Message Queues with PHP
Follow the White Rabbit - Message Queues with PHP
 
Discovering functional treasure in idiomatic Groovy
Discovering functional treasure in idiomatic GroovyDiscovering functional treasure in idiomatic Groovy
Discovering functional treasure in idiomatic Groovy
 
Shell Script
Shell ScriptShell Script
Shell Script
 
Ruby 1.9
Ruby 1.9Ruby 1.9
Ruby 1.9
 
PHPerのためのPerl入門@ Kansai.pm#12
PHPerのためのPerl入門@ Kansai.pm#12PHPerのためのPerl入門@ Kansai.pm#12
PHPerのためのPerl入門@ Kansai.pm#12
 
Modern Getopt for Command Line Processing in Perl
Modern Getopt for Command Line Processing in PerlModern Getopt for Command Line Processing in Perl
Modern Getopt for Command Line Processing in Perl
 
Perl 6 by example
Perl 6 by examplePerl 6 by example
Perl 6 by example
 
Rubinius - A Tool of the Future
Rubinius - A Tool of the FutureRubinius - A Tool of the Future
Rubinius - A Tool of the Future
 
Unix shell scripting
Unix shell scriptingUnix shell scripting
Unix shell scripting
 
The promise of asynchronous php
The promise of asynchronous phpThe promise of asynchronous php
The promise of asynchronous php
 
Good Evils In Perl (Yapc Asia)
Good Evils In Perl (Yapc Asia)Good Evils In Perl (Yapc Asia)
Good Evils In Perl (Yapc Asia)
 
Crystal: Fundamentos, objetivos y desafios - Cacic 2019
Crystal: Fundamentos, objetivos y desafios - Cacic 2019Crystal: Fundamentos, objetivos y desafios - Cacic 2019
Crystal: Fundamentos, objetivos y desafios - Cacic 2019
 
Happy Go Programming
Happy Go ProgrammingHappy Go Programming
Happy Go Programming
 

Destaque

SQL Server Managing Test Data & Stress Testing January 2011
SQL Server Managing Test Data & Stress Testing January 2011SQL Server Managing Test Data & Stress Testing January 2011
SQL Server Managing Test Data & Stress Testing January 2011Mark Ginnebaugh
 
perlbrew yapcasia 2010
perlbrew yapcasia 2010perlbrew yapcasia 2010
perlbrew yapcasia 2010Kang-min Liu
 
Same but Different
Same but DifferentSame but Different
Same but DifferentKang-min Liu
 
Elasticsearch 實戰介紹
Elasticsearch 實戰介紹Elasticsearch 實戰介紹
Elasticsearch 實戰介紹Kang-min Liu
 

Destaque (7)

Ppoint blog
Ppoint blogPpoint blog
Ppoint blog
 
Git
GitGit
Git
 
SQL Server Managing Test Data & Stress Testing January 2011
SQL Server Managing Test Data & Stress Testing January 2011SQL Server Managing Test Data & Stress Testing January 2011
SQL Server Managing Test Data & Stress Testing January 2011
 
Perlbrew
PerlbrewPerlbrew
Perlbrew
 
perlbrew yapcasia 2010
perlbrew yapcasia 2010perlbrew yapcasia 2010
perlbrew yapcasia 2010
 
Same but Different
Same but DifferentSame but Different
Same but Different
 
Elasticsearch 實戰介紹
Elasticsearch 實戰介紹Elasticsearch 實戰介紹
Elasticsearch 實戰介紹
 

Semelhante a YAPC::Tiny Introduction

What's new in Perl 5.10?
What's new in Perl 5.10?What's new in Perl 5.10?
What's new in Perl 5.10?acme
 
2016年のPerl (Long version)
2016年のPerl (Long version)2016年のPerl (Long version)
2016年のPerl (Long version)charsbar
 
The $path to knowledge: What little it take to unit-test Perl.
The $path to knowledge: What little it take to unit-test Perl.The $path to knowledge: What little it take to unit-test Perl.
The $path to knowledge: What little it take to unit-test Perl.Workhorse Computing
 
Cleanliness is Next to Domain-Specificity
Cleanliness is Next to Domain-SpecificityCleanliness is Next to Domain-Specificity
Cleanliness is Next to Domain-SpecificityBen Scofield
 
Cleanliness is Next to Domain-Specificity
Cleanliness is Next to Domain-SpecificityCleanliness is Next to Domain-Specificity
Cleanliness is Next to Domain-SpecificityViget Labs
 
Whatsnew in-perl
Whatsnew in-perlWhatsnew in-perl
Whatsnew in-perldaoswald
 
Perl - laziness, impatience, hubris, and one liners
Perl - laziness, impatience, hubris, and one linersPerl - laziness, impatience, hubris, and one liners
Perl - laziness, impatience, hubris, and one linersKirk Kimmel
 
Dealing with Legacy Perl Code - Peter Scott
Dealing with Legacy Perl Code - Peter ScottDealing with Legacy Perl Code - Peter Scott
Dealing with Legacy Perl Code - Peter ScottO'Reilly Media
 
Performance Wins with BPF: Getting Started
Performance Wins with BPF: Getting StartedPerformance Wins with BPF: Getting Started
Performance Wins with BPF: Getting StartedBrendan Gregg
 
Migrating To Ruby1.9
Migrating To Ruby1.9Migrating To Ruby1.9
Migrating To Ruby1.9tomaspavelka
 
Being functional in PHP (PHPDay Italy 2016)
Being functional in PHP (PHPDay Italy 2016)Being functional in PHP (PHPDay Italy 2016)
Being functional in PHP (PHPDay Italy 2016)David de Boer
 
Anacronia on speed
Anacronia on speedAnacronia on speed
Anacronia on speedmfontani
 
Actor Concurrency
Actor ConcurrencyActor Concurrency
Actor ConcurrencyAlex Miller
 
What's new in Puppet 3.0
What's new in Puppet 3.0What's new in Puppet 3.0
What's new in Puppet 3.0Eric Sorenson
 
Regular Expressions: Backtracking, and The Little Engine that Could(n't)?
Regular Expressions: Backtracking, and The Little Engine that Could(n't)?Regular Expressions: Backtracking, and The Little Engine that Could(n't)?
Regular Expressions: Backtracking, and The Little Engine that Could(n't)?daoswald
 
Yapc::NA::2009 - Command Line Perl
Yapc::NA::2009 - Command Line PerlYapc::NA::2009 - Command Line Perl
Yapc::NA::2009 - Command Line PerlBruce Gray
 

Semelhante a YAPC::Tiny Introduction (20)

What's new in Perl 5.10?
What's new in Perl 5.10?What's new in Perl 5.10?
What's new in Perl 5.10?
 
2016年のPerl (Long version)
2016年のPerl (Long version)2016年のPerl (Long version)
2016年のPerl (Long version)
 
The $path to knowledge: What little it take to unit-test Perl.
The $path to knowledge: What little it take to unit-test Perl.The $path to knowledge: What little it take to unit-test Perl.
The $path to knowledge: What little it take to unit-test Perl.
 
Cleanliness is Next to Domain-Specificity
Cleanliness is Next to Domain-SpecificityCleanliness is Next to Domain-Specificity
Cleanliness is Next to Domain-Specificity
 
Cleanliness is Next to Domain-Specificity
Cleanliness is Next to Domain-SpecificityCleanliness is Next to Domain-Specificity
Cleanliness is Next to Domain-Specificity
 
Perl basics for Pentesters
Perl basics for PentestersPerl basics for Pentesters
Perl basics for Pentesters
 
Whatsnew in-perl
Whatsnew in-perlWhatsnew in-perl
Whatsnew in-perl
 
Modern Perl
Modern PerlModern Perl
Modern Perl
 
Perl - laziness, impatience, hubris, and one liners
Perl - laziness, impatience, hubris, and one linersPerl - laziness, impatience, hubris, and one liners
Perl - laziness, impatience, hubris, and one liners
 
Bash tricks
Bash tricksBash tricks
Bash tricks
 
Dealing with Legacy Perl Code - Peter Scott
Dealing with Legacy Perl Code - Peter ScottDealing with Legacy Perl Code - Peter Scott
Dealing with Legacy Perl Code - Peter Scott
 
Performance Wins with BPF: Getting Started
Performance Wins with BPF: Getting StartedPerformance Wins with BPF: Getting Started
Performance Wins with BPF: Getting Started
 
Migrating To Ruby1.9
Migrating To Ruby1.9Migrating To Ruby1.9
Migrating To Ruby1.9
 
Being functional in PHP (PHPDay Italy 2016)
Being functional in PHP (PHPDay Italy 2016)Being functional in PHP (PHPDay Italy 2016)
Being functional in PHP (PHPDay Italy 2016)
 
Anacronia on speed
Anacronia on speedAnacronia on speed
Anacronia on speed
 
Actor Concurrency
Actor ConcurrencyActor Concurrency
Actor Concurrency
 
What's new in Puppet 3.0
What's new in Puppet 3.0What's new in Puppet 3.0
What's new in Puppet 3.0
 
Regular Expressions: Backtracking, and The Little Engine that Could(n't)?
Regular Expressions: Backtracking, and The Little Engine that Could(n't)?Regular Expressions: Backtracking, and The Little Engine that Could(n't)?
Regular Expressions: Backtracking, and The Little Engine that Could(n't)?
 
Yapc::NA::2009 - Command Line Perl
Yapc::NA::2009 - Command Line PerlYapc::NA::2009 - Command Line Perl
Yapc::NA::2009 - Command Line Perl
 
Perl Presentation
Perl PresentationPerl Presentation
Perl Presentation
 

Mais de Kang-min Liu

The architecture of search engines in Booking.com
The architecture of search engines in Booking.comThe architecture of search engines in Booking.com
The architecture of search engines in Booking.comKang-min Liu
 
Integration Test With Cucumber And Webrat
Integration Test With Cucumber And WebratIntegration Test With Cucumber And Webrat
Integration Test With Cucumber And WebratKang-min Liu
 
Javascript Tutorial
Javascript TutorialJavascript Tutorial
Javascript TutorialKang-min Liu
 
Handlino - RandomLife
Handlino - RandomLifeHandlino - RandomLife
Handlino - RandomLifeKang-min Liu
 
網頁程式還可以怎麼設計
網頁程式還可以怎麼設計網頁程式還可以怎麼設計
網頁程式還可以怎麼設計Kang-min Liu
 
OSDC.tw 2008 Lightening Talk
OSDC.tw 2008 Lightening TalkOSDC.tw 2008 Lightening Talk
OSDC.tw 2008 Lightening TalkKang-min Liu
 
Happy Designer 20080329
Happy Designer 20080329Happy Designer 20080329
Happy Designer 20080329Kang-min Liu
 

Mais de Kang-min Liu (11)

o̍h Tai-gi
o̍h Tai-gio̍h Tai-gi
o̍h Tai-gi
 
The architecture of search engines in Booking.com
The architecture of search engines in Booking.comThe architecture of search engines in Booking.com
The architecture of search engines in Booking.com
 
Integration Test With Cucumber And Webrat
Integration Test With Cucumber And WebratIntegration Test With Cucumber And Webrat
Integration Test With Cucumber And Webrat
 
Javascript Tutorial
Javascript TutorialJavascript Tutorial
Javascript Tutorial
 
Javascript Basic
Javascript BasicJavascript Basic
Javascript Basic
 
Handlino - RandomLife
Handlino - RandomLifeHandlino - RandomLife
Handlino - RandomLife
 
Jformino
JforminoJformino
Jformino
 
Test Continuous
Test ContinuousTest Continuous
Test Continuous
 
網頁程式還可以怎麼設計
網頁程式還可以怎麼設計網頁程式還可以怎麼設計
網頁程式還可以怎麼設計
 
OSDC.tw 2008 Lightening Talk
OSDC.tw 2008 Lightening TalkOSDC.tw 2008 Lightening Talk
OSDC.tw 2008 Lightening Talk
 
Happy Designer 20080329
Happy Designer 20080329Happy Designer 20080329
Happy Designer 20080329
 

Último

Market Sizes Sample Report - 2024 Edition
Market Sizes Sample Report - 2024 EditionMarket Sizes Sample Report - 2024 Edition
Market Sizes Sample Report - 2024 EditionMintel Group
 
8447779800, Low rate Call girls in Saket Delhi NCR
8447779800, Low rate Call girls in Saket Delhi NCR8447779800, Low rate Call girls in Saket Delhi NCR
8447779800, Low rate Call girls in Saket Delhi NCRashishs7044
 
Ten Organizational Design Models to align structure and operations to busines...
Ten Organizational Design Models to align structure and operations to busines...Ten Organizational Design Models to align structure and operations to busines...
Ten Organizational Design Models to align structure and operations to busines...Seta Wicaksana
 
8447779800, Low rate Call girls in Tughlakabad Delhi NCR
8447779800, Low rate Call girls in Tughlakabad Delhi NCR8447779800, Low rate Call girls in Tughlakabad Delhi NCR
8447779800, Low rate Call girls in Tughlakabad Delhi NCRashishs7044
 
8447779800, Low rate Call girls in Shivaji Enclave Delhi NCR
8447779800, Low rate Call girls in Shivaji Enclave Delhi NCR8447779800, Low rate Call girls in Shivaji Enclave Delhi NCR
8447779800, Low rate Call girls in Shivaji Enclave Delhi NCRashishs7044
 
Organizational Structure Running A Successful Business
Organizational Structure Running A Successful BusinessOrganizational Structure Running A Successful Business
Organizational Structure Running A Successful BusinessSeta Wicaksana
 
NewBase 19 April 2024 Energy News issue - 1717 by Khaled Al Awadi.pdf
NewBase  19 April  2024  Energy News issue - 1717 by Khaled Al Awadi.pdfNewBase  19 April  2024  Energy News issue - 1717 by Khaled Al Awadi.pdf
NewBase 19 April 2024 Energy News issue - 1717 by Khaled Al Awadi.pdfKhaled Al Awadi
 
FULL ENJOY Call girls in Paharganj Delhi | 8377087607
FULL ENJOY Call girls in Paharganj Delhi | 8377087607FULL ENJOY Call girls in Paharganj Delhi | 8377087607
FULL ENJOY Call girls in Paharganj Delhi | 8377087607dollysharma2066
 
Memorándum de Entendimiento (MoU) entre Codelco y SQM
Memorándum de Entendimiento (MoU) entre Codelco y SQMMemorándum de Entendimiento (MoU) entre Codelco y SQM
Memorándum de Entendimiento (MoU) entre Codelco y SQMVoces Mineras
 
Innovation Conference 5th March 2024.pdf
Innovation Conference 5th March 2024.pdfInnovation Conference 5th March 2024.pdf
Innovation Conference 5th March 2024.pdfrichard876048
 
8447779800, Low rate Call girls in Kotla Mubarakpur Delhi NCR
8447779800, Low rate Call girls in Kotla Mubarakpur Delhi NCR8447779800, Low rate Call girls in Kotla Mubarakpur Delhi NCR
8447779800, Low rate Call girls in Kotla Mubarakpur Delhi NCRashishs7044
 
Annual General Meeting Presentation Slides
Annual General Meeting Presentation SlidesAnnual General Meeting Presentation Slides
Annual General Meeting Presentation SlidesKeppelCorporation
 
International Business Environments and Operations 16th Global Edition test b...
International Business Environments and Operations 16th Global Edition test b...International Business Environments and Operations 16th Global Edition test b...
International Business Environments and Operations 16th Global Edition test b...ssuserf63bd7
 
Financial-Statement-Analysis-of-Coca-cola-Company.pptx
Financial-Statement-Analysis-of-Coca-cola-Company.pptxFinancial-Statement-Analysis-of-Coca-cola-Company.pptx
Financial-Statement-Analysis-of-Coca-cola-Company.pptxsaniyaimamuddin
 
Call Us 📲8800102216📞 Call Girls In DLF City Gurgaon
Call Us 📲8800102216📞 Call Girls In DLF City GurgaonCall Us 📲8800102216📞 Call Girls In DLF City Gurgaon
Call Us 📲8800102216📞 Call Girls In DLF City Gurgaoncallgirls2057
 
Traction part 2 - EOS Model JAX Bridges.
Traction part 2 - EOS Model JAX Bridges.Traction part 2 - EOS Model JAX Bridges.
Traction part 2 - EOS Model JAX Bridges.Anamaria Contreras
 
The-Ethical-issues-ghhhhhhhhjof-Byjus.pptx
The-Ethical-issues-ghhhhhhhhjof-Byjus.pptxThe-Ethical-issues-ghhhhhhhhjof-Byjus.pptx
The-Ethical-issues-ghhhhhhhhjof-Byjus.pptxmbikashkanyari
 
Kenya’s Coconut Value Chain by Gatsby Africa
Kenya’s Coconut Value Chain by Gatsby AfricaKenya’s Coconut Value Chain by Gatsby Africa
Kenya’s Coconut Value Chain by Gatsby Africaictsugar
 
Chapter 9 PPT 4th edition.pdf internal audit
Chapter 9 PPT 4th edition.pdf internal auditChapter 9 PPT 4th edition.pdf internal audit
Chapter 9 PPT 4th edition.pdf internal auditNhtLNguyn9
 

Último (20)

Market Sizes Sample Report - 2024 Edition
Market Sizes Sample Report - 2024 EditionMarket Sizes Sample Report - 2024 Edition
Market Sizes Sample Report - 2024 Edition
 
8447779800, Low rate Call girls in Saket Delhi NCR
8447779800, Low rate Call girls in Saket Delhi NCR8447779800, Low rate Call girls in Saket Delhi NCR
8447779800, Low rate Call girls in Saket Delhi NCR
 
Ten Organizational Design Models to align structure and operations to busines...
Ten Organizational Design Models to align structure and operations to busines...Ten Organizational Design Models to align structure and operations to busines...
Ten Organizational Design Models to align structure and operations to busines...
 
8447779800, Low rate Call girls in Tughlakabad Delhi NCR
8447779800, Low rate Call girls in Tughlakabad Delhi NCR8447779800, Low rate Call girls in Tughlakabad Delhi NCR
8447779800, Low rate Call girls in Tughlakabad Delhi NCR
 
8447779800, Low rate Call girls in Shivaji Enclave Delhi NCR
8447779800, Low rate Call girls in Shivaji Enclave Delhi NCR8447779800, Low rate Call girls in Shivaji Enclave Delhi NCR
8447779800, Low rate Call girls in Shivaji Enclave Delhi NCR
 
Organizational Structure Running A Successful Business
Organizational Structure Running A Successful BusinessOrganizational Structure Running A Successful Business
Organizational Structure Running A Successful Business
 
NewBase 19 April 2024 Energy News issue - 1717 by Khaled Al Awadi.pdf
NewBase  19 April  2024  Energy News issue - 1717 by Khaled Al Awadi.pdfNewBase  19 April  2024  Energy News issue - 1717 by Khaled Al Awadi.pdf
NewBase 19 April 2024 Energy News issue - 1717 by Khaled Al Awadi.pdf
 
FULL ENJOY Call girls in Paharganj Delhi | 8377087607
FULL ENJOY Call girls in Paharganj Delhi | 8377087607FULL ENJOY Call girls in Paharganj Delhi | 8377087607
FULL ENJOY Call girls in Paharganj Delhi | 8377087607
 
Memorándum de Entendimiento (MoU) entre Codelco y SQM
Memorándum de Entendimiento (MoU) entre Codelco y SQMMemorándum de Entendimiento (MoU) entre Codelco y SQM
Memorándum de Entendimiento (MoU) entre Codelco y SQM
 
Innovation Conference 5th March 2024.pdf
Innovation Conference 5th March 2024.pdfInnovation Conference 5th March 2024.pdf
Innovation Conference 5th March 2024.pdf
 
8447779800, Low rate Call girls in Kotla Mubarakpur Delhi NCR
8447779800, Low rate Call girls in Kotla Mubarakpur Delhi NCR8447779800, Low rate Call girls in Kotla Mubarakpur Delhi NCR
8447779800, Low rate Call girls in Kotla Mubarakpur Delhi NCR
 
Annual General Meeting Presentation Slides
Annual General Meeting Presentation SlidesAnnual General Meeting Presentation Slides
Annual General Meeting Presentation Slides
 
International Business Environments and Operations 16th Global Edition test b...
International Business Environments and Operations 16th Global Edition test b...International Business Environments and Operations 16th Global Edition test b...
International Business Environments and Operations 16th Global Edition test b...
 
Financial-Statement-Analysis-of-Coca-cola-Company.pptx
Financial-Statement-Analysis-of-Coca-cola-Company.pptxFinancial-Statement-Analysis-of-Coca-cola-Company.pptx
Financial-Statement-Analysis-of-Coca-cola-Company.pptx
 
Call Us 📲8800102216📞 Call Girls In DLF City Gurgaon
Call Us 📲8800102216📞 Call Girls In DLF City GurgaonCall Us 📲8800102216📞 Call Girls In DLF City Gurgaon
Call Us 📲8800102216📞 Call Girls In DLF City Gurgaon
 
Japan IT Week 2024 Brochure by 47Billion (English)
Japan IT Week 2024 Brochure by 47Billion (English)Japan IT Week 2024 Brochure by 47Billion (English)
Japan IT Week 2024 Brochure by 47Billion (English)
 
Traction part 2 - EOS Model JAX Bridges.
Traction part 2 - EOS Model JAX Bridges.Traction part 2 - EOS Model JAX Bridges.
Traction part 2 - EOS Model JAX Bridges.
 
The-Ethical-issues-ghhhhhhhhjof-Byjus.pptx
The-Ethical-issues-ghhhhhhhhjof-Byjus.pptxThe-Ethical-issues-ghhhhhhhhjof-Byjus.pptx
The-Ethical-issues-ghhhhhhhhjof-Byjus.pptx
 
Kenya’s Coconut Value Chain by Gatsby Africa
Kenya’s Coconut Value Chain by Gatsby AfricaKenya’s Coconut Value Chain by Gatsby Africa
Kenya’s Coconut Value Chain by Gatsby Africa
 
Chapter 9 PPT 4th edition.pdf internal audit
Chapter 9 PPT 4th edition.pdf internal auditChapter 9 PPT 4th edition.pdf internal audit
Chapter 9 PPT 4th edition.pdf internal audit
 

YAPC::Tiny Introduction

  • 1. YAPC::Tiny Thanks for Coming! tags: yapctiny, taichung #chupei.pm freenode
  • 2. Today’s Talks gugod / Perl nothingmuch 1. Try::Tiny, 2.Continuation::Delimited shelling Beautify code through extending module Ijs Jifty clkao Trading with Perl ihower key-value store (TokyoCabinet) St. Keven (zard) imacat penkia BlueT c9s
  • 3.
  • 5. shell script ps -e | wc | expand | sed -e s/ /:/g | awk - F":" '{ print $2 }'
  • 6.
  • 8. Just Perl It! Larry Wall Father of Perl
  • 9. !$@%&* Larry Wall Father of Perl
  • 10. Version Date 1.000 1987-Dec-18 2.000 1988-Jun-05 3.000 1989-Oct-18 4.000 1991-Mar-21 5.000 1994-Oct-17 5.6.0 1995-Mar-13 5.8.0 2002-Jul-18 5.9.0 2003-Oct-27 5.10.0 2007-Dec-18 5.10.1 2009-Aug-22
  • 11. Version Date 1.000 1987-Dec-18 2.000 1988-Jun-05 3.000 1989-Oct-18 4.000 1991-Mar-21 5.000 1994-Oct-17 5.6.0 1995-Mar-13 5.8.0 2002-Jul-18 5.9.0 2003-Oct-27 20y 5.10.0 2007-Dec-18 5.10.1 2009-Aug-22
  • 12.
  • 13.
  • 14. Perl 5: The Big Nouns • Compatibility • Maintainability • Extensibility • Portability • Usability • Responsibility • Reusability • Embeddibility • Readability • Respectability? • Scalability
  • 16. • pugs http://pugscode.org • rakudo http://rakudo.org/
  • 17.
  • 18. Modern Perl Perl5
  • 21.
  • 24. Clear Semantic Trivial to Understand
  • 25.
  • 27. package Point; use Moose; has 'x' => (is => 'rw', isa => 'Int'); has 'y' => (is => 'rw', isa => 'Int'); sub clear { my $self = shift; $self->x(0); $self->y(0); }
  • 28. package Point3D; use Moose; extends 'Point'; has 'z' => (is => 'rw', isa => 'Int'); after 'clear' => sub { my $self = shift; $self->z(0); };
  • 29. package Point3D; use Moose; extends 'Point'; has 'z' => (is => 'rw', isa => 'Int'); after 'clear' => sub { my $self = shift; $self->z(0); };
  • 30. package Point3D; use Moose; extends 'Point'; has 'z' => (is => 'rw', isa => 'Int'); after 'clear' => sub { my $self = shift; $self->z(0); };
  • 31. package Point3D; use Moose; extends 'Point'; has 'z' => (is => 'rw', isa => 'Int'); after 'clear' => sub { my $self = shift; $self->z(0); };
  • 32. use MooseX::Declare; class Point { has 'x' => (is => 'rw', isa => 'Int'); has 'y' => (is => 'rw', isa => 'Int'); method clear { $self->x(0); $self->y(0); } }
  • 35. App->start { say "Hello"; }; Not-really valid Perl5
  • 36. App->start(sub { say "Hello"; }); Valid Perl5
  • 37. WHY ? • / Augmented Syntax • / Extended Semantic
  • 38. As a modern Perl programmer... Perl
  • 41. We Write Perl perl -MTime::JulianDay -lwe'@r=reverse(M=>(0)x99=>CM=>(0)x399=>D=>(0)x99=>CD=>( 0)x299=>C=>(0)x9=>XC=>(0)x39=>L=>(0)x9=>XL=>(0)x29=>X=>IX=>0=>0=>0=>V=>IV= >0=>0 =>I=>$==-2449231+gm_julian_day+time);do{until($=<$#r){$_.=$r[$#r];$=-=$#r}for(; !$r[--$#r];){}}while$=;$,="x20";print+$_=>September=>MCMXCIII=>=>=>=>=>=>=>=>'
  • 42. #!/usr/bin/perl -w # camel code use strict; $_='ev al("seek040D ATA,0, 0;");foreach(1..3) {<DATA>;}my @camel1hump;my$camel; my$Camel ;while( <DATA>){$_=sprintf("%-6 9s",$_);my@dromedary 1=split(//);if(defined($ _=<DATA>)){@camel1hum p=split(//);}while(@dromeda ry1){my$camel1hump=0 ;my$CAMEL=3;if(defined($_=shif t(@dromedary1 ))&&/S/){$camel1hump+=1<<$CAMEL;} $CAMEL--;if(d efined($_=shift(@dromedary1))&&/S/){ $camel1hump+=1 <<$CAMEL;}$CAMEL--;if(defined($_=shift( @camel1hump))&&/S/){$camel1hump+=1<<$CAMEL;}$CAMEL--;if( defined($_=shift(@camel1hump))&&/S/){$camel1hump+=1<<$CAME L;;}$camel.=(split(//,"040..m`{/J047134}L^7FX"))[$camel1h ump];}$camel.="n";}@camel1hump=split(/n/,$camel);foreach(@ camel1hump){chomp;$Camel=$_;y/LJF7173175`047/061062063 064065066067070/;y/12345678/JL7F175173047`/;$_=reverse; print"$_040$Cameln";}foreach(@camel1hump){chomp;$Camel=$_;y /LJF7173175`047/12345678/;y/12345678/JL7F1751730 47`/; $_=reverse;print"040$_$Cameln";}';;s/s*//g;;eval; eval ("seek040DATA,0,0;");undef$/;$_=<DATA>;s/s*//g;( );;s ;^.*_;;;map{eval"print"$_"";}/.{4}/g; __DATA__ 124 1 501450401651631450401571 460401 410 40143141 1551451 540401 51155 141 1471450 40151156 040141 16316 3 157143 15114116 41511 57156 040167 1511641 50040 1201 45162 15404015 1163 04014 10401 641621 41144 145 15514 1162 15304 0157 146 04011 7047 1221 4515 11541 54171 040 046 01210116 316 315 714315 114 116 4145163 054 040 11115614 3056 040 12516314514 4040 1671 511641 500 40160 145162 155151 163163 1511 57156056
  • 43. We Promote Perl http://www.pm.org/ http://chupei.pm.org/
  • 44. We Rock Perl YAPC 10 years http://yapc.org/ http://yapc.asia/ ( )