SlideShare uma empresa Scribd logo
1 de 14
How to write  Perl Modules Some practical advice about how to build a perl module March 21, 2003 – Stanford Linear Accelerator Center Fabrizio Coccetti
Agenda ,[object Object],[object Object],[object Object],[object Object],[object Object],Perl Module are easy to make and handy to use
What a Perl Module is ,[object Object],[object Object],[object Object],[object Object]
Why it is convenient to use PMs ,[object Object],[object Object],[object Object],[object Object],[object Object],Time saving technique !!
Before making a PM ,[object Object],[object Object],[object Object]
Let’s start to make a Perl Module ,[object Object],[object Object],[object Object],[object Object],$ h2xs -AX -n IEPM::PingER
What h2xs does for the developer ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object]
Some advice on writing the code of a PM ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object]
How to use a PM in a Perl program ,[object Object],[object Object],[object Object],[object Object],use IEPM::PingER; $answer = ping_it (host.domain.edu);
Use Carp in Perl Modules ,[object Object],warn "No hostname given"; No hostname given at /usr/local/lib/perl5/site_perl/5.6/IEPM/PingER.pm line 143. carp "No hostname given"; No hostname given at perl_script.pl line 5. ,[object Object],use Carp; warn   carp die  croak
Example: the beginning of IEPM::PingER ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object]
Example: the subroutine ping_it ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object]
Preparing the package for shipping ,[object Object],[object Object],[object Object]
References ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object]

Mais conteúdo relacionado

Mais procurados

Full Python in 20 slides
Full Python in 20 slidesFull Python in 20 slides
Full Python in 20 slides
rfojdar
 

Mais procurados (20)

Customising py py
Customising py pyCustomising py py
Customising py py
 
PYTHON NOTES
PYTHON NOTESPYTHON NOTES
PYTHON NOTES
 
Full Python in 20 slides
Full Python in 20 slidesFull Python in 20 slides
Full Python in 20 slides
 
Get started python programming part 1
Get started python programming   part 1Get started python programming   part 1
Get started python programming part 1
 
Python Book/Notes For Python Book/Notes For S.Y.B.Sc. I.T.
Python Book/Notes For Python Book/Notes For S.Y.B.Sc. I.T.Python Book/Notes For Python Book/Notes For S.Y.B.Sc. I.T.
Python Book/Notes For Python Book/Notes For S.Y.B.Sc. I.T.
 
Python by Rj
Python by RjPython by Rj
Python by Rj
 
Python Programming Language
Python Programming LanguagePython Programming Language
Python Programming Language
 
Programming with Python - Basic
Programming with Python - BasicProgramming with Python - Basic
Programming with Python - Basic
 
Learn python
Learn pythonLearn python
Learn python
 
Python Session - 5
Python Session - 5Python Session - 5
Python Session - 5
 
Pl/Python
Pl/PythonPl/Python
Pl/Python
 
Perl Tidy Perl Critic
Perl Tidy Perl CriticPerl Tidy Perl Critic
Perl Tidy Perl Critic
 
Python master class part 1
Python master class part 1Python master class part 1
Python master class part 1
 
Inside PHP [OSCON 2012]
Inside PHP [OSCON 2012]Inside PHP [OSCON 2012]
Inside PHP [OSCON 2012]
 
Python master class 2
Python master class 2Python master class 2
Python master class 2
 
Python programming introduction
Python programming introductionPython programming introduction
Python programming introduction
 
Inside Python [OSCON 2012]
Inside Python [OSCON 2012]Inside Python [OSCON 2012]
Inside Python [OSCON 2012]
 
Introduction to python programming
Introduction to python programmingIntroduction to python programming
Introduction to python programming
 
Python Session - 6
Python Session - 6Python Session - 6
Python Session - 6
 
Using Jenkins for Continuous Integration of Perl components OSD2011
Using Jenkins for Continuous Integration of Perl components OSD2011 Using Jenkins for Continuous Integration of Perl components OSD2011
Using Jenkins for Continuous Integration of Perl components OSD2011
 

Destaque

EXCURSION 8-10-2006
EXCURSION 8-10-2006EXCURSION 8-10-2006
EXCURSION 8-10-2006
Gustavo
 
