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

Why Teams call analytics are critical to your entire business
Why Teams call analytics are critical to your entire businessWhy Teams call analytics are critical to your entire business
Why Teams call analytics are critical to your entire business
panagenda
 
+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@
 
Architecting Cloud Native Applications
Architecting Cloud Native ApplicationsArchitecting Cloud Native Applications
Architecting Cloud Native Applications
WSO2
 

Último (20)

Connector Corner: Accelerate revenue generation using UiPath API-centric busi...
Connector Corner: Accelerate revenue generation using UiPath API-centric busi...Connector Corner: Accelerate revenue generation using UiPath API-centric busi...
Connector Corner: Accelerate revenue generation using UiPath API-centric busi...
 
Axa Assurance Maroc - Insurer Innovation Award 2024
Axa Assurance Maroc - Insurer Innovation Award 2024Axa Assurance Maroc - Insurer Innovation Award 2024
Axa Assurance Maroc - Insurer Innovation Award 2024
 
FWD Group - Insurer Innovation Award 2024
FWD Group - Insurer Innovation Award 2024FWD Group - Insurer Innovation Award 2024
FWD Group - Insurer Innovation Award 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...
 
EMPOWERMENT TECHNOLOGY GRADE 11 QUARTER 2 REVIEWER
EMPOWERMENT TECHNOLOGY GRADE 11 QUARTER 2 REVIEWEREMPOWERMENT TECHNOLOGY GRADE 11 QUARTER 2 REVIEWER
EMPOWERMENT TECHNOLOGY GRADE 11 QUARTER 2 REVIEWER
 
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 Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
 
"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 ...
 
A Year of the Servo Reboot: Where Are We Now?
A Year of the Servo Reboot: Where Are We Now?A Year of the Servo Reboot: Where Are We Now?
A Year of the Servo Reboot: Where Are We Now?
 
Apidays New York 2024 - The value of a flexible API Management solution for O...
Apidays New York 2024 - The value of a flexible API Management solution for O...Apidays New York 2024 - The value of a flexible API Management solution for O...
Apidays New York 2024 - The value of a flexible API Management solution for O...
 
Why Teams call analytics are critical to your entire business
Why Teams call analytics are critical to your entire businessWhy Teams call analytics are critical to your entire business
Why Teams call analytics are critical to your entire business
 
Repurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost Saving
Repurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost SavingRepurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost Saving
Repurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost Saving
 
A Beginners Guide to Building a RAG App Using Open Source Milvus
A Beginners Guide to Building a RAG App Using Open Source MilvusA Beginners Guide to Building a RAG App Using Open Source Milvus
A Beginners Guide to Building a RAG App Using Open Source Milvus
 
+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...
 
DBX First Quarter 2024 Investor Presentation
DBX First Quarter 2024 Investor PresentationDBX First Quarter 2024 Investor Presentation
DBX First Quarter 2024 Investor Presentation
 
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemkeProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
 
Architecting Cloud Native Applications
Architecting Cloud Native ApplicationsArchitecting Cloud Native Applications
Architecting Cloud Native Applications
 
Strategies for Landing an Oracle DBA Job as a Fresher
Strategies for Landing an Oracle DBA Job as a FresherStrategies for Landing an Oracle DBA Job as a Fresher
Strategies for Landing an Oracle DBA Job as a Fresher
 
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
 
presentation ICT roal in 21st century education
presentation ICT roal in 21st century educationpresentation ICT roal in 21st century education
presentation ICT roal in 21st century education
 
Manulife - Insurer Transformation Award 2024
Manulife - Insurer Transformation Award 2024Manulife - Insurer Transformation Award 2024
Manulife - Insurer Transformation Award 2024
 

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.