Deploying Perl 6 - Pugs · 2008-10-05 · Pugs 6.2.12 •Released on June 26th •3x faster build...

149
Deploying Perl 6 Audrey Tang 1

Transcript of Deploying Perl 6 - Pugs · 2008-10-05 · Pugs 6.2.12 •Released on June 26th •3x faster build...

Page 1: Deploying Perl 6 - Pugs · 2008-10-05 · Pugs 6.2.12 •Released on June 26th •3x faster build time •10x faster compilation •2x faster runtime •2000+ commits since 6.2.11

DeployingPerl 6

AudreyTang

1

Page 2: Deploying Perl 6 - Pugs · 2008-10-05 · Pugs 6.2.12 •Released on June 26th •3x faster build time •10x faster compilation •2x faster runtime •2000+ commits since 6.2.11

Perl6ishereToday!

2

Page 3: Deploying Perl 6 - Pugs · 2008-10-05 · Pugs 6.2.12 •Released on June 26th •3x faster build time •10x faster compilation •2x faster runtime •2000+ commits since 6.2.11

Perl6ishereToday!(YAPC::NA2005)

3

Page 4: Deploying Perl 6 - Pugs · 2008-10-05 · Pugs 6.2.12 •Released on June 26th •3x faster build time •10x faster compilation •2x faster runtime •2000+ commits since 6.2.11

Pugs6.2.12•ReleasedonJune26th

•3xfasterbuildtime

•10xfastercompilation

•2xfasterruntime

•2000+commitssince6.2.11

4

Page 5: Deploying Perl 6 - Pugs · 2008-10-05 · Pugs 6.2.12 •Released on June 26th •3x faster build time •10x faster compilation •2x faster runtime •2000+ commits since 6.2.11

Parrot0.4.5•ReleasedlastJune19th

•Unicodeidentifiers

•Hierarchicalnamespace

•New.NETCLRtranslator

•Muchfastercompilertools

5

Page 6: Deploying Perl 6 - Pugs · 2008-10-05 · Pugs 6.2.12 •Released on June 26th •3x faster build time •10x faster compilation •2x faster runtime •2000+ commits since 6.2.11

Greatforexperimenting

6

Page 7: Deploying Perl 6 - Pugs · 2008-10-05 · Pugs 6.2.12 •Released on June 26th •3x faster build time •10x faster compilation •2x faster runtime •2000+ commits since 6.2.11

Butnotforproduction

7

Page 8: Deploying Perl 6 - Pugs · 2008-10-05 · Pugs 6.2.12 •Released on June 26th •3x faster build time •10x faster compilation •2x faster runtime •2000+ commits since 6.2.11

...notthisChristmas

8

Page 9: Deploying Perl 6 - Pugs · 2008-10-05 · Pugs 6.2.12 •Released on June 26th •3x faster build time •10x faster compilation •2x faster runtime •2000+ commits since 6.2.11

9

Page 10: Deploying Perl 6 - Pugs · 2008-10-05 · Pugs 6.2.12 •Released on June 26th •3x faster build time •10x faster compilation •2x faster runtime •2000+ commits since 6.2.11

CPANisthelanguage

10

Page 11: Deploying Perl 6 - Pugs · 2008-10-05 · Pugs 6.2.12 •Released on June 26th •3x faster build time •10x faster compilation •2x faster runtime •2000+ commits since 6.2.11

Perlisjustitssyntax

11

Page 12: Deploying Perl 6 - Pugs · 2008-10-05 · Pugs 6.2.12 •Released on June 26th •3x faster build time •10x faster compilation •2x faster runtime •2000+ commits since 6.2.11

Perl5.000b3h(October1994)

12

Page 13: Deploying Perl 6 - Pugs · 2008-10-05 · Pugs 6.2.12 •Released on June 26th •3x faster build time •10x faster compilation •2x faster runtime •2000+ commits since 6.2.11

• use5.000;• usestrict;• require'fastcwd.pl';• require'newgetopt.pl';• require'exceptions.pl';• #...•

13

Page 14: Deploying Perl 6 - Pugs · 2008-10-05 · Pugs 6.2.12 •Released on June 26th •3x faster build time •10x faster compilation •2x faster runtime •2000+ commits since 6.2.11

Continuity++

14

Page 15: Deploying Perl 6 - Pugs · 2008-10-05 · Pugs 6.2.12 •Released on June 26th •3x faster build time •10x faster compilation •2x faster runtime •2000+ commits since 6.2.11

Pugs6.2.2

(June2005)

15

Page 16: Deploying Perl 6 - Pugs · 2008-10-05 · Pugs 6.2.12 •Released on June 26th •3x faster build time •10x faster compilation •2x faster runtime •2000+ commits since 6.2.11

• use v6-pugs;• use perl5:DBI;• use perl5:Encode;• use perl5:Template;• # ...•

16

Page 17: Deploying Perl 6 - Pugs · 2008-10-05 · Pugs 6.2.12 •Released on June 26th •3x faster build time •10x faster compilation •2x faster runtime •2000+ commits since 6.2.11

StillneedtoinstallPugs

17

Page 18: Deploying Perl 6 - Pugs · 2008-10-05 · Pugs 6.2.12 •Released on June 26th •3x faster build time •10x faster compilation •2x faster runtime •2000+ commits since 6.2.11

Perl5.9.3

(Jan2006)

18

Page 19: Deploying Perl 6 - Pugs · 2008-10-05 · Pugs 6.2.12 •Released on June 26th •3x faster build time •10x faster compilation •2x faster runtime •2000+ commits since 6.2.11

• usev5.9.3;• usefeatureqw(switchsayerr~~);

• given(shift()){• when['‐h','‐‐help']{• say"Usage:$0";• }• default{• $0~~'moose.exe'errdie"NotMoose";• }• }•

19

Page 20: Deploying Perl 6 - Pugs · 2008-10-05 · Pugs 6.2.12 •Released on June 26th •3x faster build time •10x faster compilation •2x faster runtime •2000+ commits since 6.2.11

HowtogetPerl6intoProduction?

20

Page 21: Deploying Perl 6 - Pugs · 2008-10-05 · Pugs 6.2.12 •Released on June 26th •3x faster build time •10x faster compilation •2x faster runtime •2000+ commits since 6.2.11

Production

• Workwithexistingcode

• MustsupportPerl5andXS

• Nofrom‐scratchrewrites

21

Page 22: Deploying Perl 6 - Pugs · 2008-10-05 · Pugs 6.2.12 •Released on June 26th •3x faster build time •10x faster compilation •2x faster runtime •2000+ commits since 6.2.11

Frontends?

Parrot

Tcl Python Scheme

