Suche senden
Hochladen
Advanced modulinos
•
2 gefällt mir
•
2,829 views
brian d foy
Folgen
Technologie
Melden
Teilen
Melden
Teilen
1 von 34
Jetzt herunterladen
Downloaden Sie, um offline zu lesen
Empfohlen
Advanced modulinos trial
Advanced modulinos trial
brian d foy
Bag of tricks
Bag of tricks
brian d foy
Perl Bag of Tricks - Baltimore Perl mongers
Perl Bag of Tricks - Baltimore Perl mongers
brian d foy
The Magic Of Tie
The Magic Of Tie
brian d foy
Parsing JSON with a single regex
Parsing JSON with a single regex
brian d foy
Learning Perl 6 (NPW 2007)
Learning Perl 6 (NPW 2007)
brian d foy
Learning Perl 6
Learning Perl 6
brian d foy
Text in search queries with examples in Perl 6
Text in search queries with examples in Perl 6
Andrew Shitov
Empfohlen
Advanced modulinos trial
Advanced modulinos trial
brian d foy
Bag of tricks
Bag of tricks
brian d foy
Perl Bag of Tricks - Baltimore Perl mongers
Perl Bag of Tricks - Baltimore Perl mongers
brian d foy
The Magic Of Tie
The Magic Of Tie
brian d foy
Parsing JSON with a single regex
Parsing JSON with a single regex
brian d foy
Learning Perl 6 (NPW 2007)
Learning Perl 6 (NPW 2007)
brian d foy
Learning Perl 6
Learning Perl 6
brian d foy
Text in search queries with examples in Perl 6
Text in search queries with examples in Perl 6
Andrew Shitov
Perl5i
Perl5i
Marcos Rebelo
PHP pod mikroskopom
PHP pod mikroskopom
Saša Stamenković
Debugging: Rules And Tools - PHPTek 11 Version
Debugging: Rules And Tools - PHPTek 11 Version
Ian Barber
Perl 6 by example
Perl 6 by example
Andrew Shitov
Teaching Your Machine To Find Fraudsters
Teaching Your Machine To Find Fraudsters
Ian Barber
20 modules i haven't yet talked about
20 modules i haven't yet talked about
Tatsuhiko Miyagawa
Good Evils In Perl (Yapc Asia)
Good Evils In Perl (Yapc Asia)
Kang-min Liu
Perl6 grammars
Perl6 grammars
Andrew Shitov
Melhorando sua API com DSLs
Melhorando sua API com DSLs
Augusto Pascutti
PHP PPT FILE
PHP PPT FILE
AbhishekSharma2958
The most exciting features of PHP 7.1
The most exciting features of PHP 7.1
Zend by Rogue Wave Software
I, For One, Welcome Our New Perl6 Overlords
I, For One, Welcome Our New Perl6 Overlords
heumann
What's New in Perl? v5.10 - v5.16
What's New in Perl? v5.10 - v5.16
Ricardo Signes
News of the Symfony2 World
News of the Symfony2 World
Fabien Potencier
6 things about perl 6
6 things about perl 6
brian d foy
PHPCon 2016: PHP7 by Witek Adamus / XSolve
PHPCon 2016: PHP7 by Witek Adamus / XSolve
XSolve
My Development Story
My Development Story
Takahiro Fujiwara
The Perl6 Type System
The Perl6 Type System
abrummett
Refactoring using Codeception
Refactoring using Codeception
Jeroen van Dijk
Introdução ao Perl 6
Introdução ao Perl 6
garux
The Whitespace in the Perl Community
The Whitespace in the Perl Community
brian d foy
CPAN Workshop, Chicago 2014
CPAN Workshop, Chicago 2014
brian d foy
Weitere ähnliche Inhalte
Was ist angesagt?
Perl5i
Perl5i
Marcos Rebelo
PHP pod mikroskopom
PHP pod mikroskopom
Saša Stamenković
Debugging: Rules And Tools - PHPTek 11 Version
Debugging: Rules And Tools - PHPTek 11 Version
Ian Barber
Perl 6 by example
Perl 6 by example
Andrew Shitov
Teaching Your Machine To Find Fraudsters
Teaching Your Machine To Find Fraudsters
Ian Barber
20 modules i haven't yet talked about
20 modules i haven't yet talked about
Tatsuhiko Miyagawa
Good Evils In Perl (Yapc Asia)
Good Evils In Perl (Yapc Asia)
Kang-min Liu
Perl6 grammars
Perl6 grammars
Andrew Shitov
Melhorando sua API com DSLs
Melhorando sua API com DSLs
Augusto Pascutti
PHP PPT FILE
PHP PPT FILE
AbhishekSharma2958
The most exciting features of PHP 7.1
The most exciting features of PHP 7.1
Zend by Rogue Wave Software
I, For One, Welcome Our New Perl6 Overlords
I, For One, Welcome Our New Perl6 Overlords
heumann
What's New in Perl? v5.10 - v5.16
What's New in Perl? v5.10 - v5.16
Ricardo Signes
News of the Symfony2 World
News of the Symfony2 World
Fabien Potencier
6 things about perl 6
6 things about perl 6
brian d foy
PHPCon 2016: PHP7 by Witek Adamus / XSolve
PHPCon 2016: PHP7 by Witek Adamus / XSolve
XSolve
My Development Story
My Development Story
Takahiro Fujiwara
The Perl6 Type System
The Perl6 Type System
abrummett
Refactoring using Codeception
Refactoring using Codeception
Jeroen van Dijk
Introdução ao Perl 6
Introdução ao Perl 6
garux
Was ist angesagt?
(20)
Perl5i
Perl5i
PHP pod mikroskopom
PHP pod mikroskopom
Debugging: Rules And Tools - PHPTek 11 Version
Debugging: Rules And Tools - PHPTek 11 Version
Perl 6 by example
Perl 6 by example
Teaching Your Machine To Find Fraudsters
Teaching Your Machine To Find Fraudsters
20 modules i haven't yet talked about
20 modules i haven't yet talked about
Good Evils In Perl (Yapc Asia)
Good Evils In Perl (Yapc Asia)
Perl6 grammars
Perl6 grammars
Melhorando sua API com DSLs
Melhorando sua API com DSLs
PHP PPT FILE
PHP PPT FILE
The most exciting features of PHP 7.1
The most exciting features of PHP 7.1
I, For One, Welcome Our New Perl6 Overlords
I, For One, Welcome Our New Perl6 Overlords
What's New in Perl? v5.10 - v5.16
What's New in Perl? v5.10 - v5.16
News of the Symfony2 World
News of the Symfony2 World
6 things about perl 6
6 things about perl 6
PHPCon 2016: PHP7 by Witek Adamus / XSolve
PHPCon 2016: PHP7 by Witek Adamus / XSolve
My Development Story
My Development Story
The Perl6 Type System
The Perl6 Type System
Refactoring using Codeception
Refactoring using Codeception
Introdução ao Perl 6
Introdução ao Perl 6
Andere mochten auch
The Whitespace in the Perl Community
The Whitespace in the Perl Community
brian d foy
CPAN Workshop, Chicago 2014
CPAN Workshop, Chicago 2014
brian d foy
Perl Conferences for Beginners
Perl Conferences for Beginners
brian d foy
Tour of the Perl docs
Tour of the Perl docs
brian d foy
Perl Power Tools - Saint Perl 6
Perl Power Tools - Saint Perl 6
brian d foy
6 more things about Perl 6
6 more things about Perl 6
brian d foy
I ❤ CPAN
I ❤ CPAN
brian d foy
Create and upload your first Perl module to CPAN
Create and upload your first Perl module to CPAN
brian d foy
The Surprisingly Tense History of the Schwartzian Transform
The Surprisingly Tense History of the Schwartzian Transform
brian d foy
Perl 5.28 new features
Perl 5.28 new features
brian d foy
Andere mochten auch
(10)
The Whitespace in the Perl Community
The Whitespace in the Perl Community
CPAN Workshop, Chicago 2014
CPAN Workshop, Chicago 2014
Perl Conferences for Beginners
Perl Conferences for Beginners
Tour of the Perl docs
Tour of the Perl docs
Perl Power Tools - Saint Perl 6
Perl Power Tools - Saint Perl 6
6 more things about Perl 6
6 more things about Perl 6
I ❤ CPAN
I ❤ CPAN
Create and upload your first Perl module to CPAN
Create and upload your first Perl module to CPAN
The Surprisingly Tense History of the Schwartzian Transform
The Surprisingly Tense History of the Schwartzian Transform
Perl 5.28 new features
Perl 5.28 new features
Ähnlich wie Advanced modulinos
Perl6 in-production
Perl6 in-production
Andrew Shitov
Good Evils In Perl
Good Evils In Perl
Kang-min Liu
Descobrindo a linguagem Perl
Descobrindo a linguagem Perl
garux
Mojolicious. Веб в коробке!
Mojolicious. Веб в коробке!
Anatoly Sharifulin
Web 8 | Introduction to PHP
Web 8 | Introduction to PHP
Mohammad Imam Hossain
07 Introduction to PHP #burningkeyboards
07 Introduction to PHP #burningkeyboards
Denis Ristic
2014 database - course 2 - php
2014 database - course 2 - php
Hung-yu Lin
PHP 5.3 Overview
PHP 5.3 Overview
jsmith92
[PL] Jak nie zostać "programistą" PHP?
[PL] Jak nie zostać "programistą" PHP?
Radek Benkel
Modern Perl
Modern Perl
Marcos Rebelo
Perl Web Client
Perl Web Client
Flavio Poletti
Generating Power with Yield
Generating Power with Yield
Jason Myers
Programming in perl style
Programming in perl style
Bo Hua Yang
GettingStartedWithPHP
GettingStartedWithPHP
Nat Weerawan
Blog Hacks 2011
Blog Hacks 2011
Yusuke Wada
R57shell
R57shell
ady36
Perl basics for Pentesters
Perl basics for Pentesters
Sanjeev Kumar Jaiswal
PHPSpec BDD Framework
PHPSpec BDD Framework
Marcello Duarte
Introduction to PHP
Introduction to PHP
Bradley Holt
PHP Unit Testing
PHP Unit Testing
Tagged Social
Ähnlich wie Advanced modulinos
(20)
Perl6 in-production
Perl6 in-production
Good Evils In Perl
Good Evils In Perl
Descobrindo a linguagem Perl
Descobrindo a linguagem Perl
Mojolicious. Веб в коробке!
Mojolicious. Веб в коробке!
Web 8 | Introduction to PHP
Web 8 | Introduction to PHP
07 Introduction to PHP #burningkeyboards
07 Introduction to PHP #burningkeyboards
2014 database - course 2 - php
2014 database - course 2 - php
PHP 5.3 Overview
PHP 5.3 Overview
[PL] Jak nie zostać "programistą" PHP?
[PL] Jak nie zostać "programistą" PHP?
Modern Perl
Modern Perl
Perl Web Client
Perl Web Client
Generating Power with Yield
Generating Power with Yield
Programming in perl style
Programming in perl style
GettingStartedWithPHP
GettingStartedWithPHP
Blog Hacks 2011
Blog Hacks 2011
R57shell
R57shell
Perl basics for Pentesters
Perl basics for Pentesters
PHPSpec BDD Framework
PHPSpec BDD Framework
Introduction to PHP
Introduction to PHP
PHP Unit Testing
PHP Unit Testing
Mehr von brian d foy
Conferences for Beginners presentation
Conferences for Beginners presentation
brian d foy
20 years in Perl
20 years in Perl
brian d foy
PrettyDump Perl 6 (London.pm)
PrettyDump Perl 6 (London.pm)
brian d foy
Dumping Perl 6 (French Perl Workshop)
Dumping Perl 6 (French Perl Workshop)
brian d foy
Perl v5.26 Features (AmsterdamX.pm)
Perl v5.26 Features (AmsterdamX.pm)
brian d foy
Dumping Perl 6 (AmsterdamX.pm)
Dumping Perl 6 (AmsterdamX.pm)
brian d foy
Reverse Installing CPAN
Reverse Installing CPAN
brian d foy
Backward to DPAN
Backward to DPAN
brian d foy
Perl docs {sux|rulez}
Perl docs {sux|rulez}
brian d foy
Why I Love CPAN
Why I Love CPAN
brian d foy
What's wrong with the perldocs
What's wrong with the perldocs
brian d foy
Frozen Perl 2011 Keynote
Frozen Perl 2011 Keynote
brian d foy
brian d foy
brian d foy
brian d foy
Making My Own CPAN
Making My Own CPAN
brian d foy
Making My Own CPAN
Making My Own CPAN
brian d foy
Mehr von brian d foy
(15)
Conferences for Beginners presentation
Conferences for Beginners presentation
20 years in Perl
20 years in Perl
PrettyDump Perl 6 (London.pm)
PrettyDump Perl 6 (London.pm)
Dumping Perl 6 (French Perl Workshop)
Dumping Perl 6 (French Perl Workshop)
Perl v5.26 Features (AmsterdamX.pm)
Perl v5.26 Features (AmsterdamX.pm)
Dumping Perl 6 (AmsterdamX.pm)
Dumping Perl 6 (AmsterdamX.pm)
Reverse Installing CPAN
Reverse Installing CPAN
Backward to DPAN
Backward to DPAN
Perl docs {sux|rulez}
Perl docs {sux|rulez}
Why I Love CPAN
Why I Love CPAN
What's wrong with the perldocs
What's wrong with the perldocs
Frozen Perl 2011 Keynote
Frozen Perl 2011 Keynote
brian d foy
brian d foy
Making My Own CPAN
Making My Own CPAN
Making My Own CPAN
Making My Own CPAN
Kürzlich hochgeladen
DevoxxFR 2024 Reproducible Builds with Apache Maven
DevoxxFR 2024 Reproducible Builds with Apache Maven
Hervé Boutemy
How to write a Business Continuity Plan
How to write a Business Continuity Plan
Databarracks
New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
BookNet Canada
TeamStation AI System Report LATAM IT Salaries 2024
TeamStation AI System Report LATAM IT Salaries 2024
Lonnie McRorey
Hyperautomation and AI/ML: A Strategy for Digital Transformation Success.pdf
Hyperautomation and AI/ML: A Strategy for Digital Transformation Success.pdf
Precisely
Merck Moving Beyond Passwords: FIDO Paris Seminar.pptx
Merck Moving Beyond Passwords: FIDO Paris Seminar.pptx
LoriGlavin3
H2O.ai CEO/Founder: Sri Ambati Keynote at Wells Fargo Day
H2O.ai CEO/Founder: Sri Ambati Keynote at Wells Fargo Day
Sri Ambati
"LLMs for Python Engineers: Advanced Data Analysis and Semantic Kernel",Oleks...
"LLMs for Python Engineers: Advanced Data Analysis and Semantic Kernel",Oleks...
Fwdays
Gen AI in Business - Global Trends Report 2024.pdf
Gen AI in Business - Global Trends Report 2024.pdf
Addepto
Anypoint Exchange: It’s Not Just a Repo!
Anypoint Exchange: It’s Not Just a Repo!
Manik S Magar
Ensuring Technical Readiness For Copilot in Microsoft 365
Ensuring Technical Readiness For Copilot in Microsoft 365
2toLead Limited
Designing IA for AI - Information Architecture Conference 2024
Designing IA for AI - Information Architecture Conference 2024
Enterprise Knowledge
How AI, OpenAI, and ChatGPT impact business and software.
How AI, OpenAI, and ChatGPT impact business and software.
Curtis Poe
Advanced Computer Architecture – An Introduction
Advanced Computer Architecture – An Introduction
Dilum Bandara
Scanning the Internet for External Cloud Exposures via SSL Certs
Scanning the Internet for External Cloud Exposures via SSL Certs
Rizwan Syed
Unraveling Multimodality with Large Language Models.pdf
Unraveling Multimodality with Large Language Models.pdf
Alex Barbosa Coqueiro
Advanced Test Driven-Development @ php[tek] 2024
Advanced Test Driven-Development @ php[tek] 2024
Scott Keck-Warren
Powerpoint exploring the locations used in television show Time Clash
Powerpoint exploring the locations used in television show Time Clash
charlottematthew16
SIP trunking in Janus @ Kamailio World 2024
SIP trunking in Janus @ Kamailio World 2024
Lorenzo Miniero
DevEX - reference for building teams, processes, and platforms
DevEX - reference for building teams, processes, and platforms
Sergiu Bodiu
Kürzlich hochgeladen
(20)
DevoxxFR 2024 Reproducible Builds with Apache Maven
DevoxxFR 2024 Reproducible Builds with Apache Maven
How to write a Business Continuity Plan
How to write a Business Continuity Plan
New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
TeamStation AI System Report LATAM IT Salaries 2024
TeamStation AI System Report LATAM IT Salaries 2024
Hyperautomation and AI/ML: A Strategy for Digital Transformation Success.pdf
Hyperautomation and AI/ML: A Strategy for Digital Transformation Success.pdf
Merck Moving Beyond Passwords: FIDO Paris Seminar.pptx
Merck Moving Beyond Passwords: FIDO Paris Seminar.pptx
H2O.ai CEO/Founder: Sri Ambati Keynote at Wells Fargo Day
H2O.ai CEO/Founder: Sri Ambati Keynote at Wells Fargo Day
"LLMs for Python Engineers: Advanced Data Analysis and Semantic Kernel",Oleks...
"LLMs for Python Engineers: Advanced Data Analysis and Semantic Kernel",Oleks...
Gen AI in Business - Global Trends Report 2024.pdf
Gen AI in Business - Global Trends Report 2024.pdf
Anypoint Exchange: It’s Not Just a Repo!
Anypoint Exchange: It’s Not Just a Repo!
Ensuring Technical Readiness For Copilot in Microsoft 365
Ensuring Technical Readiness For Copilot in Microsoft 365
Designing IA for AI - Information Architecture Conference 2024
Designing IA for AI - Information Architecture Conference 2024
How AI, OpenAI, and ChatGPT impact business and software.
How AI, OpenAI, and ChatGPT impact business and software.
Advanced Computer Architecture – An Introduction
Advanced Computer Architecture – An Introduction
Scanning the Internet for External Cloud Exposures via SSL Certs
Scanning the Internet for External Cloud Exposures via SSL Certs
Unraveling Multimodality with Large Language Models.pdf
Unraveling Multimodality with Large Language Models.pdf
Advanced Test Driven-Development @ php[tek] 2024
Advanced Test Driven-Development @ php[tek] 2024
Powerpoint exploring the locations used in television show Time Clash
Powerpoint exploring the locations used in television show Time Clash
SIP trunking in Janus @ Kamailio World 2024
SIP trunking in Janus @ Kamailio World 2024
DevEX - reference for building teams, processes, and platforms
DevEX - reference for building teams, processes, and platforms
Advanced modulinos
1.
★
Advanced Modulinos brian d foy The Perl Review YAPC::NA 2012
2.
Files that work
as programs and modules at the same time
3.
Unit testing Code reüse Distribution
4.
# hello.pl use v5.10; say
'Hello World!';
5.
% perl hello.pl Hello
World!
6.
STDIN
$0 STDOUT @ARGV %ENV exit code
7.
Starting
8.
use v5.10; run(); sub run
{ say 'Hello World!'; }
9.
% perl hello.pl Hello
World! % perl -e 'require q(hello.pl)' Hello World!
10.
# Hello.pm use v5.10; run()
unless caller; sub run { say 'Hello World!'; } _ _PACKAGE_ _
11.
% perl Hello.pm Hello
World! % perl -MHello -e 1 %
12.
package Hello; use v5.10; __PACKAGE__->run
unless caller; sub run { say 'Hello World!'; } _ _PACKAGE_ _
13.
use Test::More; use Test::Output; use_ok(
'Hello' ); stdout_ok( sub { Hello->run() }, "Hello World!n", ... );
14.
package Hello; use v5.10; _ _PACKAGE_ _->run
unless caller; sub run { my( $self ) = @_; say { $self->fh } 'Hello World!'; }
15.
package Hello; use v5.10; ...; sub
fh { *STDOUT }
16.
use Test::More; use_ok( 'Hello'
); our $string; { open my $fh, '>', $string; *Hello::fh = sub { $fh }; } Hello->run; is($string, "Hello World!n");
17.
package Hello; use v5.10; ...; BEGIN
{ my $fh = *STDOUT; sub fh { $fh } sub set_fh { $fh = ...; } }
18.
use Test::More; use_ok( 'Hello'
); open my $fh, '>', my $string; Hello->set_fh( $fh ); Hello->run; is($string, "Hello World!n");
19.
% perl hello.pl Hello
World! % perl hello.pl Chicago Hello World! % perl hello.pl -m Rahm Hello World! % perl hello.pl < aldermen Hello World!
20.
Connect the
command line to new() % hello.pl -s Houston ? use Hello; new() my $app->new( input => $in_fh, output => $out_fh, message => $message, ); $app->greet;
21.
sub run {
my( $class, @args ) = @_; my %args = $class->process_args(@args); my $self = $class->new(%args); say { $self->fh } $self->message; }
22.
sub process_args {
require Getopt::Std; local @ARGV = @_; getopts('oim:', my %opts); $opts{'o'} //= *STDOUT; $opts{'i'} //= *STDIN; $opts{'m'} //= 'Hello World!'; # left over @_? my %args = map { $opts_map{$_} => $opts{$_} } keys %opts; }
23.
$app->new( input_fh
=> $in, output_fh => $out, message => 'Hello World!' );
24.
sub new {
my( $class, %args ) = @_; my $self = bless {}, $class; foreach ( keys %args ) { # maybe more complicated $self->set( $_, $args{$_} ); } return $self; }
25.
Stopping
26.
#!perl ...; ...; ...; exit(0);
27.
sub run {
my( $class, @args ) = @_; my $object = eval { ...; Result->new( code => 0 ); } or $@; exit( $object->code ); }
28.
sub some_sub {
...; die Result->new( code => 15 ); ...; }
29.
sub run {
my( $class, @args ) = @_; my $object = eval { ...; Result->new( code => 0 ); }; exit( $error_object->code ); }
30.
Testing
31.
run() unless caller;
32.
UNITCHECK {
if($ENV{TEST_HARNESS}){ __PACKAGE__->run_tests; } elsif( ! caller ) { __PACKAGE__->run; } }
33.
Docs
34.
UNITCHECK {
if($ENV{TEST_HARNESS}){ __PACKAGE__->run_tests; } elsif($ENV{PERLDOC}){ __PACKAGE__->show_docs; } elsif( ! caller ) { __PACKAGE__->run; } }
Jetzt herunterladen