SlideShare ist ein Scribd-Unternehmen logo
1 von 35
Downloaden Sie, um offline zu lesen
LIFE WITHOUT CPAN 
Reinventing the Wheel 
Bob Ernst 
BobErnstStl@gmail.com 
ST. LOUIS PERL MONGERS 
July 17, 2013 
Bob Ernst Life Without CPAN
Comprehensive Perl Archive Network 
http://www.cpan.org/ 
22,938 Perl modules (and growing!) 
10,781 authors (and growing!) 
Possibly the best feature of Perl 
... and sometimes you can't use it 
Bob Ernst Life Without CPAN
$677 Million 
In 2004, CPAN had 15.4 million lines of code, which would cost 
$677,000,000 to develop 
http://developers.slashdot.org/story/04/07/30/1229239/cpan-677-million-of-perl 
Bob Ernst Life Without CPAN
Handy tools 
cpan 
cpanm 
cpanp 
perlbrew 
Bob Ernst Life Without CPAN
Why don't people use CPAN? 
And how did I become one of them?? 
Bob Ernst Life Without CPAN
But I don't have root..." 
No root access? That is an easy one: 
us e l o c a l : : l i b ; 
Bob Ernst Life Without CPAN
Why is this so complicated?" 
CPAN often has objected-oriented Perl 
Embarrassment of riches 
More & Better module documentation couldn't hurt 
Bob Ernst Life Without CPAN
I don't have enough disk space..." 
Who doesn't have lots of disk space in 2013? 
SSD drives - fast, but small 
Raspberry Pi 
Embedded systems 
Shared hosting 
Virtual Machines 
Disk quotas 
Bob Ernst Life Without CPAN
NIH - Not Invented Here 
Pretty silly, but unfortunately common 
Bob Ernst Life Without CPAN
Security Concerns 
Some organizations are serious about security 
What company wrote this software? 
You want to connect to the internet?? 
Bob Ernst Life Without CPAN
Local Mirror & Packing 
CPAN::Mini 
CPAN::Mini::Inject 
Pinto 
Carton 
Bob Ernst Life Without CPAN
Licensing 
What is this FOSS / open source / shareware / freeware stu? 
We need to review that license... 
Sometimes it is easier to buy software 
Bob Ernst Life Without CPAN
Mix of licenses 
Most, though not all, modules on CPAN are licensed 
under the GNU Public License (GPL) or the Artistic 
license 
{ CPAN FAQ 
Bob Ernst Life Without CPAN
GPL 
The GNU Public License is a 
negative 
in some organizations 
Bob Ernst Life Without CPAN
CPAN::Meta::Spec 
agpl_3 GNU Affero General Public License, Version 3 
apache_1_1 Apache Software License, Version 1.1 
apache_2_0 Apache License, Version 2.0 
artistic_1 Artistic License, (Version 1) 
artistic_2 Artistic License, Version 2.0 
bsd BSD License (three-clause) 
freebsd FreeBSD License (two-clause) 
gfdl_1_2 GNU Free Documentation License, Version 1.2 
gfdl_1_3 GNU Free Documentation License, Version 1.3 
gpl_1 GNU General Public License, Version 1 
gpl_2 GNU General Public License, Version 2 
gpl_3 GNU General Public License, Version 3 
lgpl_2_1 GNU Lesser General Public License, Version 2.1 
lgpl_3_0 GNU Lesser General Public License, Version 3.0 
mit MIT (aka X11) License 
mozilla_1_0 Mozilla Public License, Version 1.0 
mozilla_1_1 Mozilla Public License, Version 1.1 
openssl OpenSSL License 
perl_5 The Perl 5 License (Artistic 1  GPL 1 or later) 
qpl_1_0 Q Public License, Version 1.0 
ssleay Original SSLeay License 
sun Sun Internet Standards Source License (SISSL) 
zlib zlib License 
Bob Ernst Life Without CPAN
And... 
open_source Other Open Source Initiative (OSI) approved license 
restricted Requires special permission from copyright holder 
unrestricted Not an OSI approved license, but not restricted 
unknown License not provided in metadata 
May be hard to get approval! 
Bob Ernst Life Without CPAN
Missing licenses 
16.6% of CPAN uploads this year don't have a license in 
META.yml 
(Older modules are worse!) 
http://cpants.cpanauthors.org/kwalitee/metayml has license 
Bob Ernst Life Without CPAN
Get the modules without CPAN 
Perhaps you have access to another source of modules that is 
already approved 
ActiveState Perl's PPO 
Linux package installer (yum, apt, etc.) 
Bob Ernst Life Without CPAN
This stu is broken! 
Perl  CPAN have a strong culture of quality and testing... But 
there are buggy modules 
Look for recommended modules 
http://cpanratings.perl.org/ 
Check outstanding bug list for modules 
Report the bug! 
Fix the bug yourself (and share the patch) 
Fork the module 
Bob Ernst Life Without CPAN
Who am I going to call for support? 
Submit a bug report 
IRC 
Perl Monks 
Stack Over
ow 
Mailing lists 
ActiveState 
Bob Ernst Life Without CPAN
Deploying to Production 
No internet access (in secure environments) 
Slow installs 
Missing dependencies 
Broken installs 
Bob Ernst Life Without CPAN
Building on Quicksand 
CPAN modules typically have dependencies, modules are updated 
all the time 
A
x in one module might break the module you are counting on! 
Bob Ernst Life Without CPAN
Make it solid 
perlbrew to get the right version of Perl 
CPAN::Mini to get the right version of everything else 
Bob Ernst Life Without CPAN
You've fought the political battle and lost... 
What do you do? 
Bob Ernst Life Without CPAN
Reinvent the Wheel 
Bob Ernst Life Without CPAN
You aren't alone 
If you google XYZ Perl, you'll
nd a lot of questions like: 
How do I XYZ in Perl without using CPAN? 
Bob Ernst Life Without CPAN
XML Parsing 
Writing an XML parser is hard work 
XML isn't a regular language so it can't be parsed with 
regular expressions 
But in a pinch... 
i f ( $ i n p u t =~ qr f ( t i t l e ) ( .  ) (/ t i t l e ) gx 
) f 
$ t i t l e = $2 ; 
g 
Bob Ernst Life Without CPAN
Date and Time 
Date::Manip and Date::Calc are so powerful... 
what to do when they aren't available? 
Bob Ernst Life Without CPAN
The Next Eight Sundays (Date::Calc) 
us e Date : : Cal c qw( Add De l ta Days Da t e t o Te x t 
Day of Week Today ) ; 
my @date = Today ( ) ; 
my $ d a y s u n t i l s u n d a y = 7  Day of Week ( @date 
) ; 
i f ( $ d a y s u n t i l s u n d a y == 0 ) f 
$ d a y s u n t i l s u n d a y = 7 ; 
g 
f o r ( my $ i =0; $i 8; $ i++ ) f 
@date = Add De l ta Days ( @date , 
$ d a y s u n t i l s u n d a y ) ; 
say Da t e t o Te x t ( @date ) ; 
$ d a y s u n t i l s u n d a y = 7 ; 
g 
Bob Ernst Life Without CPAN
The Next Eight Sundays (POSIX) 
us e POSIX qw( mktime s t r f t ime ) ; 
us e c o n s t a n t f 
MDAY = 3 , 
WDAY = 6 , 
g ; 
my @date = l o c a l t ime ( t ime ( ) ) ; 
f o r (my $ i =0; $i 8; $ i++) f 
$dat e [MDAY] += 7  $dat e [WDAY] ; 
@date = l o c a l t ime ( mktime ( @date ) ) ; 
say s t r f t ime ( %a %d%b%Y , @date ) ; 
g 
Bob Ernst Life Without CPAN
Parallel Processing 
Modules like Parallel::Queue are great... 
if you have CPAN. 
Bob Ernst Life Without CPAN
Old Fashion Fork 
our @c h i l d r e n = ( ) ; 
sub spawn command f 
my $command = s h i f t ; 
my $pid = f o r k ( ) ; 
i f ( $pid ) f 
push @c h i l d r e n , $pid ; 
g 
e l s i f ( $pid == 0 ) f 
sys tem ( @f$commandg ) ; 
e x i t 0 ; 
g 
g 
Bob Ernst Life Without CPAN
Fork continued 
f o r ( my $ i =1; $ i = 5 2 ; $ i++ ) f 
spawn command ( [ what e v e r  , $ i ] ) ; 
g 
f o r e a c h my $pid ( @c h i l d r e n ) f 
wa i t p i d ( $pid , 0 ) ; 
g 
Bob Ernst Life Without CPAN

Weitere ähnliche Inhalte

Was ist angesagt?

Bash in theory and in practice - part two
Bash in theory and in practice - part twoBash in theory and in practice - part two
Bash in theory and in practice - part twoValerio Balbi
 
DO YOU WANT TO USE A VCS
DO YOU WANT TO USE A VCSDO YOU WANT TO USE A VCS
DO YOU WANT TO USE A VCSSeongJae Park
 
The JSON Saga
The JSON SagaThe JSON Saga
The JSON Sagakaven yan
 
Hits For Kids Pop Party Vol. 2
Hits For Kids Pop Party Vol. 2Hits For Kids Pop Party Vol. 2
Hits For Kids Pop Party Vol. 2Elvis Live
 
PyCon 2013 : Scripting to PyPi to GitHub and More
PyCon 2013 : Scripting to PyPi to GitHub and MorePyCon 2013 : Scripting to PyPi to GitHub and More
PyCon 2013 : Scripting to PyPi to GitHub and MoreMatt Harrison
 
Ruby on rails, 4 code smells : un guide de simplification
Ruby on rails, 4 code smells : un guide de simplificationRuby on rails, 4 code smells : un guide de simplification
Ruby on rails, 4 code smells : un guide de simplificationHadrien Blanc
 
10 more-things-you-can-do-with-python
10 more-things-you-can-do-with-python10 more-things-you-can-do-with-python
10 more-things-you-can-do-with-pythonDaniel Greenfeld
 
TAUS USER CONFERENCE 2009, Normalization of translation memories
TAUS USER CONFERENCE 2009, Normalization of translation memoriesTAUS USER CONFERENCE 2009, Normalization of translation memories
TAUS USER CONFERENCE 2009, Normalization of translation memoriesTAUS - The Language Data Network
 
Learning Python from Data
Learning Python from DataLearning Python from Data
Learning Python from DataMosky Liu
 
pyconjp2015_talk_Translation of Python Program__
pyconjp2015_talk_Translation of Python Program__pyconjp2015_talk_Translation of Python Program__
pyconjp2015_talk_Translation of Python Program__Renyuan Lyu
 
Why Python (for Statisticians)
Why Python (for Statisticians)Why Python (for Statisticians)
Why Python (for Statisticians)Matt Harrison
 
Simple Data Engineering in Python 3.5+ — Pycon.DE 2017 Karlsruhe — Bonobo ETL
Simple Data Engineering in Python 3.5+ — Pycon.DE 2017 Karlsruhe — Bonobo ETLSimple Data Engineering in Python 3.5+ — Pycon.DE 2017 Karlsruhe — Bonobo ETL
Simple Data Engineering in Python 3.5+ — Pycon.DE 2017 Karlsruhe — Bonobo ETLRomain Dorgueil
 
Embed--Basic PERL XS
Embed--Basic PERL XSEmbed--Basic PERL XS
Embed--Basic PERL XSbyterock
 
Using TypeScript at Dashlane
Using TypeScript at DashlaneUsing TypeScript at Dashlane
Using TypeScript at DashlaneDashlane
 

Was ist angesagt? (16)

Bash in theory and in practice - part two
Bash in theory and in practice - part twoBash in theory and in practice - part two
Bash in theory and in practice - part two
 
DO YOU WANT TO USE A VCS
DO YOU WANT TO USE A VCSDO YOU WANT TO USE A VCS
DO YOU WANT TO USE A VCS
 
The JSON Saga
The JSON SagaThe JSON Saga
The JSON Saga
 
Hits For Kids Pop Party Vol. 2
Hits For Kids Pop Party Vol. 2Hits For Kids Pop Party Vol. 2
Hits For Kids Pop Party Vol. 2
 
PyCon 2013 : Scripting to PyPi to GitHub and More
PyCon 2013 : Scripting to PyPi to GitHub and MorePyCon 2013 : Scripting to PyPi to GitHub and More
PyCon 2013 : Scripting to PyPi to GitHub and More
 
Ruby on rails, 4 code smells : un guide de simplification
Ruby on rails, 4 code smells : un guide de simplificationRuby on rails, 4 code smells : un guide de simplification
Ruby on rails, 4 code smells : un guide de simplification
 
10 more-things-you-can-do-with-python
10 more-things-you-can-do-with-python10 more-things-you-can-do-with-python
10 more-things-you-can-do-with-python
 
TAUS USER CONFERENCE 2009, Normalization of translation memories
TAUS USER CONFERENCE 2009, Normalization of translation memoriesTAUS USER CONFERENCE 2009, Normalization of translation memories
TAUS USER CONFERENCE 2009, Normalization of translation memories
 
Learning Python from Data
Learning Python from DataLearning Python from Data
Learning Python from Data
 
pyconjp2015_talk_Translation of Python Program__
pyconjp2015_talk_Translation of Python Program__pyconjp2015_talk_Translation of Python Program__
pyconjp2015_talk_Translation of Python Program__
 
Why Python (for Statisticians)
Why Python (for Statisticians)Why Python (for Statisticians)
Why Python (for Statisticians)
 
Intro to Python
Intro to PythonIntro to Python
Intro to Python
 
Simple Data Engineering in Python 3.5+ — Pycon.DE 2017 Karlsruhe — Bonobo ETL
Simple Data Engineering in Python 3.5+ — Pycon.DE 2017 Karlsruhe — Bonobo ETLSimple Data Engineering in Python 3.5+ — Pycon.DE 2017 Karlsruhe — Bonobo ETL
Simple Data Engineering in Python 3.5+ — Pycon.DE 2017 Karlsruhe — Bonobo ETL
 
Hitchikers guide handout
Hitchikers guide handoutHitchikers guide handout
Hitchikers guide handout
 
Embed--Basic PERL XS
Embed--Basic PERL XSEmbed--Basic PERL XS
Embed--Basic PERL XS
 
Using TypeScript at Dashlane
Using TypeScript at DashlaneUsing TypeScript at Dashlane
Using TypeScript at Dashlane
 

Ähnlich wie Life without CPAN

Modern Perl for the Unfrozen Paleolithic Perl Programmer
Modern Perl for the Unfrozen Paleolithic Perl ProgrammerModern Perl for the Unfrozen Paleolithic Perl Programmer
Modern Perl for the Unfrozen Paleolithic Perl ProgrammerJohn Anderson
 
Arduino programming of ML-style in ATS
Arduino programming of ML-style in ATSArduino programming of ML-style in ATS
Arduino programming of ML-style in ATSKiwamu Okabe
 
Prophet - Beijing Perl Workshop
Prophet - Beijing Perl WorkshopProphet - Beijing Perl Workshop
Prophet - Beijing Perl WorkshopJesse Vincent
 
Perl::Lint - Yet Another Perl Source Code Linter
Perl::Lint - Yet Another Perl Source Code LinterPerl::Lint - Yet Another Perl Source Code Linter
Perl::Lint - Yet Another Perl Source Code Lintermoznion
 
Perl DBI Scripting with the ILS
Perl DBI Scripting with the ILSPerl DBI Scripting with the ILS
Perl DBI Scripting with the ILSRoy Zimmer
 
CPANTS: Kwalitative website and its tools
CPANTS: Kwalitative website and its toolsCPANTS: Kwalitative website and its tools
CPANTS: Kwalitative website and its toolscharsbar
 
GStreamer 101
GStreamer 101GStreamer 101
GStreamer 101yuvipanda
 
Rise of the Machines: PHP and IoT - php[world] 2016
Rise of the Machines: PHP and IoT - php[world] 2016Rise of the Machines: PHP and IoT - php[world] 2016
Rise of the Machines: PHP and IoT - php[world] 2016Colin O'Dell
 
Danny Adair - Python Cookbook - Intro
Danny Adair - Python Cookbook - IntroDanny Adair - Python Cookbook - Intro
Danny Adair - Python Cookbook - Introdanny.adair
 
Becoming a Git Master - Nicola Paolucci
Becoming a Git Master - Nicola PaolucciBecoming a Git Master - Nicola Paolucci
Becoming a Git Master - Nicola PaolucciAtlassian
 
Free The Enterprise With Ruby & Master Your Own Domain
Free The Enterprise With Ruby & Master Your Own DomainFree The Enterprise With Ruby & Master Your Own Domain
Free The Enterprise With Ruby & Master Your Own DomainKen Collins
 
Pipfile, pipenv, pip… what?!
Pipfile, pipenv, pip… what?!Pipfile, pipenv, pip… what?!
Pipfile, pipenv, pip… what?!Ivan Chernoff
 
Simple ETL in python 3.5+ with Bonobo, Romain Dorgueil
Simple ETL in python 3.5+ with Bonobo, Romain DorgueilSimple ETL in python 3.5+ with Bonobo, Romain Dorgueil
Simple ETL in python 3.5+ with Bonobo, Romain DorgueilPôle Systematic Paris-Region
 
Simple ETL in python 3.5+ with Bonobo - PyParis 2017
Simple ETL in python 3.5+ with Bonobo - PyParis 2017Simple ETL in python 3.5+ with Bonobo - PyParis 2017
Simple ETL in python 3.5+ with Bonobo - PyParis 2017Romain Dorgueil
 
Things I Learned From Having Users
Things I Learned From Having UsersThings I Learned From Having Users
Things I Learned From Having UsersDave Cross
 
Why I Love Python
Why I Love PythonWhy I Love Python
Why I Love Pythondidip
 

Ähnlich wie Life without CPAN (20)

Perl Moderno
Perl ModernoPerl Moderno
Perl Moderno
 
Modern Perl for the Unfrozen Paleolithic Perl Programmer
Modern Perl for the Unfrozen Paleolithic Perl ProgrammerModern Perl for the Unfrozen Paleolithic Perl Programmer
Modern Perl for the Unfrozen Paleolithic Perl Programmer
 
Arduino programming of ML-style in ATS
Arduino programming of ML-style in ATSArduino programming of ML-style in ATS
Arduino programming of ML-style in ATS
 
Prophet - Beijing Perl Workshop
Prophet - Beijing Perl WorkshopProphet - Beijing Perl Workshop
Prophet - Beijing Perl Workshop
 
Perl::Lint - Yet Another Perl Source Code Linter
Perl::Lint - Yet Another Perl Source Code LinterPerl::Lint - Yet Another Perl Source Code Linter
Perl::Lint - Yet Another Perl Source Code Linter
 
Ruby - The Hard Bits
Ruby - The Hard BitsRuby - The Hard Bits
Ruby - The Hard Bits
 
Perl DBI Scripting with the ILS
Perl DBI Scripting with the ILSPerl DBI Scripting with the ILS
Perl DBI Scripting with the ILS
 
CPANTS: Kwalitative website and its tools
CPANTS: Kwalitative website and its toolsCPANTS: Kwalitative website and its tools
CPANTS: Kwalitative website and its tools
 
GStreamer 101
GStreamer 101GStreamer 101
GStreamer 101
 
Rise of the Machines: PHP and IoT - php[world] 2016
Rise of the Machines: PHP and IoT - php[world] 2016Rise of the Machines: PHP and IoT - php[world] 2016
Rise of the Machines: PHP and IoT - php[world] 2016
 
Talk About Performance
Talk About PerformanceTalk About Performance
Talk About Performance
 
Danny Adair - Python Cookbook - Intro
Danny Adair - Python Cookbook - IntroDanny Adair - Python Cookbook - Intro
Danny Adair - Python Cookbook - Intro
 
Introduction to python
Introduction to pythonIntroduction to python
Introduction to python
 
Becoming a Git Master - Nicola Paolucci
Becoming a Git Master - Nicola PaolucciBecoming a Git Master - Nicola Paolucci
Becoming a Git Master - Nicola Paolucci
 
Free The Enterprise With Ruby & Master Your Own Domain
Free The Enterprise With Ruby & Master Your Own DomainFree The Enterprise With Ruby & Master Your Own Domain
Free The Enterprise With Ruby & Master Your Own Domain
 
Pipfile, pipenv, pip… what?!
Pipfile, pipenv, pip… what?!Pipfile, pipenv, pip… what?!
Pipfile, pipenv, pip… what?!
 
Simple ETL in python 3.5+ with Bonobo, Romain Dorgueil
Simple ETL in python 3.5+ with Bonobo, Romain DorgueilSimple ETL in python 3.5+ with Bonobo, Romain Dorgueil
Simple ETL in python 3.5+ with Bonobo, Romain Dorgueil
 
Simple ETL in python 3.5+ with Bonobo - PyParis 2017
Simple ETL in python 3.5+ with Bonobo - PyParis 2017Simple ETL in python 3.5+ with Bonobo - PyParis 2017
Simple ETL in python 3.5+ with Bonobo - PyParis 2017
 
Things I Learned From Having Users
Things I Learned From Having UsersThings I Learned From Having Users
Things I Learned From Having Users
 
Why I Love Python
Why I Love PythonWhy I Love Python
Why I Love Python
 

Kürzlich hochgeladen

Powerful Start- the Key to Project Success, Barbara Laskowska
Powerful Start- the Key to Project Success, Barbara LaskowskaPowerful Start- the Key to Project Success, Barbara Laskowska
Powerful Start- the Key to Project Success, Barbara LaskowskaCzechDreamin
 
AI presentation and introduction - Retrieval Augmented Generation RAG 101
AI presentation and introduction - Retrieval Augmented Generation RAG 101AI presentation and introduction - Retrieval Augmented Generation RAG 101
AI presentation and introduction - Retrieval Augmented Generation RAG 101vincent683379
 
A Business-Centric Approach to Design System Strategy
A Business-Centric Approach to Design System StrategyA Business-Centric Approach to Design System Strategy
A Business-Centric Approach to Design System StrategyUXDXConf
 
Portal Kombat : extension du réseau de propagande russe
Portal Kombat : extension du réseau de propagande russePortal Kombat : extension du réseau de propagande russe
Portal Kombat : extension du réseau de propagande russe中 央社
 
WebRTC and SIP not just audio and video @ OpenSIPS 2024
WebRTC and SIP not just audio and video @ OpenSIPS 2024WebRTC and SIP not just audio and video @ OpenSIPS 2024
WebRTC and SIP not just audio and video @ OpenSIPS 2024Lorenzo Miniero
 
Introduction to FDO and How It works Applications _ Richard at FIDO Alliance.pdf
Introduction to FDO and How It works Applications _ Richard at FIDO Alliance.pdfIntroduction to FDO and How It works Applications _ Richard at FIDO Alliance.pdf
Introduction to FDO and How It works Applications _ Richard at FIDO Alliance.pdfFIDO Alliance
 
Where to Learn More About FDO _ Richard at FIDO Alliance.pdf
Where to Learn More About FDO _ Richard at FIDO Alliance.pdfWhere to Learn More About FDO _ Richard at FIDO Alliance.pdf
Where to Learn More About FDO _ Richard at FIDO Alliance.pdfFIDO Alliance
 
Behind the Scenes From the Manager's Chair: Decoding the Secrets of Successfu...
Behind the Scenes From the Manager's Chair: Decoding the Secrets of Successfu...Behind the Scenes From the Manager's Chair: Decoding the Secrets of Successfu...
Behind the Scenes From the Manager's Chair: Decoding the Secrets of Successfu...CzechDreamin
 
Intro in Product Management - Коротко про професію продакт менеджера
Intro in Product Management - Коротко про професію продакт менеджераIntro in Product Management - Коротко про професію продакт менеджера
Intro in Product Management - Коротко про професію продакт менеджераMark Opanasiuk
 
WSO2CONMay2024OpenSourceConferenceDebrief.pptx
WSO2CONMay2024OpenSourceConferenceDebrief.pptxWSO2CONMay2024OpenSourceConferenceDebrief.pptx
WSO2CONMay2024OpenSourceConferenceDebrief.pptxJennifer Lim
 
Choosing the Right FDO Deployment Model for Your Application _ Geoffrey at In...
Choosing the Right FDO Deployment Model for Your Application _ Geoffrey at In...Choosing the Right FDO Deployment Model for Your Application _ Geoffrey at In...
Choosing the Right FDO Deployment Model for Your Application _ Geoffrey at In...FIDO Alliance
 
Extensible Python: Robustness through Addition - PyCon 2024
Extensible Python: Robustness through Addition - PyCon 2024Extensible Python: Robustness through Addition - PyCon 2024
Extensible Python: Robustness through Addition - PyCon 2024Patrick Viafore
 
State of the Smart Building Startup Landscape 2024!
State of the Smart Building Startup Landscape 2024!State of the Smart Building Startup Landscape 2024!
State of the Smart Building Startup Landscape 2024!Memoori
 
Linux Foundation Edge _ Overview of FDO Software Components _ Randy at Intel.pdf
Linux Foundation Edge _ Overview of FDO Software Components _ Randy at Intel.pdfLinux Foundation Edge _ Overview of FDO Software Components _ Randy at Intel.pdf
Linux Foundation Edge _ Overview of FDO Software Components _ Randy at Intel.pdfFIDO Alliance
 
TEST BANK For, Information Technology Project Management 9th Edition Kathy Sc...
TEST BANK For, Information Technology Project Management 9th Edition Kathy Sc...TEST BANK For, Information Technology Project Management 9th Edition Kathy Sc...
TEST BANK For, Information Technology Project Management 9th Edition Kathy Sc...marcuskenyatta275
 
Using IESVE for Room Loads Analysis - UK & Ireland
Using IESVE for Room Loads Analysis - UK & IrelandUsing IESVE for Room Loads Analysis - UK & Ireland
Using IESVE for Room Loads Analysis - UK & IrelandIES VE
 
Microsoft CSP Briefing Pre-Engagement - Questionnaire
Microsoft CSP Briefing Pre-Engagement - QuestionnaireMicrosoft CSP Briefing Pre-Engagement - Questionnaire
Microsoft CSP Briefing Pre-Engagement - QuestionnaireExakis Nelite
 
ASRock Industrial FDO Solutions in Action for Industrial Edge AI _ Kenny at A...
ASRock Industrial FDO Solutions in Action for Industrial Edge AI _ Kenny at A...ASRock Industrial FDO Solutions in Action for Industrial Edge AI _ Kenny at A...
ASRock Industrial FDO Solutions in Action for Industrial Edge AI _ Kenny at A...FIDO Alliance
 
What's New in Teams Calling, Meetings and Devices April 2024
What's New in Teams Calling, Meetings and Devices April 2024What's New in Teams Calling, Meetings and Devices April 2024
What's New in Teams Calling, Meetings and Devices April 2024Stephanie Beckett
 

Kürzlich hochgeladen (20)

Powerful Start- the Key to Project Success, Barbara Laskowska
Powerful Start- the Key to Project Success, Barbara LaskowskaPowerful Start- the Key to Project Success, Barbara Laskowska
Powerful Start- the Key to Project Success, Barbara Laskowska
 
AI presentation and introduction - Retrieval Augmented Generation RAG 101
AI presentation and introduction - Retrieval Augmented Generation RAG 101AI presentation and introduction - Retrieval Augmented Generation RAG 101
AI presentation and introduction - Retrieval Augmented Generation RAG 101
 
A Business-Centric Approach to Design System Strategy
A Business-Centric Approach to Design System StrategyA Business-Centric Approach to Design System Strategy
A Business-Centric Approach to Design System Strategy
 
Overview of Hyperledger Foundation
Overview of Hyperledger FoundationOverview of Hyperledger Foundation
Overview of Hyperledger Foundation
 
Portal Kombat : extension du réseau de propagande russe
Portal Kombat : extension du réseau de propagande russePortal Kombat : extension du réseau de propagande russe
Portal Kombat : extension du réseau de propagande russe
 
WebRTC and SIP not just audio and video @ OpenSIPS 2024
WebRTC and SIP not just audio and video @ OpenSIPS 2024WebRTC and SIP not just audio and video @ OpenSIPS 2024
WebRTC and SIP not just audio and video @ OpenSIPS 2024
 
Introduction to FDO and How It works Applications _ Richard at FIDO Alliance.pdf
Introduction to FDO and How It works Applications _ Richard at FIDO Alliance.pdfIntroduction to FDO and How It works Applications _ Richard at FIDO Alliance.pdf
Introduction to FDO and How It works Applications _ Richard at FIDO Alliance.pdf
 
Where to Learn More About FDO _ Richard at FIDO Alliance.pdf
Where to Learn More About FDO _ Richard at FIDO Alliance.pdfWhere to Learn More About FDO _ Richard at FIDO Alliance.pdf
Where to Learn More About FDO _ Richard at FIDO Alliance.pdf
 
Behind the Scenes From the Manager's Chair: Decoding the Secrets of Successfu...
Behind the Scenes From the Manager's Chair: Decoding the Secrets of Successfu...Behind the Scenes From the Manager's Chair: Decoding the Secrets of Successfu...
Behind the Scenes From the Manager's Chair: Decoding the Secrets of Successfu...
 
Intro in Product Management - Коротко про професію продакт менеджера
Intro in Product Management - Коротко про професію продакт менеджераIntro in Product Management - Коротко про професію продакт менеджера
Intro in Product Management - Коротко про професію продакт менеджера
 
WSO2CONMay2024OpenSourceConferenceDebrief.pptx
WSO2CONMay2024OpenSourceConferenceDebrief.pptxWSO2CONMay2024OpenSourceConferenceDebrief.pptx
WSO2CONMay2024OpenSourceConferenceDebrief.pptx
 
Choosing the Right FDO Deployment Model for Your Application _ Geoffrey at In...
Choosing the Right FDO Deployment Model for Your Application _ Geoffrey at In...Choosing the Right FDO Deployment Model for Your Application _ Geoffrey at In...
Choosing the Right FDO Deployment Model for Your Application _ Geoffrey at In...
 
Extensible Python: Robustness through Addition - PyCon 2024
Extensible Python: Robustness through Addition - PyCon 2024Extensible Python: Robustness through Addition - PyCon 2024
Extensible Python: Robustness through Addition - PyCon 2024
 
State of the Smart Building Startup Landscape 2024!
State of the Smart Building Startup Landscape 2024!State of the Smart Building Startup Landscape 2024!
State of the Smart Building Startup Landscape 2024!
 
Linux Foundation Edge _ Overview of FDO Software Components _ Randy at Intel.pdf
Linux Foundation Edge _ Overview of FDO Software Components _ Randy at Intel.pdfLinux Foundation Edge _ Overview of FDO Software Components _ Randy at Intel.pdf
Linux Foundation Edge _ Overview of FDO Software Components _ Randy at Intel.pdf
 
TEST BANK For, Information Technology Project Management 9th Edition Kathy Sc...
TEST BANK For, Information Technology Project Management 9th Edition Kathy Sc...TEST BANK For, Information Technology Project Management 9th Edition Kathy Sc...
TEST BANK For, Information Technology Project Management 9th Edition Kathy Sc...
 
Using IESVE for Room Loads Analysis - UK & Ireland
Using IESVE for Room Loads Analysis - UK & IrelandUsing IESVE for Room Loads Analysis - UK & Ireland
Using IESVE for Room Loads Analysis - UK & Ireland
 
Microsoft CSP Briefing Pre-Engagement - Questionnaire
Microsoft CSP Briefing Pre-Engagement - QuestionnaireMicrosoft CSP Briefing Pre-Engagement - Questionnaire
Microsoft CSP Briefing Pre-Engagement - Questionnaire
 
ASRock Industrial FDO Solutions in Action for Industrial Edge AI _ Kenny at A...
ASRock Industrial FDO Solutions in Action for Industrial Edge AI _ Kenny at A...ASRock Industrial FDO Solutions in Action for Industrial Edge AI _ Kenny at A...
ASRock Industrial FDO Solutions in Action for Industrial Edge AI _ Kenny at A...
 
What's New in Teams Calling, Meetings and Devices April 2024
What's New in Teams Calling, Meetings and Devices April 2024What's New in Teams Calling, Meetings and Devices April 2024
What's New in Teams Calling, Meetings and Devices April 2024
 

Life without CPAN

  • 1. LIFE WITHOUT CPAN Reinventing the Wheel Bob Ernst BobErnstStl@gmail.com ST. LOUIS PERL MONGERS July 17, 2013 Bob Ernst Life Without CPAN
  • 2. Comprehensive Perl Archive Network http://www.cpan.org/ 22,938 Perl modules (and growing!) 10,781 authors (and growing!) Possibly the best feature of Perl ... and sometimes you can't use it Bob Ernst Life Without CPAN
  • 3. $677 Million In 2004, CPAN had 15.4 million lines of code, which would cost $677,000,000 to develop http://developers.slashdot.org/story/04/07/30/1229239/cpan-677-million-of-perl Bob Ernst Life Without CPAN
  • 4. Handy tools cpan cpanm cpanp perlbrew Bob Ernst Life Without CPAN
  • 5. Why don't people use CPAN? And how did I become one of them?? Bob Ernst Life Without CPAN
  • 6. But I don't have root..." No root access? That is an easy one: us e l o c a l : : l i b ; Bob Ernst Life Without CPAN
  • 7. Why is this so complicated?" CPAN often has objected-oriented Perl Embarrassment of riches More & Better module documentation couldn't hurt Bob Ernst Life Without CPAN
  • 8. I don't have enough disk space..." Who doesn't have lots of disk space in 2013? SSD drives - fast, but small Raspberry Pi Embedded systems Shared hosting Virtual Machines Disk quotas Bob Ernst Life Without CPAN
  • 9. NIH - Not Invented Here Pretty silly, but unfortunately common Bob Ernst Life Without CPAN
  • 10. Security Concerns Some organizations are serious about security What company wrote this software? You want to connect to the internet?? Bob Ernst Life Without CPAN
  • 11. Local Mirror & Packing CPAN::Mini CPAN::Mini::Inject Pinto Carton Bob Ernst Life Without CPAN
  • 12. Licensing What is this FOSS / open source / shareware / freeware stu? We need to review that license... Sometimes it is easier to buy software Bob Ernst Life Without CPAN
  • 13. Mix of licenses Most, though not all, modules on CPAN are licensed under the GNU Public License (GPL) or the Artistic license { CPAN FAQ Bob Ernst Life Without CPAN
  • 14. GPL The GNU Public License is a negative in some organizations Bob Ernst Life Without CPAN
  • 15. CPAN::Meta::Spec agpl_3 GNU Affero General Public License, Version 3 apache_1_1 Apache Software License, Version 1.1 apache_2_0 Apache License, Version 2.0 artistic_1 Artistic License, (Version 1) artistic_2 Artistic License, Version 2.0 bsd BSD License (three-clause) freebsd FreeBSD License (two-clause) gfdl_1_2 GNU Free Documentation License, Version 1.2 gfdl_1_3 GNU Free Documentation License, Version 1.3 gpl_1 GNU General Public License, Version 1 gpl_2 GNU General Public License, Version 2 gpl_3 GNU General Public License, Version 3 lgpl_2_1 GNU Lesser General Public License, Version 2.1 lgpl_3_0 GNU Lesser General Public License, Version 3.0 mit MIT (aka X11) License mozilla_1_0 Mozilla Public License, Version 1.0 mozilla_1_1 Mozilla Public License, Version 1.1 openssl OpenSSL License perl_5 The Perl 5 License (Artistic 1 GPL 1 or later) qpl_1_0 Q Public License, Version 1.0 ssleay Original SSLeay License sun Sun Internet Standards Source License (SISSL) zlib zlib License Bob Ernst Life Without CPAN
  • 16. And... open_source Other Open Source Initiative (OSI) approved license restricted Requires special permission from copyright holder unrestricted Not an OSI approved license, but not restricted unknown License not provided in metadata May be hard to get approval! Bob Ernst Life Without CPAN
  • 17. Missing licenses 16.6% of CPAN uploads this year don't have a license in META.yml (Older modules are worse!) http://cpants.cpanauthors.org/kwalitee/metayml has license Bob Ernst Life Without CPAN
  • 18. Get the modules without CPAN Perhaps you have access to another source of modules that is already approved ActiveState Perl's PPO Linux package installer (yum, apt, etc.) Bob Ernst Life Without CPAN
  • 19. This stu is broken! Perl CPAN have a strong culture of quality and testing... But there are buggy modules Look for recommended modules http://cpanratings.perl.org/ Check outstanding bug list for modules Report the bug! Fix the bug yourself (and share the patch) Fork the module Bob Ernst Life Without CPAN
  • 20. Who am I going to call for support? Submit a bug report IRC Perl Monks Stack Over ow Mailing lists ActiveState Bob Ernst Life Without CPAN
  • 21. Deploying to Production No internet access (in secure environments) Slow installs Missing dependencies Broken installs Bob Ernst Life Without CPAN
  • 22. Building on Quicksand CPAN modules typically have dependencies, modules are updated all the time A
  • 23. x in one module might break the module you are counting on! Bob Ernst Life Without CPAN
  • 24. Make it solid perlbrew to get the right version of Perl CPAN::Mini to get the right version of everything else Bob Ernst Life Without CPAN
  • 25. You've fought the political battle and lost... What do you do? Bob Ernst Life Without CPAN
  • 26. Reinvent the Wheel Bob Ernst Life Without CPAN
  • 27. You aren't alone If you google XYZ Perl, you'll
  • 28. nd a lot of questions like: How do I XYZ in Perl without using CPAN? Bob Ernst Life Without CPAN
  • 29. XML Parsing Writing an XML parser is hard work XML isn't a regular language so it can't be parsed with regular expressions But in a pinch... i f ( $ i n p u t =~ qr f ( t i t l e ) ( . ) (/ t i t l e ) gx ) f $ t i t l e = $2 ; g Bob Ernst Life Without CPAN
  • 30. Date and Time Date::Manip and Date::Calc are so powerful... what to do when they aren't available? Bob Ernst Life Without CPAN
  • 31. The Next Eight Sundays (Date::Calc) us e Date : : Cal c qw( Add De l ta Days Da t e t o Te x t Day of Week Today ) ; my @date = Today ( ) ; my $ d a y s u n t i l s u n d a y = 7 Day of Week ( @date ) ; i f ( $ d a y s u n t i l s u n d a y == 0 ) f $ d a y s u n t i l s u n d a y = 7 ; g f o r ( my $ i =0; $i 8; $ i++ ) f @date = Add De l ta Days ( @date , $ d a y s u n t i l s u n d a y ) ; say Da t e t o Te x t ( @date ) ; $ d a y s u n t i l s u n d a y = 7 ; g Bob Ernst Life Without CPAN
  • 32. The Next Eight Sundays (POSIX) us e POSIX qw( mktime s t r f t ime ) ; us e c o n s t a n t f MDAY = 3 , WDAY = 6 , g ; my @date = l o c a l t ime ( t ime ( ) ) ; f o r (my $ i =0; $i 8; $ i++) f $dat e [MDAY] += 7 $dat e [WDAY] ; @date = l o c a l t ime ( mktime ( @date ) ) ; say s t r f t ime ( %a %d%b%Y , @date ) ; g Bob Ernst Life Without CPAN
  • 33. Parallel Processing Modules like Parallel::Queue are great... if you have CPAN. Bob Ernst Life Without CPAN
  • 34. Old Fashion Fork our @c h i l d r e n = ( ) ; sub spawn command f my $command = s h i f t ; my $pid = f o r k ( ) ; i f ( $pid ) f push @c h i l d r e n , $pid ; g e l s i f ( $pid == 0 ) f sys tem ( @f$commandg ) ; e x i t 0 ; g g Bob Ernst Life Without CPAN
  • 35. Fork continued f o r ( my $ i =1; $ i = 5 2 ; $ i++ ) f spawn command ( [ what e v e r , $ i ] ) ; g f o r e a c h my $pid ( @c h i l d r e n ) f wa i t p i d ( $pid , 0 ) ; g Bob Ernst Life Without CPAN
  • 36. Core Modules Don't forget the core modules! Benchmark Carp Cwd Data::Dumper File::stat Getopt::Long IO::Handle IO::Socket Log::Message Math::BigInt Memoize Pod::Usage POSIX Test::More Time::Local 682 altogether! Bob Ernst Life Without CPAN
  • 37. REMEMBER There are three great virtues of a programmer: laziness, impatience and hubris { Larry Wall Be lazy and impatient { use CPAN! Bob Ernst Life Without CPAN