22

Page 23: Deploying Perl 6 - Pugs · 2008-10-05 · Pugs 6.2.12 •Released on June 26th •3x faster build time •10x faster compilation •2x faster runtime •2000+ commits since 6.2.11

Frontends?

Parrot

Tcl Python Scheme

Perl 5(Ponie)

Perl 6

23

Page 24: Deploying Perl 6 - Pugs · 2008-10-05 · Pugs 6.2.12 •Released on June 26th •3x faster build time •10x faster compilation •2x faster runtime •2000+ commits since 6.2.11

Backends!

Pugs

HaskellJava

ScriptPerl 5

24

Page 25: Deploying Perl 6 - Pugs · 2008-10-05 · Pugs 6.2.12 •Released on June 26th •3x faster build time •10x faster compilation •2x faster runtime •2000+ commits since 6.2.11

Backends!

Pugs

JavaScript

Haskell Perl 5

YARV?JVM?

CLR? PyPy?

25

Page 26: Deploying Perl 6 - Pugs · 2008-10-05 · Pugs 6.2.12 •Released on June 26th •3x faster build time •10x faster compilation •2x faster runtime •2000+ commits since 6.2.11

PugsonPerl5

26

Page 27: Deploying Perl 6 - Pugs · 2008-10-05 · Pugs 6.2.12 •Released on June 26th •3x faster build time •10x faster compilation •2x faster runtime •2000+ commits since 6.2.11

Perl6RuntimeImplementedasPerl5Modules

27

Page 28: Deploying Perl 6 - Pugs · 2008-10-05 · Pugs 6.2.12 •Released on June 26th •3x faster build time •10x faster compilation •2x faster runtime •2000+ commits since 6.2.11

SanePerl5(notsourcefilters)

28

Page 29: Deploying Perl 6 - Pugs · 2008-10-05 · Pugs 6.2.12 •Released on June 26th •3x faster build time •10x faster compilation •2x faster runtime •2000+ commits since 6.2.11

AvailableOnCPANToday

29

Page 30: Deploying Perl 6 - Pugs · 2008-10-05 · Pugs 6.2.12 •Released on June 26th •3x faster build time •10x faster compilation •2x faster runtime •2000+ commits since 6.2.11

Moose.pm☯

30

Page 31: Deploying Perl 6 - Pugs · 2008-10-05 · Pugs 6.2.12 •Released on June 26th •3x faster build time •10x faster compilation •2x faster runtime •2000+ commits since 6.2.11

WhatisMoose?

• CompleteobjectmodelforPerl5

• BasedonthePerl6objectmodel

• ProductionReady

31

Page 32: Deploying Perl 6 - Pugs · 2008-10-05 · Pugs 6.2.12 •Released on June 26th •3x faster build time •10x faster compilation •2x faster runtime •2000+ commits since 6.2.11

Moose,it’sthenewCamel

32

Page 33: Deploying Perl 6 - Pugs · 2008-10-05 · Pugs 6.2.12 •Released on June 26th •3x faster build time •10x faster compilation •2x faster runtime •2000+ commits since 6.2.11

ObjectsWithClass

33

Page 34: Deploying Perl 6 - Pugs · 2008-10-05 · Pugs 6.2.12 •Released on June 26th •3x faster build time •10x faster compilation •2x faster runtime •2000+ commits since 6.2.11

• usev6‐pugs;• classPoint;• • • has$.xisrw;#instanceattributes• has$.y;#default"isreadonly"• • methodclear(){

• $.x=0;#accessor• $!y=0;#directslotaccess• }•

34

Page 35: Deploying Perl 6 - Pugs · 2008-10-05 · Pugs 6.2.12 •Released on June 26th •3x faster build time •10x faster compilation •2x faster runtime •2000+ commits since 6.2.11