Ucan Do Iwb’s 2
Ucan Do Iwb’s 2Ucan Do Iwb’s 2
Ucan Do Iwb’s 2
johnp
 
Subset Selection v5
Subset Selection v5Subset Selection v5
Subset Selection v5
Martin Bush
 
Introductionand focusofcoursefall1
Introductionand focusofcoursefall1Introductionand focusofcoursefall1
Introductionand focusofcoursefall1
kulemeka
 
TEDx talk: How digital ecosystem changes learning
TEDx talk: How digital ecosystem changes learningTEDx talk: How digital ecosystem changes learning
TEDx talk: How digital ecosystem changes learning
Kai Pata
 
Ecologicalframework
EcologicalframeworkEcologicalframework
Ecologicalframework
Kai Pata
 

Destaque (20)

The #FabLabs : 10 Questions, 1,000 Answers !
The #FabLabs : 10 Questions, 1,000 Answers !The #FabLabs : 10 Questions, 1,000 Answers !
The #FabLabs : 10 Questions, 1,000 Answers !
 
Learninganalytic 2015
Learninganalytic 2015Learninganalytic 2015
Learninganalytic 2015
 
EXCURSION 8-10-2006
EXCURSION 8-10-2006EXCURSION 8-10-2006
EXCURSION 8-10-2006
 
El chateo puede ser peligroso.
El chateo puede ser peligroso.El chateo puede ser peligroso.
El chateo puede ser peligroso.
 
U.I. User Interface
U.I. User InterfaceU.I. User Interface
U.I. User Interface
 
Ucan Do Iwb’s 2
Ucan Do Iwb’s 2Ucan Do Iwb’s 2
Ucan Do Iwb’s 2
 
Sitios webs-por-tipologia
Sitios webs-por-tipologiaSitios webs-por-tipologia
Sitios webs-por-tipologia
 
Informatology: using web 2.0 in face-to-face sessions
Informatology: using web 2.0 in face-to-face sessionsInformatology: using web 2.0 in face-to-face sessions
Informatology: using web 2.0 in face-to-face sessions
 
Subset Selection v5
Subset Selection v5Subset Selection v5
Subset Selection v5
 
Presentatie hu fg w&lno 2 1
Presentatie hu fg w&lno 2 1Presentatie hu fg w&lno 2 1
Presentatie hu fg w&lno 2 1
 
Build Widgets
Build WidgetsBuild Widgets
Build Widgets
 
Learning in the cloud, feet in the village
Learning in the cloud, feet in the villageLearning in the cloud, feet in the village
Learning in the cloud, feet in the village
 
Mets1
Mets1Mets1
Mets1
 
Introductionand focusofcoursefall1
Introductionand focusofcoursefall1Introductionand focusofcoursefall1
Introductionand focusofcoursefall1
 
TEDx talk: How digital ecosystem changes learning
TEDx talk: How digital ecosystem changes learningTEDx talk: How digital ecosystem changes learning
TEDx talk: How digital ecosystem changes learning
 
SSM / Dog's Dot - grupa 2
SSM / Dog's Dot - grupa 2 SSM / Dog's Dot - grupa 2
SSM / Dog's Dot - grupa 2
 
Shoulder Impairment
Shoulder ImpairmentShoulder Impairment
Shoulder Impairment
 
Ecologicalframework
EcologicalframeworkEcologicalframework
Ecologicalframework
 
Standaarden en Toetsvoorzieningen SURF 13 juni 2014
Standaarden en Toetsvoorzieningen SURF 13 juni 2014Standaarden en Toetsvoorzieningen SURF 13 juni 2014
Standaarden en Toetsvoorzieningen SURF 13 juni 2014
 
Okoloogilinedisain
OkoloogilinedisainOkoloogilinedisain
Okoloogilinedisain
 

Semelhante a Perl Modules

Php extensions workshop
Php extensions workshopPhp extensions workshop
Php extensions workshop
julien pauli
 
Linux kernel driver tutorial vorlesung
Linux kernel driver tutorial vorlesungLinux kernel driver tutorial vorlesung
Linux kernel driver tutorial vorlesung
dns -
 
