Enviar pesquisa
Carregar
Advanced modulinos
•
2 gostaram
•
2,830 visualizações
brian d foy
Seguir
Tecnologia
Denunciar
Compartilhar
Denunciar
Compartilhar
1 de 34
Baixar agora
Baixar para ler offline
Recomendados
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
Recomendados
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
Mais conteúdo relacionado
Mais procurados
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
Mais procurados
(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
Destaque
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
Destaque
(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
Semelhante a 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
Semelhante a 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
Mais de 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
Mais de 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
Último
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
apidays
Boost Fertility New Invention Ups Success Rates.pdf
Boost Fertility New Invention Ups Success Rates.pdf
sudhanshuwaghmare1
Apidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, Adobe
Apidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, Adobe
apidays
Artificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and Myths
Joaquim Jorge
GenAI Risks & Security Meetup 01052024.pdf
GenAI Risks & Security Meetup 01052024.pdf
lior mazor
presentation ICT roal in 21st century education
presentation ICT roal in 21st century education
jfdjdjcjdnsjd
From Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time Automation
Safe Software
Handwritten Text Recognition for manuscripts and early printed texts
Handwritten Text Recognition for manuscripts and early printed texts
Maria Levchenko
Developing An App To Navigate The Roads of Brazil
Developing An App To Navigate The Roads of Brazil
V3cube
GenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day Presentation
Michael W. Hawkins
[2024]Digital Global Overview Report 2024 Meltwater.pdf
[2024]Digital Global Overview Report 2024 Meltwater.pdf
hans926745
Connector Corner: Accelerate revenue generation using UiPath API-centric busi...
Connector Corner: Accelerate revenue generation using UiPath API-centric busi...
DianaGray10
🐬 The future of MySQL is Postgres 🐘
🐬 The future of MySQL is Postgres 🐘
RTylerCroy
Strategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
Strategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
sammart93
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Miguel Araújo
Workshop - Best of Both Worlds_ Combine KG and Vector search for enhanced R...
Workshop - Best of Both Worlds_ Combine KG and Vector search for enhanced R...
Neo4j
A Year of the Servo Reboot: Where Are We Now?
A Year of the Servo Reboot: Where Are We Now?
Igalia
Exploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone Processors
debabhi2
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
HampshireHUG
Histor y of HAM Radio presentation slide
Histor y of HAM Radio presentation slide
vu2urc
Último
(20)
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
Boost Fertility New Invention Ups Success Rates.pdf
Boost Fertility New Invention Ups Success Rates.pdf
Apidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, Adobe
Apidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, Adobe
Artificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and Myths
GenAI Risks & Security Meetup 01052024.pdf
GenAI Risks & Security Meetup 01052024.pdf
presentation ICT roal in 21st century education
presentation ICT roal in 21st century education
From Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time Automation
Handwritten Text Recognition for manuscripts and early printed texts
Handwritten Text Recognition for manuscripts and early printed texts
Developing An App To Navigate The Roads of Brazil
Developing An App To Navigate The Roads of Brazil
GenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day Presentation
[2024]Digital Global Overview Report 2024 Meltwater.pdf
[2024]Digital Global Overview Report 2024 Meltwater.pdf
Connector Corner: Accelerate revenue generation using UiPath API-centric busi...
Connector Corner: Accelerate revenue generation using UiPath API-centric busi...
🐬 The future of MySQL is Postgres 🐘
🐬 The future of MySQL is Postgres 🐘
Strategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
Strategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Workshop - Best of Both Worlds_ Combine KG and Vector search for enhanced R...
Workshop - Best of Both Worlds_ Combine KG and Vector search for enhanced R...
A Year of the Servo Reboot: Where Are We Now?
A Year of the Servo Reboot: Where Are We Now?
Exploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone Processors
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
Histor y of HAM Radio presentation slide
Histor y of HAM Radio presentation slide
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; } }
Baixar agora