• usev5;• packagePoint;• useMoose;• • hasx=>(is=>'rw');• hasy=>(is=>'ro');• • subclear{• my$self=shift;• $self‐>x(0);#accessor• $self‐>{y}=0;#directslotaccess• }•

35

Page 36: Deploying Perl 6 - Pugs · 2008-10-05 · Pugs 6.2.12 •Released on June 26th •3x faster build time •10x faster compilation •2x faster runtime •2000+ commits since 6.2.11

Subclassing

36

Page 37: Deploying Perl 6 - Pugs · 2008-10-05 · Pugs 6.2.12 •Released on June 26th •3x faster build time •10x faster compilation •2x faster runtime •2000+ commits since 6.2.11

• usev6‐pugs;• classPoint3D;• • • isPoint;• • has$.z;• • methodclear(){• • call;• $!z=0;• };•

37

Page 38: Deploying Perl 6 - Pugs · 2008-10-05 · Pugs 6.2.12 •Released on June 26th •3x faster build time •10x faster compilation •2x faster runtime •2000+ commits since 6.2.11

• usev5;• packagePoint3D;• useMoose;• • extends'Point';• • hasz=>(isa=>'Int');• • overrideclear=>sub{• my$self=shift;• super;• $self‐>{z}=0;• };•

38

Page 39: Deploying Perl 6 - Pugs · 2008-10-05 · Pugs 6.2.12 •Released on June 26th •3x faster build time •10x faster compilation •2x faster runtime •2000+ commits since 6.2.11

• usev5;• packagePoint3D;• useMoose;• • extends'Point';• • hasz=>(isa=>'Int');• • afterclear=>sub{• my$self=shift;• • $self‐>{z}=0;• };•

39

Page 40: Deploying Perl 6 - Pugs · 2008-10-05 · Pugs 6.2.12 •Released on June 26th •3x faster build time •10x faster compilation •2x faster runtime •2000+ commits since 6.2.11

MetaObjects

40

Page 41: Deploying Perl 6 - Pugs · 2008-10-05 · Pugs 6.2.12 •Released on June 26th •3x faster build time •10x faster compilation •2x faster runtime •2000+ commits since 6.2.11

• usev6‐pugs;

• Foo.meta.add_method(bar=>method{• say"HellofromFoo.bar";• });• Foo.meta.superclasses;• Foo.meta.compute_all_applicable_methods;• Foo.meta.find_all_methods_by_name($method_name);

41

Page 42: Deploying Perl 6 - Pugs · 2008-10-05 · Pugs 6.2.12 •Released on June 26th •3x faster build time •10x faster compilation •2x faster runtime •2000+ commits since 6.2.11

• usev5;• useMoose;• Foo‐>meta‐>add_method(bar=>sub{• print"HellofromFoo‐>bar\n";• });• Foo‐>meta‐>superclasses;• Foo‐>meta‐>compute_all_applicable_methods;• Foo‐>meta‐>find_all_methods_by_name($method_name);

42

Page 43: Deploying Perl 6 - Pugs · 2008-10-05 · Pugs 6.2.12 •Released on June 26th •3x faster build time •10x faster compilation •2x faster runtime •2000+ commits since 6.2.11

Laziness

43

Page 44: Deploying Perl 6 - Pugs · 2008-10-05 · Pugs 6.2.12 •Released on June 26th •3x faster build time •10x faster compilation •2x faster runtime •2000+ commits since 6.2.11

• usev6‐pugs;• classBinaryTreeisrw;• • hasAny$.node;• hasBinaryTree$.parenthandles{• parent_node=>'node'• };• hasBinaryTree$.left={• lazy{BinaryTree.new(parent=>self)}• };• hasBinaryTree$.right={• lazy{BinaryTree.new(parent=>self)}• };•

44

Page 45: Deploying Perl 6 - Pugs · 2008-10-05 · Pugs 6.2.12 •Released on June 26th •3x faster build time •10x faster compilation •2x faster runtime •2000+ commits since 6.2.11

• usev5;• packageBinaryTree;• useMoose;• • hasnode=>(is=>'rw',isa=>'Any');• hasparent=>(• is=>'rw',• isa=>'BinaryTree',• handles=>{parent_node=>'node'},• weak_ref=>1,• );• hasleft=>(• is=>'rw',• isa=>'BinaryTree',• default=>sub{BinaryTree‐>new(parent=>$_[0])},• lazy=>1,• );

• #dittofor“hasright”

45

Page 46: Deploying Perl 6 - Pugs · 2008-10-05 · Pugs 6.2.12 •Released on June 26th •3x faster build time •10x faster compilation •2x faster runtime •2000+ commits since 6.2.11

TypeConstraints

46

Page 47: Deploying Perl 6 - Pugs · 2008-10-05 · Pugs 6.2.12 •Released on June 26th •3x faster build time •10x faster compilation •2x faster runtime •2000+ commits since 6.2.11

• usev6‐pugs;• classAddress;• useperl5:Locale::US;• useperl5:Regexp::Common<zip$RE>;• • my$STATES=Locale::US.new;• subsetUS_StateofStrwhere{• $STATES{any(<code2statestate2code>)}{.uc};• };• • hasStr$.streetisrw;• hasStr$.cityisrw;• hasUS_State$.stateisrw;• hasStr$.zip_codeisrwwhere{• $_~~$RE<zip><US>{'‐extended'=>'allow'}• };•

47

Page 48: Deploying Perl 6 - Pugs · 2008-10-05 · Pugs 6.2.12 •Released on June 26th •3x faster build time •10x faster compilation •2x faster runtime •2000+ commits since 6.2.11

• usev5;• packageAddress;• useMoose;• useMoose::Util::TypeConstraints;• useLocale::US;• useRegexp::Common'zip';• • my$STATES=Locale::US‐>new;• subtypeUSState=>asStr=>where{• $STATES‐>{code2state}{uc($_)}• or$STATES‐>{state2code}{uc($_)};• }• • hasstreet=>(is=>'rw',isa=>'Str');• hascity=>(is=>'rw',isa=>'Str');• hasstate=>(is=>'rw',isa=>'USState');• haszip_code=>(• is=>'rw',• isa=>subtypeStr=>where{• /$RE{zip}{US}{‐extended=>'allow'}/• },• );•

48

Page 49: Deploying Perl 6 - Pugs · 2008-10-05 · Pugs 6.2.12 •Released on June 26th •3x faster build time •10x faster compilation •2x faster runtime •2000+ commits since 6.2.11

Roles

49

Page 50: Deploying Perl 6 - Pugs · 2008-10-05 · Pugs 6.2.12 •Released on June 26th •3x faster build time •10x faster compilation •2x faster runtime •2000+ commits since 6.2.11

• usev6‐pugs;• roleEquality;• • methodequal_to($other){...}• • methodnot_equal_to($other){

• not$self‐>equal_to($other);• }• •

50

Page 51: Deploying Perl 6 - Pugs · 2008-10-05 · Pugs 6.2.12 •Released on June 26th •3x faster build time •10x faster compilation •2x faster runtime •2000+ commits since 6.2.11

• usev5;• packageEquality;• useMoose::Role;• requires'equal_to';• • subnot_equal_to{• my($self,$other)=@_;• not$self‐>equal_to($other);• }• •

51

Page 52: Deploying Perl 6 - Pugs · 2008-10-05 · Pugs 6.2.12 •Released on June 26th •3x faster build time •10x faster compilation •2x faster runtime •2000+ commits since 6.2.11

DerivedRoles

52

Page 53: Deploying Perl 6 - Pugs · 2008-10-05 · Pugs 6.2.12 •Released on June 26th •3x faster build time •10x faster compilation •2x faster runtime •2000+ commits since 6.2.11

• usev6‐pugs;• roleComparable;• doesEquality;• • methodcompare($other){...}

• methodequal_to($other){

• $self‐>compare($other)==0;• }• • methodgreater_than($other){

• $self‐>compare($other)==1;• }• • methodless_than($other){

• $self‐>compare($other)==‐1;• }•

53

Page 54: Deploying Perl 6 - Pugs · 2008-10-05 · Pugs 6.2.12 •Released on June 26th •3x faster build time •10x faster compilation •2x faster runtime •2000+ commits since 6.2.11

• usev5;• packageComparable;• with'Equality';• • requires'compare';• • subequal_to{• my($self,$other)=@_;• $self‐>compare($other)==0;• }• • subgreater_than{• my($self,$other)=@_;• $self‐>compare($other)==1;• }• • subless_than{• my($self,$other)=@_;• $self‐>compare($other)==‐1;• }•

54

Page 55: Deploying Perl 6 - Pugs · 2008-10-05 · Pugs 6.2.12 •Released on June 26th •3x faster build time •10x faster compilation •2x faster runtime •2000+ commits since 6.2.11

AbstractInterfaceRoles

55

Page 56: Deploying Perl 6 - Pugs · 2008-10-05 · Pugs 6.2.12 •Released on June 26th •3x faster build time •10x faster compilation •2x faster runtime •2000+ commits since 6.2.11

• usev6‐pugs;• rolePrintable;

• • methodto_string{...}

56

Page 57: Deploying Perl 6 - Pugs · 2008-10-05 · Pugs 6.2.12 •Released on June 26th •3x faster build time •10x faster compilation •2x faster runtime •2000+ commits since 6.2.11

• usev5;• packagePrintable;• useMoose::Role;• • requires'to_string';

57

Page 58: Deploying Perl 6 - Pugs · 2008-10-05 · Pugs 6.2.12 •Released on June 26th •3x faster build time •10x faster compilation •2x faster runtime •2000+ commits since 6.2.11

MixingInRoles

58

Page 59: Deploying Perl 6 - Pugs · 2008-10-05 · Pugs 6.2.12 •Released on June 26th •3x faster build time •10x faster compilation •2x faster runtime •2000+ commits since 6.2.11

• usev6‐pugs;• classPerson;• doesComparable;• doesPrintable;• • hasStr$.first_name;• hasStr$.last_name;• • methodto_string(){• • "$.last_name,$.first_name";• }• • methodcompare($other){• • $.to_stringcmp$other.to_string;• }•

59

Page 60: Deploying Perl 6 - Pugs · 2008-10-05 · Pugs 6.2.12 •Released on June 26th •3x faster build time •10x faster compilation •2x faster runtime •2000+ commits since 6.2.11

• usev5;• packagePerson;• useMoose;• with'Comparable','Printable';• • hasfirst_name=>(isa=>'Str');• haslast_name=>(isa=>'Str');• • subto_string{• my$self=shift;• $self‐>last_name.','.$self‐>first_name;• }• • subcompare{• my($self,$other)=@_;• $self‐>to_stringcmp$other‐>to_string;• }•

60

Page 61: Deploying Perl 6 - Pugs · 2008-10-05 · Pugs 6.2.12 •Released on June 26th •3x faster build time •10x faster compilation •2x faster runtime •2000+ commits since 6.2.11

•AutomaticCoercion

•AccessorTriggers

•Alternatelayouts!

Morefeatures

61

Page 62: Deploying Perl 6 - Pugs · 2008-10-05 · Pugs 6.2.12 •Released on June 26th •3x faster build time •10x faster compilation •2x faster runtime •2000+ commits since 6.2.11

Pugs::Compiler::Rule☯

62

Page 63: Deploying Perl 6 - Pugs · 2008-10-05 · Pugs 6.2.12 •Released on June 26th •3x faster build time •10x faster compilation •2x faster runtime •2000+ commits since 6.2.11

RegexObjects

63

Page 64: Deploying Perl 6 - Pugs · 2008-10-05 · Pugs 6.2.12 •Released on June 26th •3x faster build time •10x faster compilation •2x faster runtime •2000+ commits since 6.2.11

• usev6‐pugs;

• my$txt='Car‐ModelT,1909';• my$pat=rx{• Car‐• [(Ferrari)• |(ModelT,(\d\d\d\d))• ]• };• $txt~~$paterrfail"Cannotmatch";•

64

Page 65: Deploying Perl 6 - Pugs · 2008-10-05 · Pugs 6.2.12 •Released on June 26th •3x faster build time •10x faster compilation •2x faster runtime •2000+ commits since 6.2.11

• usev5;• usePugs::Compiler::Regex;• my$txt='Car‐ModelT,1909';• my$pat=Pugs::Compiler::Regex‐>compile(q(• Car‐• [(Ferrari)• |(ModelT,(\d\d\d\d))• ]• ));• $pat‐>match($txt)ordie"Cannotmatch";•

65

Page 66: Deploying Perl 6 - Pugs · 2008-10-05 · Pugs 6.2.12 •Released on June 26th •3x faster build time •10x faster compilation •2x faster runtime •2000+ commits since 6.2.11

MatchObjects

66

Page 67: Deploying Perl 6 - Pugs · 2008-10-05 · Pugs 6.2.12 •Released on June 26th •3x faster build time •10x faster compilation •2x faster runtime •2000+ commits since 6.2.11

• usev6‐pugs;

• my$pat=rx{• Car‐[• (Ferrari)|(ModelT,(\d\d\d\d))• ]• };

• my$match=('Car‐ModelT,1909'~~$pat);• say$match;#"Car‐ModelT,1909"• say$match[0];#undef• say$match[1];#"ModelT,1909"• say$match[1][0];#"1909"• say$match[1][0].from;#11• say$match[1][0].to;#15•

67

Page 68: Deploying Perl 6 - Pugs · 2008-10-05 · Pugs 6.2.12 •Released on June 26th •3x faster build time •10x faster compilation •2x faster runtime •2000+ commits since 6.2.11

• usev5;• usePugs::Compiler::Regex;• my$pat=Pugs::Compiler::Regex‐>compile(q(• Car‐[• (Ferrari)|(ModelT,(\d\d\d\d))• ]• ));

• usefeatureqw(say);• my$match=$pat‐>match('Car‐ModelT,1909');• say$match;#"Car‐ModelT,1909"• say$match‐>[0];#undef• say$match‐>[1];#"ModelT,1909"• say$match‐>[1][0];#"1909"• say$match‐>[1][0]‐>from;#11• say$match‐>[1][0]‐>to;#15•

68

Page 69: Deploying Perl 6 - Pugs · 2008-10-05 · Pugs 6.2.12 •Released on June 26th •3x faster build time •10x faster compilation •2x faster runtime •2000+ commits since 6.2.11

NamedCaptures

69

Page 70: Deploying Perl 6 - Pugs · 2008-10-05 · Pugs 6.2.12 •Released on June 26th •3x faster build time •10x faster compilation •2x faster runtime •2000+ commits since 6.2.11

• usev6‐pugs;• • my$pat=rx{• Car‐[• (Ferrari)• |(ModelT,$<year>:=[\d\d\d\d])• ]• };

• my$match=('Car‐ModelT,1909'~~$pat);• say$match;#"Car‐ModelT,1909"• say$match[1];#"ModelT,1909"• say$match[1]<year>;#"1909"• say$match[1]<year>.from;#11• say$match[1]<year>.to;#15•

70

Page 71: Deploying Perl 6 - Pugs · 2008-10-05 · Pugs 6.2.12 •Released on June 26th •3x faster build time •10x faster compilation •2x faster runtime •2000+ commits since 6.2.11

• usev5;• usePugs::Compiler::Regex;• my$pat=Pugs::Compiler::Regex‐>compile(q(• Car‐[• (Ferrari)• |(ModelT,$<year>:=[\d\d\d\d])• ]• ));

• usefeatureqw(say);• my$match=$pat‐>match('Car‐ModelT,1909');• say$match;#"Car‐ModelT,1909"• say$match‐>[1];#"ModelT,1909"• say$match‐>[1]{year};#"1909"• say$match‐>[1]{year}‐>from;#11• say$match‐>[1]{year}‐>to;#15•

71

Page 72: Deploying Perl 6 - Pugs · 2008-10-05 · Pugs 6.2.12 •Released on June 26th •3x faster build time •10x faster compilation •2x faster runtime •2000+ commits since 6.2.11

GrammarModules

72

Page 73: Deploying Perl 6 - Pugs · 2008-10-05 · Pugs 6.2.12 •Released on June 26th •3x faster build time •10x faster compilation •2x faster runtime •2000+ commits since 6.2.11

• usev6‐pugs;• • grammarCarInfo;• • regexcar{• Car‐[(Ferrari)|(ModelT,<year>)]• }• regexyear{• \d\d\d\d• }• • moduleMain;• my$match=('Car‐ModelT,1909'~~CarInfo.car);•

73

Page 74: Deploying Perl 6 - Pugs · 2008-10-05 · Pugs 6.2.12 •Released on June 26th •3x faster build time •10x faster compilation •2x faster runtime •2000+ commits since 6.2.11

• usev5;• usePugs::Compiler::Regex;• packageCarInfo;• usebase'Pugs::Grammar::Base';• *Car‐Pugs::Compiler::Regex‐>compile(q(• Car‐[(Ferrari)|(ModelT,<year>)]• ))‐>code;• *year=Pugs::Compiler::Regex‐>compile(q(• \d\d\d\d• ))‐>code;• • packagemain;• my$match=CarInfo‐>car('Car‐ModelT,1909');•

74

Page 75: Deploying Perl 6 - Pugs · 2008-10-05 · Pugs 6.2.12 •Released on June 26th •3x faster build time •10x faster compilation •2x faster runtime •2000+ commits since 6.2.11

ResultObjects

75

Page 76: Deploying Perl 6 - Pugs · 2008-10-05 · Pugs 6.2.12 •Released on June 26th •3x faster build time •10x faster compilation •2x faster runtime •2000+ commits since 6.2.11

• #XXX‐TypicalPerl5code• usev5;• my$txt='Car‐ModelT,1909';• my$pat=qr{• Car‐(?:(Ferrari)|(ModelT,(\d\d\d\d)))• }x;

• my$obj;• if($txt=~$pat){• if($1){• $obj=Car‐>new(color=>"red");• }elsif($2){• $obj=Car‐>new(color=>"black",year=>$3);• }• }•

76

Page 77: Deploying Perl 6 - Pugs · 2008-10-05 · Pugs 6.2.12 •Released on June 26th •3x faster build time •10x faster compilation •2x faster runtime •2000+ commits since 6.2.11

• usev6‐pugs;

• my$txt='Car‐ModelT,1909';• my$pat=rx{• Car‐[Ferrari• {returnCar.new(:color<red>)}• |ModelT,$<year>:=[\d\d\d\d]• {returnCar.new(:color<black>:$<year>)}• ]• };

• my$obj=$($txt~~$pat);• print$obj<year>;#1909

77

Page 78: Deploying Perl 6 - Pugs · 2008-10-05 · Pugs 6.2.12 •Released on June 26th •3x faster build time •10x faster compilation •2x faster runtime •2000+ commits since 6.2.11

• usev5;• usePugs::Compiler::Regex;• my$txt='Car‐ModelT,1909';• my$pat=Pugs::Compiler::Regex‐>compile(q(• Car‐[Ferrari• {returnCar‐>new(color=>'red')}• |ModelT,$<year>:=[\d\d\d\d]• {returnCar‐>new(• color=>'black',year=>$<year>)}• ]• ));• my$obj=$pat‐>match($txt)‐>();• print$obj‐>{year};#1909

78

Page 79: Deploying Perl 6 - Pugs · 2008-10-05 · Pugs 6.2.12 •Released on June 26th •3x faster build time •10x faster compilation •2x faster runtime •2000+ commits since 6.2.11

BacktrackControl

79

Page 80: Deploying Perl 6 - Pugs · 2008-10-05 · Pugs 6.2.12 •Released on June 26th •3x faster build time •10x faster compilation •2x faster runtime •2000+ commits since 6.2.11

• usev6‐pugs;• "ModelT2005"~~regex{• Car‐ModelT\d*;• };

• usev5;• "ModelT2005"=~qr{• Car‐ModelT\d*;• }x;

80

Page 81: Deploying Perl 6 - Pugs · 2008-10-05 · Pugs 6.2.12 •Released on June 26th •3x faster build time •10x faster compilation •2x faster runtime •2000+ commits since 6.2.11

• usev6‐pugs;• "ModelT2005"~~token{• Car‐ModelT\d*;• };

• usev5;• "ModelT2005"=~qr{• Car‐ModelT(?>\d*);• }x;

81

Page 82: Deploying Perl 6 - Pugs · 2008-10-05 · Pugs 6.2.12 •Released on June 26th •3x faster build time •10x faster compilation •2x faster runtime •2000+ commits since 6.2.11

• usev6‐pugs;• "ModelT2005"~~rule{• Car‐ModelT\d*;• };

• usev5;• "ModelT2005"=~qr{• Car\s*=\s*ModelT\s+(?>\d*)\s*;• }x;

82

Page 83: Deploying Perl 6 - Pugs · 2008-10-05 · Pugs 6.2.12 •Released on June 26th •3x faster build time •10x faster compilation •2x faster runtime •2000+ commits since 6.2.11

MoreComponents

•Pugs::Grammar::Precedence

•Pugs::Grammar::MiniPerl6

•Pugs::Compiler::RegexPerl5

83

Page 84: Deploying Perl 6 - Pugs · 2008-10-05 · Pugs 6.2.12 •Released on June 26th •3x faster build time •10x faster compilation •2x faster runtime •2000+ commits since 6.2.11

Module::Compile☯

84

Page 85: Deploying Perl 6 - Pugs · 2008-10-05 · Pugs 6.2.12 •Released on June 26th •3x faster build time •10x faster compilation •2x faster runtime •2000+ commits since 6.2.11

EveryonehatesSpiffy

85

Page 86: Deploying Perl 6 - Pugs · 2008-10-05 · Pugs 6.2.12 •Released on June 26th •3x faster build time •10x faster compilation •2x faster runtime •2000+ commits since 6.2.11

• usev5;• useSpiffy‐Base;

• mysubprivate{• "It'saprivatemethodhere";• }

• subpublic{• $self‐>$private;• }

• subnew(){• my$self=super;• $self‐>init;• return$self;• }•

86

Page 87: Deploying Perl 6 - Pugs · 2008-10-05 · Pugs 6.2.12 •Released on June 26th •3x faster build time •10x faster compilation •2x faster runtime •2000+ commits since 6.2.11

ToomuchMagic

87

Page 88: Deploying Perl 6 - Pugs · 2008-10-05 · Pugs 6.2.12 •Released on June 26th •3x faster build time •10x faster compilation •2x faster runtime •2000+ commits since 6.2.11

YAMLusedSpiffy

88

Page 89: Deploying Perl 6 - Pugs · 2008-10-05 · Pugs 6.2.12 •Released on June 26th •3x faster build time •10x faster compilation •2x faster runtime •2000+ commits since 6.2.11

Test::BaseusesSpiffy

89

Page 90: Deploying Perl 6 - Pugs · 2008-10-05 · Pugs 6.2.12 •Released on June 26th •3x faster build time •10x faster compilation •2x faster runtime •2000+ commits since 6.2.11

IO::AllusesSpiffy

90

Page 91: Deploying Perl 6 - Pugs · 2008-10-05 · Pugs 6.2.12 •Released on June 26th •3x faster build time •10x faster compilation •2x faster runtime •2000+ commits since 6.2.11

KwikiusesIO::All

91

Page 92: Deploying Perl 6 - Pugs · 2008-10-05 · Pugs 6.2.12 •Released on June 26th •3x faster build time •10x faster compilation •2x faster runtime •2000+ commits since 6.2.11

Ergo...

92

Page 93: Deploying Perl 6 - Pugs · 2008-10-05 · Pugs 6.2.12 •Released on June 26th •3x faster build time •10x faster compilation •2x faster runtime •2000+ commits since 6.2.11

EveryonehatesIngy

93

Page 94: Deploying Perl 6 - Pugs · 2008-10-05 · Pugs 6.2.12 •Released on June 26th •3x faster build time •10x faster compilation •2x faster runtime •2000+ commits since 6.2.11

What'shatefulaboutSpiffy?

94

Page 95: Deploying Perl 6 - Pugs · 2008-10-05 · Pugs 6.2.12 •Released on June 26th •3x faster build time •10x faster compilation •2x faster runtime •2000+ commits since 6.2.11

It'saSourceFilter!

95

Page 96: Deploying Perl 6 - Pugs · 2008-10-05 · Pugs 6.2.12 •Released on June 26th •3x faster build time •10x faster compilation •2x faster runtime •2000+ commits since 6.2.11

• usev5;• useFilter::Simplesub{• s{(^sub\s+\w+\s+\{)}• {$1\nmy$self=shift;\n}mgx;• }•

96

Page 97: Deploying Perl 6 - Pugs · 2008-10-05 · Pugs 6.2.12 •Released on June 26th •3x faster build time •10x faster compilation •2x faster runtime •2000+ commits since 6.2.11

•Addsdependency

•Slowsdownstartup

•Breaksperl‐d

•WrecksotherSourceFilters

Filter::SimpleBad

97

Page 98: Deploying Perl 6 - Pugs · 2008-10-05 · Pugs 6.2.12 •Released on June 26th •3x faster build time •10x faster compilation •2x faster runtime •2000+ commits since 6.2.11

Wecanfixit!

98

Page 99: Deploying Perl 6 - Pugs · 2008-10-05 · Pugs 6.2.12 •Released on June 26th •3x faster build time •10x faster compilation •2x faster runtime •2000+ commits since 6.2.11

• usev5;• useFilter::Simplesub{• s{(^sub\s+\w+\s+\{)}• {$1\nmy$self=shift;\n}mgx;• }

99

Page 100: Deploying Perl 6 - Pugs · 2008-10-05 · Pugs 6.2.12 •Released on June 26th •3x faster build time •10x faster compilation •2x faster runtime •2000+ commits since 6.2.11

• usev5;• useFilter::Simple::Compilesub{• s{(^sub\s+\w+\s+\{)}• {$1\nmy$self=shift;\n}mgx;• }

100

Page 101: Deploying Perl 6 - Pugs · 2008-10-05 · Pugs 6.2.12 •Released on June 26th •3x faster build time •10x faster compilation •2x faster runtime •2000+ commits since 6.2.11

Howdoesthatwork?

101

Page 102: Deploying Perl 6 - Pugs · 2008-10-05 · Pugs 6.2.12 •Released on June 26th •3x faster build time •10x faster compilation •2x faster runtime •2000+ commits since 6.2.11

Little‐knownfact:

102

Page 103: Deploying Perl 6 - Pugs · 2008-10-05 · Pugs 6.2.12 •Released on June 26th •3x faster build time •10x faster compilation •2x faster runtime •2000+ commits since 6.2.11

“useFoo”looksforFoo.pmcbeforeFoo.pm

103

Page 104: Deploying Perl 6 - Pugs · 2008-10-05 · Pugs 6.2.12 •Released on June 26th •3x faster build time •10x faster compilation •2x faster runtime •2000+ commits since 6.2.11

• %echo'print"Hello\n"'>Foo.pmc• %perl‐MFoo‐e1• Hello

104

Page 105: Deploying Perl 6 - Pugs · 2008-10-05 · Pugs 6.2.12 •Released on June 26th •3x faster build time •10x faster compilation •2x faster runtime •2000+ commits since 6.2.11

Saveprecompiledresultto.pmc...

105

Page 106: Deploying Perl 6 - Pugs · 2008-10-05 · Pugs 6.2.12 •Released on June 26th •3x faster build time •10x faster compilation •2x faster runtime •2000+ commits since 6.2.11

...nofilteringneedednexttime!

106

Page 107: Deploying Perl 6 - Pugs · 2008-10-05 · Pugs 6.2.12 •Released on June 26th •3x faster build time •10x faster compilation •2x faster runtime •2000+ commits since 6.2.11

•Freeofuser‐sidedependencies

•Faststartuptime

•Debuggablesourceisallin.pmc

•Allowscomposableprecompilers

Module::CompileGood

107

Page 108: Deploying Perl 6 - Pugs · 2008-10-05 · Pugs 6.2.12 •Released on June 26th •3x faster build time •10x faster compilation •2x faster runtime •2000+ commits since 6.2.11

• packageFoo;• useModule::Compile‐base;• • subpmc_compile{• my($class,$source,$context)=@_;• #Convert$sourceinto$compiled_output...• return$compiled_output;• }•

108

Page 109: Deploying Perl 6 - Pugs · 2008-10-05 · Pugs 6.2.12 •Released on June 26th •3x faster build time •10x faster compilation •2x faster runtime •2000+ commits since 6.2.11

Filter::Simple::Compile

109

Page 110: Deploying Perl 6 - Pugs · 2008-10-05 · Pugs 6.2.12 •Released on June 26th •3x faster build time •10x faster compilation •2x faster runtime •2000+ commits since 6.2.11

• #Drop‐inreplacementtoFilter::Simple• packageAcme::Y2K;• useFilter::Simple::Compilesub{• tr/y/k/;• }•

110

Page 111: Deploying Perl 6 - Pugs · 2008-10-05 · Pugs 6.2.12 •Released on June 26th •3x faster build time •10x faster compilation •2x faster runtime •2000+ commits since 6.2.11

• #It'slexical!• my$normal_code_here;• {• useAcme::Y2K;• pacyageFoo;• mydir"tmp";• }• my$normal_code_there;•

111

Page 112: Deploying Perl 6 - Pugs · 2008-10-05 · Pugs 6.2.12 •Released on June 26th •3x faster build time •10x faster compilation •2x faster runtime •2000+ commits since 6.2.11

Filter::Macro

112

Page 113: Deploying Perl 6 - Pugs · 2008-10-05 · Pugs 6.2.12 •Released on June 26th •3x faster build time •10x faster compilation •2x faster runtime •2000+ commits since 6.2.11

• packageMyHandyModules;• useFilter::Macro;

• #linesbelowwillbeexpandedintocaller'scode• usestrict;• usewarnings;• useFatalqw(openclose);• useFindBinqw($Bin);•

113

Page 114: Deploying Perl 6 - Pugs · 2008-10-05 · Pugs 6.2.12 •Released on June 26th •3x faster build time •10x faster compilation •2x faster runtime •2000+ commits since 6.2.11

• #Inyourcode• packageMyApp;• useMyHandyModules;• print"I'minvokedfrom$Bin";•

114

Page 115: Deploying Perl 6 - Pugs · 2008-10-05 · Pugs 6.2.12 •Released on June 26th •3x faster build time •10x faster compilation •2x faster runtime •2000+ commits since 6.2.11

• #Inyourcode• packageMyApp;

• usestrict;• usewarnings;• useFatalqw(openclose);• useFindBinqw($Bin);

• #line3• print"I'minvokedfrom$Bin";•

115

Page 116: Deploying Perl 6 - Pugs · 2008-10-05 · Pugs 6.2.12 •Released on June 26th •3x faster build time •10x faster compilation •2x faster runtime •2000+ commits since 6.2.11

• #Makefile.PL• useinc::Module::Install;• • name'MyApp';• all_from'lib/MyApp.pm';• • pmc_support;

• WriteAll;•

116

Page 117: Deploying Perl 6 - Pugs · 2008-10-05 · Pugs 6.2.12 •Released on June 26th •3x faster build time •10x faster compilation •2x faster runtime •2000+ commits since 6.2.11

Nodependencyon

MyHandyModules.pm

117

Page 118: Deploying Perl 6 - Pugs · 2008-10-05 · Pugs 6.2.12 •Released on June 26th •3x faster build time •10x faster compilation •2x faster runtime •2000+ commits since 6.2.11

Inline::Module

118

Page 119: Deploying Perl 6 - Pugs · 2008-10-05 · Pugs 6.2.12 •Released on June 26th •3x faster build time •10x faster compilation •2x faster runtime •2000+ commits since 6.2.11

• #Aww...• packageMyApp;• useFile::Slurpqw(slurp);• useHTTP::MessageParser;•

119

Page 120: Deploying Perl 6 - Pugs · 2008-10-05 · Pugs 6.2.12 •Released on June 26th •3x faster build time •10x faster compilation •2x faster runtime •2000+ commits since 6.2.11

• #Yay!• packageMyApp;• useInline::Module'File::Slurp'=>qw(slurp);• useInline::Module'HTTP::MessageParser';•

120

Page 121: Deploying Perl 6 - Pugs · 2008-10-05 · Pugs 6.2.12 •Released on June 26th •3x faster build time •10x faster compilation •2x faster runtime •2000+ commits since 6.2.11

ZeroDependencies

121

Page 122: Deploying Perl 6 - Pugs · 2008-10-05 · Pugs 6.2.12 •Released on June 26th •3x faster build time •10x faster compilation •2x faster runtime •2000+ commits since 6.2.11

WhataboutDeployingPerl6?

122

Page 123: Deploying Perl 6 - Pugs · 2008-10-05 · Pugs 6.2.12 •Released on June 26th •3x faster build time •10x faster compilation •2x faster runtime •2000+ commits since 6.2.11

usev6‐alpha;

123

Page 124: Deploying Perl 6 - Pugs · 2008-10-05 · Pugs 6.2.12 •Released on June 26th •3x faster build time •10x faster compilation •2x faster runtime •2000+ commits since 6.2.11

v6.pm(onCPANnow!)

124

Page 125: Deploying Perl 6 - Pugs · 2008-10-05 · Pugs 6.2.12 •Released on June 26th •3x faster build time •10x faster compilation •2x faster runtime •2000+ commits since 6.2.11

WritePerl6compiletoPerl5

125

Page 126: Deploying Perl 6 - Pugs · 2008-10-05 · Pugs 6.2.12 •Released on June 26th •3x faster build time •10x faster compilation •2x faster runtime •2000+ commits since 6.2.11

Source:Rule.pm

126

Page 127: Deploying Perl 6 - Pugs · 2008-10-05 · Pugs 6.2.12 •Released on June 26th •3x faster build time •10x faster compilation •2x faster runtime •2000+ commits since 6.2.11

• usev6‐pugs;• • grammarPugs::Grammar::Rule;• rulews:P5{• ^((?:\s|\#(?‐s:.)*)+)• }• #...morerules...

127

Page 128: Deploying Perl 6 - Pugs · 2008-10-05 · Pugs 6.2.12 •Released on June 26th •3x faster build time •10x faster compilation •2x faster runtime •2000+ commits since 6.2.11

Target:Rule.pmc

128

Page 129: Deploying Perl 6 - Pugs · 2008-10-05 · Pugs 6.2.12 •Released on June 26th •3x faster build time •10x faster compilation •2x faster runtime •2000+ commits since 6.2.11

• #Generatedbyv60(Module::Compile0.15)‐donotedit!• #line1##########(((32‐bitChecksumValidator)))##################• BEGIN{use5.006;local(*F,$/);($F=__FILE__)=~s!c$!!;open(F)• ordie"Cannotopen$F:$!";binmode(F,':crlf');unpack('%32N*',<F>)• ==0x1D6399E1ordie"Checksumfailedforoutdated.pmcfile:${F}c"}• #line1#############################################################• packagePugs::Grammar::Rule;• usebase'Pugs::Grammar::Base';• *{'Pugs::Grammar::Rule::ws'}=sub{• my$grammar=shift;• #warn"ruleargumentisundefined"unlessdefined$_[0];• $_[0]=""unlessdefined$_[0];• my$bool=$_[0]=~/^((?:\s|\#(?‐s:.)*)+)(.*)$/sx;• return{• bool=>$bool,• match=>$1,• tail=>$2,• #capture=>$1,• }• };• #...morerules...

129

Page 130: Deploying Perl 6 - Pugs · 2008-10-05 · Pugs 6.2.12 •Released on June 26th •3x faster build time •10x faster compilation •2x faster runtime •2000+ commits since 6.2.11

“CPANisthelanguage,Perl6isjustabetter

syntaxsugar!”

130

Page 131: Deploying Perl 6 - Pugs · 2008-10-05 · Pugs 6.2.12 •Released on June 26th •3x faster build time •10x faster compilation •2x faster runtime •2000+ commits since 6.2.11

Stillneedswork!

131

Page 132: Deploying Perl 6 - Pugs · 2008-10-05 · Pugs 6.2.12 •Released on June 26th •3x faster build time •10x faster compilation •2x faster runtime •2000+ commits since 6.2.11

In Progress➳

132

Page 133: Deploying Perl 6 - Pugs · 2008-10-05 · Pugs 6.2.12 •Released on June 26th •3x faster build time •10x faster compilation •2x faster runtime •2000+ commits since 6.2.11

Augmentation (XS)PadWalker, Devel::Caller

autobox, re::override ...

SemanticsData::Bind, Class::MOP

Pugs::Runtime, Pugs::Compiler::Rule ...

Perl 5 SugarMoose, Moose::Autobox ...

Syntaxv6.pm

Pugs::Compiler::Perl6 ...

Core

perl

Tool SupportCPAN, PAUSE

Perldoc, Perl::Tidy ...

!"#$%&

'()&*+,&-"#%

.&*%!/01!2.34!1"#56

InfrastructureParse::Yapp

Module::Compile ...

133

Page 134: Deploying Perl 6 - Pugs · 2008-10-05 · Pugs 6.2.12 •Released on June 26th •3x faster build time •10x faster compilation •2x faster runtime •2000+ commits since 6.2.11

NativeTypeBridgeMoose::Autobox

134

Page 135: Deploying Perl 6 - Pugs · 2008-10-05 · Pugs 6.2.12 •Released on June 26th •3x faster build time •10x faster compilation •2x faster runtime •2000+ commits since 6.2.11

BuiltinObjectsPugs::Runtime::*

135

Page 136: Deploying Perl 6 - Pugs · 2008-10-05 · Pugs 6.2.12 •Released on June 26th •3x faster build time •10x faster compilation •2x faster runtime •2000+ commits since 6.2.11

CallingConventionData::Bind

136

Page 137: Deploying Perl 6 - Pugs · 2008-10-05 · Pugs 6.2.12 •Released on June 26th •3x faster build time •10x faster compilation •2x faster runtime •2000+ commits since 6.2.11

MultiDispatchSub::Multi

137

Page 138: Deploying Perl 6 - Pugs · 2008-10-05 · Pugs 6.2.12 •Released on June 26th •3x faster build time •10x faster compilation •2x faster runtime •2000+ commits since 6.2.11

EvenMoreSugarre::override

138

Page 139: Deploying Perl 6 - Pugs · 2008-10-05 · Pugs 6.2.12 •Released on June 26th •3x faster build time •10x faster compilation •2x faster runtime •2000+ commits since 6.2.11

TranslatorsMAD➠Perl6

139

Page 140: Deploying Perl 6 - Pugs · 2008-10-05 · Pugs 6.2.12 •Released on June 26th •3x faster build time •10x faster compilation •2x faster runtime •2000+ commits since 6.2.11

Multiversioningonly.pm

140

Page 141: Deploying Perl 6 - Pugs · 2008-10-05 · Pugs 6.2.12 •Released on June 26th •3x faster build time •10x faster compilation •2x faster runtime •2000+ commits since 6.2.11

• #Theusecase• usev5;• packageFoo1;subnew{bless{},'Foo1'}• packageFoo2;subnew{bless{},'Foo2'}• packageTest1;subt1{Common‐>foo}• packageTest2;subt2{Common‐>foo}• packageCommon;subfoo{Foo‐>new}

• packagemain;• warnTest1::t1();#Foo1object• warnTest2::t2();#Foo2object

•Foo

Common

Test1 Test2

Foo1 Foo2

141

Page 142: Deploying Perl 6 - Pugs · 2008-10-05 · Pugs 6.2.12 •Released on June 26th •3x faster build time •10x faster compilation •2x faster runtime •2000+ commits since 6.2.11

• #Theimplementation• usev5;• BEGIN{$^P|=0x01}• • my%dep_map=(• Test1=>{Foo=>'Foo1'},• Test2=>{Foo=>'Foo2'},• );• • subDB::sub{• my$cls=(split(/::/,$DB::sub,2))[0];• while(my($k,$v)=each%{$dep_map{$cls}}){• %{"$k\::"}=%{"$v\::"};• }• goto&$DB::sub;• }•

142

Page 143: Deploying Perl 6 - Pugs · 2008-10-05 · Pugs 6.2.12 •Released on June 26th •3x faster build time •10x faster compilation •2x faster runtime •2000+ commits since 6.2.11

CommitsWelcome!

143

Page 144: Deploying Perl 6 - Pugs · 2008-10-05 · Pugs 6.2.12 •Released on June 26th •3x faster build time •10x faster compilation •2x faster runtime •2000+ commits since 6.2.11

WhenwillPerl6bereleased?

144

Page 145: Deploying Perl 6 - Pugs · 2008-10-05 · Pugs 6.2.12 •Released on June 26th •3x faster build time •10x faster compilation •2x faster runtime •2000+ commits since 6.2.11

ByChristmas!

145

Page 146: Deploying Perl 6 - Pugs · 2008-10-05 · Pugs 6.2.12 •Released on June 26th •3x faster build time •10x faster compilation •2x faster runtime •2000+ commits since 6.2.11

WhenPerl6isout,everydaywillbelike

Christmas!❆

146

Page 147: Deploying Perl 6 - Pugs · 2008-10-05 · Pugs 6.2.12 •Released on June 26th •3x faster build time •10x faster compilation •2x faster runtime •2000+ commits since 6.2.11

TheAdventstartsNow

147

Page 148: Deploying Perl 6 - Pugs · 2008-10-05 · Pugs 6.2.12 •Released on June 26th •3x faster build time •10x faster compilation •2x faster runtime •2000+ commits since 6.2.11

148

Page 149: Deploying Perl 6 - Pugs · 2008-10-05 · Pugs 6.2.12 •Released on June 26th •3x faster build time •10x faster compilation •2x faster runtime •2000+ commits since 6.2.11

Thank you!☺

149