How to? Drupal developer toolkit. Dennis Povshedny.
How to? Drupal developer toolkit. Dennis Povshedny.How to? Drupal developer toolkit. Dennis Povshedny.
How to? Drupal developer toolkit. Dennis Povshedny.
DrupalCampDN
 

Semelhante a Perl Modules (20)

Managing Perl Installations: A SysAdmin's View
Managing Perl Installations: A SysAdmin's ViewManaging Perl Installations: A SysAdmin's View
Managing Perl Installations: A SysAdmin's View
 
Perl 20tips
Perl 20tipsPerl 20tips
Perl 20tips
 
Php extensions workshop
Php extensions workshopPhp extensions workshop
Php extensions workshop
 
Linux Module Programming
Linux Module ProgrammingLinux Module Programming
Linux Module Programming
 
Linux kernel driver tutorial vorlesung
Linux kernel driver tutorial vorlesungLinux kernel driver tutorial vorlesung
Linux kernel driver tutorial vorlesung
 
Open mp intro_01
Open mp intro_01Open mp intro_01
Open mp intro_01
 
30 Minutes To CPAN
30 Minutes To CPAN30 Minutes To CPAN
30 Minutes To CPAN
 
Aspect-oriented programming in Perl
Aspect-oriented programming in PerlAspect-oriented programming in Perl
Aspect-oriented programming in Perl
 
Building apache modules
Building apache modulesBuilding apache modules
Building apache modules
 
Drupal development
Drupal development Drupal development
Drupal development
 
How To Install Openbravo ERP 2.50 MP43 in Ubuntu
How To Install Openbravo ERP 2.50 MP43 in UbuntuHow To Install Openbravo ERP 2.50 MP43 in Ubuntu
How To Install Openbravo ERP 2.50 MP43 in Ubuntu
 
Easy native wrappers with SWIG
Easy native wrappers with SWIGEasy native wrappers with SWIG
Easy native wrappers with SWIG
 
Perl Programming - 01 Basic Perl
Perl Programming - 01 Basic PerlPerl Programming - 01 Basic Perl
Perl Programming - 01 Basic Perl
 
How to? Drupal developer toolkit. Dennis Povshedny.
How to? Drupal developer toolkit. Dennis Povshedny.How to? Drupal developer toolkit. Dennis Povshedny.
How to? Drupal developer toolkit. Dennis Povshedny.
 
brief intro to Linux device drivers
brief intro to Linux device driversbrief intro to Linux device drivers
brief intro to Linux device drivers
 
Introduction to perl_ a scripting language
Introduction to perl_ a scripting languageIntroduction to perl_ a scripting language
Introduction to perl_ a scripting language
 
Learn flask in 90mins
Learn flask in 90minsLearn flask in 90mins
Learn flask in 90mins
 
Php7 extensions workshop
Php7 extensions workshopPhp7 extensions workshop
Php7 extensions workshop
 
Workshop: Symfony2 Intruduction: (Controller, Routing, Model)
Workshop: Symfony2 Intruduction: (Controller, Routing, Model)Workshop: Symfony2 Intruduction: (Controller, Routing, Model)
Workshop: Symfony2 Intruduction: (Controller, Routing, Model)
 
Introduction to Perl
Introduction to PerlIntroduction to Perl
Introduction to Perl
 

Último

+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
?#DUbAI#??##{{(☎️+971_581248768%)**%*]'#abortion pills for sale in dubai@
 
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers:  A Deep Dive into Serverless Spatial Data and FMECloud Frontiers:  A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
Safe Software
 
Architecting Cloud Native Applications
Architecting Cloud Native ApplicationsArchitecting Cloud Native Applications
Architecting Cloud Native Applications
WSO2
 

Último (20)

+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
 
TrustArc Webinar - Unlock the Power of AI-Driven Data Discovery
TrustArc Webinar - Unlock the Power of AI-Driven Data DiscoveryTrustArc Webinar - Unlock the Power of AI-Driven Data Discovery
TrustArc Webinar - Unlock the Power of AI-Driven Data Discovery
 
