COMS 3101 Programming Languages: Perl Lecture 6

Total Page:16

File Type:pdf, Size:1020Kb

COMS 3101 Programming Languages: Perl Lecture 6 COMS 3101 Programming Languages: Perl Lecture 6 Fall 2013 Instructor: Ilia Vovsha http://www.cs.columbia.edu/~vovsha/coms3101/perl Lecture Outline Concepts: Subroutine references Symbolic references Saving structures OOP (inheritance) More on modules: CPAN Prgamas: fields, base Module: Class::Struct Pod (plain old documentation) Common remarks 6.2 Concepts Subroutine references Copying referent Symbolic references Saving structures 6.3 Subroutine References Reference to a sub follows similar rules Can use backslash or anonymous sub max { …. }# Anonymous $sub_ ref = \&max; $sub_ ref = sub { …. }; # Calling subroutine &$sub_ref(); $subfb_ref ‐> (); $sub_ref ‐> (1,4,6,8); # Call sub using string my %cmds = ( “process” => \&process_data, “clear” => \&clear_data, “any” => sub {….} ); $cmds{$str} ‐> (); 6.4 Copy Referent To copy referent for another reference: $aref1 = [ 1,2,3 ]; $aref2 = [ 4,5,6 ]; $aref2 = $aref1 # Not a copy! Rather refers to the same location! $aref2 = [ @$aref1 ];# Create a new anonymous reference $href2 = { %{$href1 } }; # Same approach for hashes 6.5 Symbolic References Refers to the name of a variable If we try to dereference, we get access to variable! Can be dangerous! (use strict ‘refs’ to prohibit) $N = “V”; $$N = 5; # Set scalar $V = 5 $N ‐> [0] = 6; # Set element 0 of array V to 6 $N ‐> {key} = 7; # Set key of hash V to 7 &$N; # Call sub V 6.6 Saving Data Structures Save any DS to use later: Data::Dumper module Turn DS into a string, save externally to a file, read in the file and recover DS with eval / do CPAN module Storable: more efficient, but cannot be shared across different architectures use Data::Dumper; open (OUTFILE, “> filename”); print OUTFILE Data::Dumper‐>Dump([\%hash], [‘*hash’]); open (INFILE, “< filename”); undef $/; # undef record separator, read entire file eval <INFILE>; # recreate %hash use Storable; store(\%hash, “filename”); $href = retrieve(“filename”); %hash = % { retrieve(“filename”) } ; 6.7 OOP (inheritance) We can define a hierarchy of classes to share methods between them Deridived / sub class ihinher its methdhods from base / parent / super class The super‐classes are specified in the @ISA array (declared with our) of the derived class. Each element of the array is a package (class) name Single Inheritance: one parent class (search parent for methods) Multiple Inheritance: multiple parent classes (search left‐to‐right through @ISA array, depth‐first order) Once method is found, store in cache for efficiency If @ISA is changed, the cache is invalidated (avoid it if you can!) Constructor Inheritance: no automatic call to base class constructor 6.8 OOP (method search) If method not defined in class: search @ISA at runtime when a call is made ShSearch order given multip le parent classes: lftleft‐to‐rihtight throug h @ISA array, depth‐first # Nissan.pm package Nissan; our @ISA = (Car, Truck); # Call: Nissan‐>new()‐>build(“sedan”); # Search order: 1. Check if method (build) is defined in class (Nissan) 2. Check if method is defined in “$Nissan:: ISA[0]” (Car class) 3. Check if method is defined in @Car::ISA (Car’s @ISA array) 4. When done with ISA[0], repeat steps 2,3, for ISA[1] (Truck class) 6.9 Scoped Variables my • creates private variable visible only within block • hidden from outside of enclosing scope, and hides previously declared variables with identical name • confines name & value to scope • suitable for scalar/array/hash variables our • confines name only to scope (no effect on visibility) • suitable for scalar/array/hash variables • used to access global variables, their initial value inside block unchanged • effects or assignment persist after the scope of declaration (block) local • confines value only to scope • suitable for scalar/array/hash + more variables • initial value for variable is () or undef • value of variable is restored no matter how you exit the block (changes thrown away) • “dynamic” scope: value of variable depends on scope & changes during run‐time • ‘my’ is preferable over ‘local’ APP Scoped Variables (example) $office = "global"; # Global $office &say(); # prints "global" &barney(); # prints "barney global", lexical scope; &fred(); # prints "fred fred", dynamic scope, &say(); # prints "global", restored after &fred() sub say { print "$office\n"; } # print the $office sub barney { my $office = "barney"; print "$office "; &say(); } sub fred { local $office = "fred"; print "$office "; &say(); } APP CPAN Comprehensive Perl Archive Network: repository for modules Installing a module: # Download the .gz file from CPAN, unzip and go to proper directory # Build: perl MakeFile.pl make make test # Install: make install Alternative: install cpanm module cpan App::cpanminus # Install cpanm cpanm Module::Name # get, unpack, build, and install modules 6.12 Method invocation (indirect) Direct approach: arrow operator … INVOCANT‐>METHOD() IdiIndirec t approach: can be ambiguous … METHOD INVOCANT ARGS $mazda = Car ‐> new(); # Class: Car, Method: new, Object: $mazda $mazda ‐> drive(“slow”); # Instance: $mazda, Method: drive $mazda = new Car; # Same as above drive $mazda “slow”; 6.13 Pseudohashes (deprecated!) Pseudohash: reference to array whose 1st element is reference to hash Purpose: can be ttdtreated as array ref or hhhash ref Deprecated: slower, muddling, problems with multiple inheritance Alternatives: restricted hashes (Hash::Util) $ph_ref = [ {maker => 1, color => 2}, “mazda”, “red” ]; # Definition $ph_ref‐>{color}; # Access element (href) $ph_ ref‐>[2]; # Access element (aref) $ph_ref‐>[0]{cost} = 3; # Add element $ph_ref‐>[3] = “cheap”; 6.14 fields pragma “Experimental” feature, enables compile‐time type‐verified class fields NtNote: pseudhdohas hes removed from perl 5105.10 The related base pragma provides for field inheritance from parent class fields::new() creates and blesses a pseudohash comprised of the fields declared using the fields pragma into the specified class. package Car; package Car; use fields qw(maker color cost); sub new { my $class = shift; sub new { my $self = { my $class = shift; maker => “mazda”, my $self = fields::new($class); color => “red”, cost => “” $self‐>{maker} = “mazda”; }; $self‐>{color} = “red”; bless ($self, $class); return $self; return $self; } } 6.15 fields pragma (example) Prevents typos in field names (otherwise accepted): package Car; use fields qw(maker color cost); sub new { my $class = shift; my $self = fields::new($class); $self‐>{{}maker} = “mazda”; $self‐>{color} = “red”; return $self; } sub some_fun { my $self = shift; $self‐>{colour} = “blue”; # Compiler throws error! } 6.16 base pragma Simplifies inheritance in two ways: Assigns to @ISA without having to declare “our @ISA” Inherits fields of parent class if ‘fields’ pragma is used Problem: multiple inheritance is not supported! (raises exception if more than one base class uses ‘fields’ ) package Mazda; use base qw(Car); # Mazda is subclass of Car use fields qw(vehicle mpg); # Inherits fields from Car class, adds two new fields sub new { my $class = shift; my $lf$self = fldfields::new ($l($class ); $self‐>{maker} = “mazda”; # inherited $self‐>{mpg} = 25; # own attribute return $$;self; } 6.17 Class::Struct module Standard module to declare a record‐like class ‘stttruct’ ftifunction provides for constttructor and accessor metho ds on the fly Constructor named ‘new’ Accessor method for each member specified by the hash reference package Car; use Car; use Class::Struct; struct Car => { $kia = Car ‐> new(); name => ‘$’, # SlScalar varibliable $kia ‐> name(“CX5”); size => ‘@’, # array variable $aref = $kia‐>size; specs => ‘%’, # hash variable $kia ‐> size(0,100); type => ‘Truck’, # Truck object $href = $kia‐>spp;ecs; } $kia ‐> specs(‘color’, ‘white’); 1; 6.18 Pod Plain Old Documentation: simple text markup format Simple to use, not too expressive Embed documentation in Perl modules and scripts Translators: convert Pod to various formats • pod2text, pod2html, pod2latex CttContent div ide d itinto paragraphs by empty lines: • verbatim: begins with tabs/spaces (left unformatted) • command: begins with equal sign (format according to directive) • ordinary: begins with something else (minimal formatting) Perl engine throws out all Pod markup 6.19 Pod (example) =head1 Boring Module Synopsis Some I<boring> text about the module followed by even more B<boring> code use Boring ; my $object = Boring‐>new(); =cut sub some_fun { print “Documentation ”; print “is for old people!\n”; } =pod 6.20 Pod (example ctd) =head2 List of methods =over 4 =item 1. First method enforces mild boredom =item 2. Second method puts you to sleep =back 6.21 Exercise (In Class) Remove specific field from a list Suppose you have a row of data stored in a string. The fields of your row may be separated with any delimiter(s). For example: “Name Height Weight 2”. Write a subroutine that deletes the Nth field (N is an argument), and returns the shortened string. 6.22 Common Remarks Filehandles: open($fh, “>filename”); print $fh “ABC”, “\t”, “DEF”; # works fine print $fh, “ABC”, “\t”, “DEF” ; # WRONG: prints to STDOUT Context: ($x) = (aa,bb,cc); # $x gets value “aa” $x = (aa,bb,cc); # $x gets value “cc” @arr = (aa,bb,cc); $x = @arr; # $x = 3 6.23 Common Remarks Efficiency: hashes instead of linear searches # Search $word in @keywords # Method 1: foreach (@keywords) { print “”“yes” if ($wor d eq $)$_); } # Method 2 (potentiall y more efficient): %h; for (@keywords) { $h{$_}++; } print “yes” if ($h{$word} > 0); 6.24 Common
Recommended publications
  • Programming Languages
    Programming Languages Recitation Summer 2014 Recitation Leader • Joanna Gilberti • Email: [email protected] • Office: WWH, Room 328 • Web site: http://cims.nyu.edu/~jlg204/courses/PL/index.html Homework Submission Guidelines • Submit all homework to me via email (at [email protected] only) on the due date. • Email subject: “PL– homework #” (EXAMPLE: “PL – Homework 1”) • Use file naming convention on all attachments: “firstname_lastname_hw_#” (example: "joanna_gilberti_hw_1") • In the case multiple files are being submitted, package all files into a ZIP file, and name the ZIP file using the naming convention above. What’s Covered in Recitation • Homework Solutions • Questions on the homeworks • For additional questions on assignments, it is best to contact me via email. • I will hold office hours (time will be posted on the recitation Web site) • Run sample programs that demonstrate concepts covered in class Iterative Languages Scoping • Sample Languages • C: static-scoping • Perl: static and dynamic-scoping (use to be only dynamic scoping) • Both gcc (to run C programs), and perl (to run Perl programs) are installed on the cims servers • Must compile the C program with gcc, and then run the generated executable • Must include the path to the perl executable in the perl script Basic Scope Concepts in C • block scope (nested scope) • run scope_levels.c (sl) • ** block scope: set of statements enclosed in braces {}, and variables declared within a block has block scope and is active and accessible from its declaration to the end of the block
    [Show full text]
  • Chapter 5 Names, Bindings, and Scopes
    Chapter 5 Names, Bindings, and Scopes 5.1 Introduction 198 5.2 Names 199 5.3 Variables 200 5.4 The Concept of Binding 203 5.5 Scope 211 5.6 Scope and Lifetime 222 5.7 Referencing Environments 223 5.8 Named Constants 224 Summary • Review Questions • Problem Set • Programming Exercises 227 CMPS401 Class Notes (Chap05) Page 1 / 20 Dr. Kuo-pao Yang Chapter 5 Names, Bindings, and Scopes 5.1 Introduction 198 Imperative languages are abstractions of von Neumann architecture – Memory: stores both instructions and data – Processor: provides operations for modifying the contents of memory Variables are characterized by a collection of properties or attributes – The most important of which is type, a fundamental concept in programming languages – To design a type, must consider scope, lifetime, type checking, initialization, and type compatibility 5.2 Names 199 5.2.1 Design issues The following are the primary design issues for names: – Maximum length? – Are names case sensitive? – Are special words reserved words or keywords? 5.2.2 Name Forms A name is a string of characters used to identify some entity in a program. Length – If too short, they cannot be connotative – Language examples: . FORTRAN I: maximum 6 . COBOL: maximum 30 . C99: no limit but only the first 63 are significant; also, external names are limited to a maximum of 31 . C# and Java: no limit, and all characters are significant . C++: no limit, but implementers often impose a length limitation because they do not want the symbol table in which identifiers are stored during compilation to be too large and also to simplify the maintenance of that table.
    [Show full text]
  • Introduction to Programming in Lisp
    Introduction to Programming in Lisp Supplementary handout for 4th Year AI lectures · D W Murray · Hilary 1991 1 Background There are two widely used languages for AI, viz. Lisp and Prolog. The latter is the language for Logic Programming, but much of the remainder of the work is programmed in Lisp. Lisp is the general language for AI because it allows us to manipulate symbols and ideas in a commonsense manner. Lisp is an acronym for List Processing, a reference to the basic syntax of the language and aim of the language. The earliest list processing language was in fact IPL developed in the mid 1950’s by Simon, Newell and Shaw. Lisp itself was conceived by John McCarthy and students in the late 1950’s for use in the newly-named field of artificial intelligence. It caught on quickly in MIT’s AI Project, was implemented on the IBM 704 and by 1962 to spread through other AI groups. AI is still the largest application area for the language, but the removal of many of the flaws of early versions of the language have resulted in its gaining somewhat wider acceptance. One snag with Lisp is that although it started out as a very pure language based on mathematic logic, practical pressures mean that it has grown. There were many dialects which threaten the unity of the language, but recently there was a concerted effort to develop a more standard Lisp, viz. Common Lisp. Other Lisps you may hear of are FranzLisp, MacLisp, InterLisp, Cambridge Lisp, Le Lisp, ... Some good things about Lisp are: • Lisp is an early example of an interpreted language (though it can be compiled).
    [Show full text]
  • [PDF] Beginning Raku
    Beginning Raku Arne Sommer Version 1.00, 22.12.2019 Table of Contents Introduction. 1 The Little Print . 1 Reading Tips . 2 Content . 3 1. About Raku. 5 1.1. Rakudo. 5 1.2. Running Raku in the browser . 6 1.3. REPL. 6 1.4. One Liners . 8 1.5. Running Programs . 9 1.6. Error messages . 9 1.7. use v6. 10 1.8. Documentation . 10 1.9. More Information. 13 1.10. Speed . 13 2. Variables, Operators, Values and Procedures. 15 2.1. Output with say and print . 15 2.2. Variables . 15 2.3. Comments. 17 2.4. Non-destructive operators . 18 2.5. Numerical Operators . 19 2.6. Operator Precedence . 20 2.7. Values . 22 2.8. Variable Names . 24 2.9. constant. 26 2.10. Sigilless variables . 26 2.11. True and False. 27 2.12. // . 29 3. The Type System. 31 3.1. Strong Typing . 31 3.2. ^mro (Method Resolution Order) . 33 3.3. Everything is an Object . 34 3.4. Special Values . 36 3.5. :D (Defined Adverb) . 38 3.6. Type Conversion . 39 3.7. Comparison Operators . 42 4. Control Flow . 47 4.1. Blocks. 47 4.2. Ranges (A Short Introduction). 47 4.3. loop . 48 4.4. for . 49 4.5. Infinite Loops. 53 4.6. while . 53 4.7. until . 54 4.8. repeat while . 55 4.9. repeat until. 55 4.10. Loop Summary . 56 4.11. if . ..
    [Show full text]
  • Files: Cpan/Test-Harness/* Copyright: Copyright (C) 2007-2011
    Files: cpan/Test-Harness/* Copyright: Copyright (c) 2007-2011, Andy Armstrong <[email protected]>. All rights reserved. License: GPL-1+ or Artistic Comment: This module is free software; you can redistribute it and/or modify it under the same terms as Perl itself. Files: cpan/Test-Harness/lib/TAP/Parser.pm Copyright: Copyright 2006-2008 Curtis "Ovid" Poe, all rights reserved. License: GPL-1+ or Artistic Comment: This program is free software; you can redistribute it and/or modify it under the same terms as Perl itself. Files: cpan/Test-Harness/lib/TAP/Parser/YAMLish/Reader.pm Copyright: Copyright 2007-2011 Andy Armstrong. Portions copyright 2006-2008 Adam Kennedy. License: GPL-1+ or Artistic Comment: This program is free software; you can redistribute it and/or modify it under the same terms as Perl itself. Files: cpan/Test-Simple/* Copyright: Copyright 2001-2008 by Michael G Schwern <[email protected]>. License: GPL-1+ or Artistic Comment: This program is free software; you can redistribute it and/or modify it under the same terms as Perl itself. Files: cpan/Test-Simple/lib/Test/Builder.pm Copyright: Copyright 2002-2008 by chromatic <[email protected]> and Michael G Schwern E<[email protected]>. License: GPL-1+ or Artistic 801 Comment: This program is free software; you can redistribute it and/or modify it under the same terms as Perl itself. Files: cpan/Test-Simple/lib/Test/Builder/Tester/Color.pm Copyright: Copyright Mark Fowler <[email protected]> 2002. License: GPL-1+ or Artistic Comment: This program is free software; you can redistribute it and/or modify it under the same terms as Perl itself.
    [Show full text]
  • Learning Perl Through Examples Part 2 L1110@BUMC 2/22/2017
    www.perl.org Learning Perl Through Examples Part 2 L1110@BUMC 2/22/2017 Yun Shen, Programmer Analyst [email protected] IS&T Research Computing Services Spring 2017 Tutorial Resource Before we start, please take a note - all the codes and www.perl.org supporting documents are accessible through: • http://rcs.bu.edu/examples/perl/tutorials/ Yun Shen, Programmer Analyst [email protected] IS&T Research Computing Services Spring 2017 Sign In Sheet We prepared sign-in sheet for each one to sign www.perl.org We do this for internal management and quality control So please SIGN IN if you haven’t done so Yun Shen, Programmer Analyst [email protected] IS&T Research Computing Services Spring 2017 Evaluation One last piece of information before we start: www.perl.org • DON’T FORGET TO GO TO: • http://rcs.bu.edu/survey/tutorial_evaluation.html Leave your feedback for this tutorial (both good and bad as long as it is honest are welcome. Thank you) Yun Shen, Programmer Analyst [email protected] IS&T Research Computing Services Spring 2017 Today’s Topic • Basics on creating your code www.perl.org • About Today’s Example • Learn Through Example 1 – fanconi_example_io.pl • Learn Through Example 2 – fanconi_example_str_process.pl • Learn Through Example 3 – fanconi_example_gene_anno.pl • Extra Examples (if time permit) Yun Shen, Programmer Analyst [email protected] IS&T Research Computing Services Spring 2017 www.perl.org Basics on creating your code How to combine specs, tools, modules and knowledge. Yun Shen, Programmer Analyst [email protected] IS&T Research Computing
    [Show full text]
  • Scope in Fortran 90
    Scope in Fortran 90 The scope of objects (variables, named constants, subprograms) within a program is the portion of the program in which the object is visible (can be use and, if it is a variable, modified). It is important to understand the scope of objects not only so that we know where to define an object we wish to use, but also what portion of a program unit is effected when, for example, a variable is changed, and, what errors might occur when using identifiers declared in other program sections. Objects declared in a program unit (a main program section, module, or external subprogram) are visible throughout that program unit, including any internal subprograms it hosts. Such objects are said to be global. Objects are not visible between program units. This is illustrated in Figure 1. Figure 1: The figure shows three program units. Main program unit Main is a host to the internal function F1. The module program unit Mod is a host to internal function F2. The external subroutine Sub hosts internal function F3. Objects declared inside a program unit are global; they are visible anywhere in the program unit including in any internal subprograms that it hosts. Objects in one program unit are not visible in another program unit, for example variable X and function F3 are not visible to the module program unit Mod. Objects in the module Mod can be imported to the main program section via the USE statement, see later in this section. Data declared in an internal subprogram is only visible to that subprogram; i.e.
    [Show full text]
  • Programming Language Concepts/Binding and Scope
    Programming Language Concepts/Binding and Scope Programming Language Concepts/Binding and Scope Onur Tolga S¸ehito˘glu Bilgisayar M¨uhendisli˘gi 11 Mart 2008 Programming Language Concepts/Binding and Scope Outline 1 Binding 6 Declarations 2 Environment Definitions and Declarations 3 Block Structure Sequential Declarations Monolithic block structure Collateral Declarations Flat block structure Recursive declarations Nested block structure Recursive Collateral Declarations 4 Hiding Block Expressions 5 Static vs Dynamic Scope/Binding Block Commands Static binding Block Declarations Dynamic binding 7 Summary Programming Language Concepts/Binding and Scope Binding Binding Most important feature of high level languages: programmers able to give names to program entities (variable, constant, function, type, ...). These names are called identifiers. Programming Language Concepts/Binding and Scope Binding Binding Most important feature of high level languages: programmers able to give names to program entities (variable, constant, function, type, ...). These names are called identifiers. definition of an identifier ⇆ used position of an identifier. Formally: binding occurrence ⇆ applied occurrence. Programming Language Concepts/Binding and Scope Binding Binding Most important feature of high level languages: programmers able to give names to program entities (variable, constant, function, type, ...). These names are called identifiers. definition of an identifier ⇆ used position of an identifier. Formally: binding occurrence ⇆ applied occurrence. Identifiers are declared once, used n times. Programming Language Concepts/Binding and Scope Binding Binding Most important feature of high level languages: programmers able to give names to program entities (variable, constant, function, type, ...). These names are called identifiers. definition of an identifier ⇆ used position of an identifier. Formally: binding occurrence ⇆ applied occurrence. Identifiers are declared once, used n times.
    [Show full text]
  • An Introduction to Raku
    Perl6 An Introduction Perl6 Raku An Introduction The nuts and bolts ● Spec tests ○ Complete test suite for the language. ○ Anything that passes the suite is Raku. The nuts and bolts ● Spec tests ○ Complete test suite for the language. ○ Anything that passes the suite is Raku. ● Rakudo ○ Compiler, compiles Raku to be run on a number of target VM’s (92% written in Raku) The nuts and bolts ● Spec tests ○ Complete test suite for the language. ○ Anything that passes the suite is Raku. ● Rakudo ○ Compiler, compiles Raku to be run on a number of target VM’s (92% written in Raku) ● MoarVM ○ Short for "Metamodel On A Runtime" ○ Threaded, garbage collected VM optimised for Raku The nuts and bolts ● Spec tests ○ Complete test suite for the language. ○ Anything that passes the suite is Raku. ● Rakudo ○ Compiler, compiles Raku to be run on a number of target VM’s (92% written in Raku) ● MoarVM ○ Short for "Metamodel On A Runtime" ○ Threaded, garbage collected VM optimised for Raku ● JVM ○ The Java Virtual machine. The nuts and bolts ● Spec tests ○ Complete test suite for the language. ○ Anything that passes the suite is Raku. ● Rakudo ○ Compiler, compiles Raku to be run on a number of target VM’s (92% written in Raku) ● MoarVM ○ Short for "Metamodel On A Runtime" ○ Threaded, garbage collected VM optimised for Raku ● JVM ○ The Java Virtual machine. ● Rakudo JS (Experimental) ○ Compiles your Raku to a Javascript file that can run in a browser Multiple Programming Paradigms What’s your poison? Multiple Programming Paradigms What’s your poison? ● Functional
    [Show full text]
  • LAMP and the REST Architecture Step by Step Analysis of Best Practice
    LAMP and the REST Architecture Step by step analysis of best practice Santiago Gala High Sierra Technology S.L.U. Minimalistic design using a Resource Oriented Architecture What is a Software Platform (Ray Ozzie ) ...a relevant and ubiquitous common service abstraction Creates value by leveraging participants (e- cosystem) Hardware developers (for OS level platforms) Software developers Content developers Purchasers Administrators Users Platform Evolution Early stage: not “good enough” solution differentiation, innovation, value flows Later: modular architecture, commoditiza- tion, cloning no premium, just speed to market and cost driven The platform effect - ossification, followed by cloning - is how Chris- tensen-style modularity comes to exist in the software industry. What begins as a value-laden proprietary platform becomes a replaceable component over time, and the most successful of these components finally define the units of exchange that power commodity networks. ( David Stutz ) Platform Evolution (II) Example: PostScript Adobe Apple LaserWriter Aldus Pagemaker Desktop Publishing Linotype imagesetters NeWS (Display PostScript) OS X standards (XSL-FO -> PDF, Scribus, OOo) Software Architecture ...an abstraction of the runtime elements of a software system during some phase of its oper- ation. A system may be composed of many lev- els of abstraction and many phases of opera- tion, each with its own software architecture. Roy Fielding (REST) What is Architecture? Way to partition a system in components
    [Show full text]
  • Linux Lunacy V & Perl Whirl
    SPEAKERS Linux Lunacy V Nicholas Clark Scott Collins & Perl Whirl ’05 Mark Jason Dominus Andrew Dunstan Running Concurrently brian d foy Jon “maddog” Hall Southwestern Caribbean Andrew Morton OCTOBER 2ND TO 9TH, 2005 Ken Pugh Allison Randal Linux Lunacy V and Perl Whirl ’05 run concurrently. Attendees can mix and match, choosing courses from Randal Schwartz both conferences. Doc Searls Ted Ts’o Larry Wall Michael Warfield DAY PORT ARRIVE DEPART CONFERENCE SESSIONS Sunday, Oct 2 Tampa, Florida — 4:00pm 7:15pm, Bon Voyage Party Monday, Oct 3 Cruising The Caribbean — — 8:30am – 5:00pm Tuesday, Oct 4 Grand Cayman 7:00am 4:00pm 4:00pm – 7:30pm Wednesday, Oct 5 Costa Maya, Mexico 10:00am 6:00pm 6:00pm – 7:30pm Thursday, Oct 6 Cozumel, Mexico 7:00am 6:00pm 6:00pm – 7:30pm Friday, Oct 7 Belize City, Belize 7:30am 4:30pm 4:30pm – 8:00pm Saturday, Oct 8 Cruising The Caribbean — — 8:30am – 5:00pm Sunday, Oct 9 Tampa, Florida 8:00am — Perl Whirl ’05 and Linux Lunacy V Perl Whirl ’05 are running concurrently. Attendees can mix and match, choosing courses Seminars at a Glance from both conferences. You may choose any combination Regular Expression Mastery (half day) Programming with Iterators and Generators of full-, half-, or quarter-day seminars Speaker: Mark Jason Dominus Speaker: Mark Jason Dominus (half day) for a total of two-and-one-half Almost everyone has written a regex that failed Sometimes you’ll write a function that takes too (2.5) days’ worth of sessions. The to match something they wanted it to, or that long to run because it produces too much useful conference fee is $995 and includes matched something they thought it shouldn’t, and information.
    [Show full text]
  • Current Issues in Perl Programming Overview
    Current Issues In Perl Programming Lukas Thiemeier Current Issues In Perl Programming DESY, Zeuthen, 2011-04-26 Overview > Introduction > Moose – modern object-orientation in Perl > DBIx::Class – comfortable an flexible database access > Catalyst – a MVC web application framework Lukas Thiemeier | Current issues in Perl programming | 2011-04-26 | Page 2 Introduction > What is this talk about? . Modern Perl can do more than most people know . A quick overview about some modern features . Illustrated with some short examples > What is this talk not about? . Not an introduction to the Perl programming language . Not a Perl tutorial . Not a complete list of all current issues in Perl 5 . Not a complete HowTo for the covered topics Lukas Thiemeier | Current issues in Perl programming | 2011-04-26 | Page 3 Overview > Introduction > Moose – modern object-orientation in Perl . About Moose . Creating and extending classes . Some advanced features > DBIx::Class – comfortable an flexible database access > Catalyst – a MVC web application framework Lukas Thiemeier | Current issues in Perl programming | 2011-04-26 | Page 4 About Moose > “A postmodern object system for Perl 5” > Based on Class::MOP, a metaclass system for Perl 5 > Look and feel similar to the Perl 6 object syntax “The main goal of Moose is to make Perl 5 Object Oriented programming easier, more consistent and less tedious. With Moose you can to think more about what you want to do and less about the mechanics of OOP.” Lukas Thiemeier | Current issues in Perl programming | 2011-04-26 | Page 5 Creating Classes > A very simple Moose-Class: . Create a file called “MyAnimalClass.pm” with the following content: package MyAnimalClass; use Moose; no Moose; 1; Lukas Thiemeier | Current issues in Perl programming | 2011-04-26 | Page 6 Creating Classes > A very simple Moose-Class: The package name is used as class name.
    [Show full text]