Biography Of Angeliki Cooney | Senior Vice President Life Sciences | Albany, ...
Biography Of Angeliki Cooney | Senior Vice President Life Sciences | Albany, ...Biography Of Angeliki Cooney | Senior Vice President Life Sciences | Albany, ...
Biography Of Angeliki Cooney | Senior Vice President Life Sciences | Albany, ...
 
Platformless Horizons for Digital Adaptability
Platformless Horizons for Digital AdaptabilityPlatformless Horizons for Digital Adaptability
Platformless Horizons for Digital Adaptability
 
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers:  A Deep Dive into Serverless Spatial Data and FMECloud Frontiers:  A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
 
Mcleodganj Call Girls 🥰 8617370543 Service Offer VIP Hot Model
Mcleodganj Call Girls 🥰 8617370543 Service Offer VIP Hot ModelMcleodganj Call Girls 🥰 8617370543 Service Offer VIP Hot Model
Mcleodganj Call Girls 🥰 8617370543 Service Offer VIP Hot Model
 
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemkeProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
 
Navigating the Deluge_ Dubai Floods and the Resilience of Dubai International...
Navigating the Deluge_ Dubai Floods and the Resilience of Dubai International...Navigating the Deluge_ Dubai Floods and the Resilience of Dubai International...
Navigating the Deluge_ Dubai Floods and the Resilience of Dubai International...
 
"I see eyes in my soup": How Delivery Hero implemented the safety system for ...
"I see eyes in my soup": How Delivery Hero implemented the safety system for ..."I see eyes in my soup": How Delivery Hero implemented the safety system for ...
"I see eyes in my soup": How Delivery Hero implemented the safety system for ...
 
Architecting Cloud Native Applications
Architecting Cloud Native ApplicationsArchitecting Cloud Native Applications
Architecting Cloud Native Applications
 
Six Myths about Ontologies: The Basics of Formal Ontology
Six Myths about Ontologies: The Basics of Formal OntologySix Myths about Ontologies: The Basics of Formal Ontology
Six Myths about Ontologies: The Basics of Formal Ontology
 
Exploring Multimodal Embeddings with Milvus
Exploring Multimodal Embeddings with MilvusExploring Multimodal Embeddings with Milvus
Exploring Multimodal Embeddings with Milvus
 
Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...
Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...
Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...
 
Corporate and higher education May webinar.pptx
Corporate and higher education May webinar.pptxCorporate and higher education May webinar.pptx
Corporate and higher education May webinar.pptx
 
MS Copilot expands with MS Graph connectors
MS Copilot expands with MS Graph connectorsMS Copilot expands with MS Graph connectors
MS Copilot expands with MS Graph connectors
 
Strategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
Strategize a Smooth Tenant-to-tenant Migration and Copilot TakeoffStrategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
Strategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
 
Elevate Developer Efficiency & build GenAI Application with Amazon Q​
Elevate Developer Efficiency & build GenAI Application with Amazon Q​Elevate Developer Efficiency & build GenAI Application with Amazon Q​
Elevate Developer Efficiency & build GenAI Application with Amazon Q​
 
MINDCTI Revenue Release Quarter One 2024
MINDCTI Revenue Release Quarter One 2024MINDCTI Revenue Release Quarter One 2024
MINDCTI Revenue Release Quarter One 2024
 
Apidays New York 2024 - Accelerating FinTech Innovation by Vasa Krishnan, Fin...
Apidays New York 2024 - Accelerating FinTech Innovation by Vasa Krishnan, Fin...Apidays New York 2024 - Accelerating FinTech Innovation by Vasa Krishnan, Fin...
Apidays New York 2024 - Accelerating FinTech Innovation by Vasa Krishnan, Fin...
 
ICT role in 21st century education and its challenges
ICT role in 21st century education and its challengesICT role in 21st century education and its challenges
ICT role in 21st century education and its challenges
 

Perl Modules

  • 1. How to write Perl Modules Some practical advice about how to build a perl module March 21, 2003 – Stanford Linear Accelerator Center Fabrizio Coccetti
  • 2.
  • 3.
  • 4.
  • 5.
  • 6.
  • 7.
  • 8.
  • 9.
  • 10.
  • 11.
  • 12.
  • 13.
  • 14.