SlideShare a Scribd company logo
1 of 17
REFACTORING TOOLS IN
PERL
WHAT IS REFACTORING
Refactoring is a
disciplined technique
for restructuring an
existing body of code,
altering its internal
structure without
changing its external
behavior
REFACTORING CATALOG
• ▶Add Parameter
• ▶Change Bidirectional
Association to Unidirectional
• ▶Change Reference to Value
• ▶Change Unidirectional
Association to Bidirectional
• ▶Change Value to Reference
• ▶Collapse Hierarchy
Expression
• ▶Consolidate Duplicate
Conditional Fragments
• ▶Decompose Conditional
• ▶Duplicate Observed Data
• ▶Dynamic Method Definition
• ▶Eagerly Initialized Attribute
THE GOALS
• Make code more readable and comprehensible
• Eliminate duplication
WHY?
• Lots of time is spent reading code
• Bugs hide in obscure code
• Duplication makes code rot
• LEARNING!
START OUT BRAINDEAD, GET
BETTER
TOOLS
?????
JAVA REFACTORING
In Eclipse
JAVASCRIPT
REFACTORING
In WebStorm
PERL REFACTORING
PPIx::EditorTools
• Supports Vim and Emacs
• RenameVariable (safe renaming)
• RenamePackageFromPath
• IntroduceTemporaryVariable
My extensions
• Supports Vim only
• ExtractMethod
• ConvertVarToAttribute
Why refactor long methods?
• Readability—make the essential logic clear
• Isolated testing
• Isolated editing
• Avoid comments getting out of sync
ARCHITECTURE
Analyzer
VariableSorter
CodeGenerator
CodeEditor
ANALYZER CLASSES
CURRENT STATUS
• Mostly safe with “normal”
code.
• No fancy installation
available
• Use the README at
https://github.com/dagfin
nr/perl-extract-method
• dagfinn@startsiden.no
• dagfinn@reiersol.com
• Github, Twitter (theoretically): dagfinnr

More Related Content

Viewers also liked

Ford vinson
Ford vinsonFord vinson
Ford vinsonndavis1
 
Postennet In Perspectief
Postennet In PerspectiefPostennet In Perspectief
Postennet In PerspectiefBongers
 
Ten things about_me ahmad
Ten things about_me ahmadTen things about_me ahmad
Ten things about_me ahmadndavis1
 
Top ten things_about_me juliana
Top ten things_about_me julianaTop ten things_about_me juliana
Top ten things_about_me julianandavis1
 
Hannah Top 10
Hannah Top 10Hannah Top 10
Hannah Top 10ndavis1
 
Improvedncorre2
Improvedncorre2Improvedncorre2
Improvedncorre2ndavis1
 
Blauwe Oceaan
Blauwe OceaanBlauwe Oceaan
Blauwe Oceaannienke36
 
Backbone.js versus AngularJS
Backbone.js versus AngularJSBackbone.js versus AngularJS
Backbone.js versus AngularJSDagfinn Reiersøl
 
Blauwe Oceaan
Blauwe OceaanBlauwe Oceaan
Blauwe Oceaannienke36
 
Tim mckay s_top_10-1
Tim mckay s_top_10-1Tim mckay s_top_10-1
Tim mckay s_top_10-1ndavis1
 

Viewers also liked (12)

Ford vinson
Ford vinsonFord vinson
Ford vinson
 
Postennet In Perspectief
Postennet In PerspectiefPostennet In Perspectief
Postennet In Perspectief
 
Ten things about_me ahmad
Ten things about_me ahmadTen things about_me ahmad
Ten things about_me ahmad
 
Top ten things_about_me juliana
Top ten things_about_me julianaTop ten things_about_me juliana
Top ten things_about_me juliana
 
Hannah Top 10
Hannah Top 10Hannah Top 10
Hannah Top 10
 
Improvedncorre2
Improvedncorre2Improvedncorre2
Improvedncorre2
 
Blauwe Oceaan
Blauwe OceaanBlauwe Oceaan
Blauwe Oceaan
 
Backbone.js versus AngularJS
Backbone.js versus AngularJSBackbone.js versus AngularJS
Backbone.js versus AngularJS
 
Code smells in PHP
Code smells in PHPCode smells in PHP
Code smells in PHP
 
Blauwe Oceaan
Blauwe OceaanBlauwe Oceaan
Blauwe Oceaan
 
Tim mckay s_top_10-1
Tim mckay s_top_10-1Tim mckay s_top_10-1
Tim mckay s_top_10-1
 
Reliable acceptance testing
Reliable acceptance testingReliable acceptance testing
Reliable acceptance testing
 

Similar to Refactoring tools for Perl code

Exploit techniques and mitigation
Exploit techniques and mitigationExploit techniques and mitigation
Exploit techniques and mitigationYaniv Shani
 
Code qualityCode qualityCode quality.pptx
Code qualityCode qualityCode quality.pptxCode qualityCode qualityCode quality.pptx
Code qualityCode qualityCode quality.pptxSanjarMadraximov
 
Programming language paradigms
Programming language paradigmsProgramming language paradigms
Programming language paradigmsAshok Raj
 
Autoframework design
Autoframework designAutoframework design
Autoframework designForge Events
 
CHASE 2012 - An Exploratory Study of Backtracking Strategies Used by Developers
CHASE 2012 - An Exploratory Study of Backtracking Strategies Used by DevelopersCHASE 2012 - An Exploratory Study of Backtracking Strategies Used by Developers
CHASE 2012 - An Exploratory Study of Backtracking Strategies Used by DevelopersYoungSeok Yoon
 
Protecting Source Code
Protecting Source CodeProtecting Source Code
Protecting Source CodeGodfrey Nolan
 
Code refactoring
Code refactoringCode refactoring
Code refactoringLalit Kale
 
Core java training in Marathahalli, Bangalore
Core java training in Marathahalli, BangaloreCore java training in Marathahalli, Bangalore
Core java training in Marathahalli, BangaloreSDLCT
 
Core java training in Marathahalli, Bangalore
Core java training in Marathahalli, BangaloreCore java training in Marathahalli, Bangalore
Core java training in Marathahalli, BangaloreSDLCT
 
SE2016 Java Alex Theedom "Java EE revisits design patterns"
SE2016 Java Alex Theedom "Java EE revisits design patterns"SE2016 Java Alex Theedom "Java EE revisits design patterns"
SE2016 Java Alex Theedom "Java EE revisits design patterns"Inhacking
 
The Power Of Refactoring (PHPNW)
The Power Of Refactoring (PHPNW)The Power Of Refactoring (PHPNW)
The Power Of Refactoring (PHPNW)Stefan Koopmanschap
 
Introduction to Refactoring
Introduction to RefactoringIntroduction to Refactoring
Introduction to RefactoringNiels Verdonk
 
Learning to run
Learning to runLearning to run
Learning to rundominion
 
Improving The Quality of Existing Software
Improving The Quality of Existing SoftwareImproving The Quality of Existing Software
Improving The Quality of Existing SoftwareSteven Smith
 
dbt Python models - GoDataFest by Guillermo Sanchez
dbt Python models - GoDataFest by Guillermo Sanchezdbt Python models - GoDataFest by Guillermo Sanchez
dbt Python models - GoDataFest by Guillermo SanchezGoDataDriven
 
Refactoring Applications using SOLID Principles
Refactoring Applications using SOLID PrinciplesRefactoring Applications using SOLID Principles
Refactoring Applications using SOLID PrinciplesSteven Smith
 

Similar to Refactoring tools for Perl code (20)

Refactoring.pdf
Refactoring.pdfRefactoring.pdf
Refactoring.pdf
 
Exploit techniques and mitigation
Exploit techniques and mitigationExploit techniques and mitigation
Exploit techniques and mitigation
 
Code qualityCode qualityCode quality.pptx
Code qualityCode qualityCode quality.pptxCode qualityCode qualityCode quality.pptx
Code qualityCode qualityCode quality.pptx
 
Programming language paradigms
Programming language paradigmsProgramming language paradigms
Programming language paradigms
 
Autoframework design
Autoframework designAutoframework design
Autoframework design
 
CHASE 2012 - An Exploratory Study of Backtracking Strategies Used by Developers
CHASE 2012 - An Exploratory Study of Backtracking Strategies Used by DevelopersCHASE 2012 - An Exploratory Study of Backtracking Strategies Used by Developers
CHASE 2012 - An Exploratory Study of Backtracking Strategies Used by Developers
 
The Power of Refactoring
The Power of RefactoringThe Power of Refactoring
The Power of Refactoring
 
Protecting Source Code
Protecting Source CodeProtecting Source Code
Protecting Source Code
 
Code refactoring
Code refactoringCode refactoring
Code refactoring
 
Core java training in Marathahalli, Bangalore
Core java training in Marathahalli, BangaloreCore java training in Marathahalli, Bangalore
Core java training in Marathahalli, Bangalore
 
Core java training in Marathahalli, Bangalore
Core java training in Marathahalli, BangaloreCore java training in Marathahalli, Bangalore
Core java training in Marathahalli, Bangalore
 
Miami2015
Miami2015Miami2015
Miami2015
 
SE2016 Java Alex Theedom "Java EE revisits design patterns"
SE2016 Java Alex Theedom "Java EE revisits design patterns"SE2016 Java Alex Theedom "Java EE revisits design patterns"
SE2016 Java Alex Theedom "Java EE revisits design patterns"
 
Alex Theedom Java ee revisits design patterns
Alex Theedom	Java ee revisits design patternsAlex Theedom	Java ee revisits design patterns
Alex Theedom Java ee revisits design patterns
 
The Power Of Refactoring (PHPNW)
The Power Of Refactoring (PHPNW)The Power Of Refactoring (PHPNW)
The Power Of Refactoring (PHPNW)
 
Introduction to Refactoring
Introduction to RefactoringIntroduction to Refactoring
Introduction to Refactoring
 
Learning to run
Learning to runLearning to run
Learning to run
 
Improving The Quality of Existing Software
Improving The Quality of Existing SoftwareImproving The Quality of Existing Software
Improving The Quality of Existing Software
 
dbt Python models - GoDataFest by Guillermo Sanchez
dbt Python models - GoDataFest by Guillermo Sanchezdbt Python models - GoDataFest by Guillermo Sanchez
dbt Python models - GoDataFest by Guillermo Sanchez
 
Refactoring Applications using SOLID Principles
Refactoring Applications using SOLID PrinciplesRefactoring Applications using SOLID Principles
Refactoring Applications using SOLID Principles
 

Recently uploaded

Reassessing the Bedrock of Clinical Function Models: An Examination of Large ...
Reassessing the Bedrock of Clinical Function Models: An Examination of Large ...Reassessing the Bedrock of Clinical Function Models: An Examination of Large ...
Reassessing the Bedrock of Clinical Function Models: An Examination of Large ...harshavardhanraghave
 
A Secure and Reliable Document Management System is Essential.docx
A Secure and Reliable Document Management System is Essential.docxA Secure and Reliable Document Management System is Essential.docx
A Secure and Reliable Document Management System is Essential.docxComplianceQuest1
 
5 Signs You Need a Fashion PLM Software.pdf
5 Signs You Need a Fashion PLM Software.pdf5 Signs You Need a Fashion PLM Software.pdf
5 Signs You Need a Fashion PLM Software.pdfWave PLM
 
CALL ON ➥8923113531 🔝Call Girls Badshah Nagar Lucknow best Female service
CALL ON ➥8923113531 🔝Call Girls Badshah Nagar Lucknow best Female serviceCALL ON ➥8923113531 🔝Call Girls Badshah Nagar Lucknow best Female service
CALL ON ➥8923113531 🔝Call Girls Badshah Nagar Lucknow best Female serviceanilsa9823
 
TECUNIQUE: Success Stories: IT Service provider
TECUNIQUE: Success Stories: IT Service providerTECUNIQUE: Success Stories: IT Service provider
TECUNIQUE: Success Stories: IT Service providermohitmore19
 
+971565801893>>SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHAB...
+971565801893>>SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHAB...+971565801893>>SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHAB...
+971565801893>>SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHAB...Health
 
Software Quality Assurance Interview Questions
Software Quality Assurance Interview QuestionsSoftware Quality Assurance Interview Questions
Software Quality Assurance Interview QuestionsArshad QA
 
CALL ON ➥8923113531 🔝Call Girls Kakori Lucknow best sexual service Online ☂️
CALL ON ➥8923113531 🔝Call Girls Kakori Lucknow best sexual service Online  ☂️CALL ON ➥8923113531 🔝Call Girls Kakori Lucknow best sexual service Online  ☂️
CALL ON ➥8923113531 🔝Call Girls Kakori Lucknow best sexual service Online ☂️anilsa9823
 
Short Story: Unveiling the Reasoning Abilities of Large Language Models by Ke...
Short Story: Unveiling the Reasoning Abilities of Large Language Models by Ke...Short Story: Unveiling the Reasoning Abilities of Large Language Models by Ke...
Short Story: Unveiling the Reasoning Abilities of Large Language Models by Ke...kellynguyen01
 
SyndBuddy AI 2k Review 2024: Revolutionizing Content Syndication with AI
SyndBuddy AI 2k Review 2024: Revolutionizing Content Syndication with AISyndBuddy AI 2k Review 2024: Revolutionizing Content Syndication with AI
SyndBuddy AI 2k Review 2024: Revolutionizing Content Syndication with AIABDERRAOUF MEHENNI
 
How To Use Server-Side Rendering with Nuxt.js
How To Use Server-Side Rendering with Nuxt.jsHow To Use Server-Side Rendering with Nuxt.js
How To Use Server-Side Rendering with Nuxt.jsAndolasoft Inc
 
Shapes for Sharing between Graph Data Spaces - and Epistemic Querying of RDF-...
Shapes for Sharing between Graph Data Spaces - and Epistemic Querying of RDF-...Shapes for Sharing between Graph Data Spaces - and Epistemic Querying of RDF-...
Shapes for Sharing between Graph Data Spaces - and Epistemic Querying of RDF-...Steffen Staab
 
Tech Tuesday-Harness the Power of Effective Resource Planning with OnePlan’s ...
Tech Tuesday-Harness the Power of Effective Resource Planning with OnePlan’s ...Tech Tuesday-Harness the Power of Effective Resource Planning with OnePlan’s ...
Tech Tuesday-Harness the Power of Effective Resource Planning with OnePlan’s ...OnePlan Solutions
 
Steps To Getting Up And Running Quickly With MyTimeClock Employee Scheduling ...
Steps To Getting Up And Running Quickly With MyTimeClock Employee Scheduling ...Steps To Getting Up And Running Quickly With MyTimeClock Employee Scheduling ...
Steps To Getting Up And Running Quickly With MyTimeClock Employee Scheduling ...MyIntelliSource, Inc.
 
HR Software Buyers Guide in 2024 - HRSoftware.com
HR Software Buyers Guide in 2024 - HRSoftware.comHR Software Buyers Guide in 2024 - HRSoftware.com
HR Software Buyers Guide in 2024 - HRSoftware.comFatema Valibhai
 
Optimizing AI for immediate response in Smart CCTV
Optimizing AI for immediate response in Smart CCTVOptimizing AI for immediate response in Smart CCTV
Optimizing AI for immediate response in Smart CCTVshikhaohhpro
 
Right Money Management App For Your Financial Goals
Right Money Management App For Your Financial GoalsRight Money Management App For Your Financial Goals
Right Money Management App For Your Financial GoalsJhone kinadey
 
Unveiling the Tech Salsa of LAMs with Janus in Real-Time Applications
Unveiling the Tech Salsa of LAMs with Janus in Real-Time ApplicationsUnveiling the Tech Salsa of LAMs with Janus in Real-Time Applications
Unveiling the Tech Salsa of LAMs with Janus in Real-Time ApplicationsAlberto González Trastoy
 

Recently uploaded (20)

Reassessing the Bedrock of Clinical Function Models: An Examination of Large ...
Reassessing the Bedrock of Clinical Function Models: An Examination of Large ...Reassessing the Bedrock of Clinical Function Models: An Examination of Large ...
Reassessing the Bedrock of Clinical Function Models: An Examination of Large ...
 
A Secure and Reliable Document Management System is Essential.docx
A Secure and Reliable Document Management System is Essential.docxA Secure and Reliable Document Management System is Essential.docx
A Secure and Reliable Document Management System is Essential.docx
 
5 Signs You Need a Fashion PLM Software.pdf
5 Signs You Need a Fashion PLM Software.pdf5 Signs You Need a Fashion PLM Software.pdf
5 Signs You Need a Fashion PLM Software.pdf
 
CHEAP Call Girls in Pushp Vihar (-DELHI )🔝 9953056974🔝(=)/CALL GIRLS SERVICE
CHEAP Call Girls in Pushp Vihar (-DELHI )🔝 9953056974🔝(=)/CALL GIRLS SERVICECHEAP Call Girls in Pushp Vihar (-DELHI )🔝 9953056974🔝(=)/CALL GIRLS SERVICE
CHEAP Call Girls in Pushp Vihar (-DELHI )🔝 9953056974🔝(=)/CALL GIRLS SERVICE
 
CALL ON ➥8923113531 🔝Call Girls Badshah Nagar Lucknow best Female service
CALL ON ➥8923113531 🔝Call Girls Badshah Nagar Lucknow best Female serviceCALL ON ➥8923113531 🔝Call Girls Badshah Nagar Lucknow best Female service
CALL ON ➥8923113531 🔝Call Girls Badshah Nagar Lucknow best Female service
 
TECUNIQUE: Success Stories: IT Service provider
TECUNIQUE: Success Stories: IT Service providerTECUNIQUE: Success Stories: IT Service provider
TECUNIQUE: Success Stories: IT Service provider
 
+971565801893>>SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHAB...
+971565801893>>SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHAB...+971565801893>>SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHAB...
+971565801893>>SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHAB...
 
Software Quality Assurance Interview Questions
Software Quality Assurance Interview QuestionsSoftware Quality Assurance Interview Questions
Software Quality Assurance Interview Questions
 
Microsoft AI Transformation Partner Playbook.pdf
Microsoft AI Transformation Partner Playbook.pdfMicrosoft AI Transformation Partner Playbook.pdf
Microsoft AI Transformation Partner Playbook.pdf
 
CALL ON ➥8923113531 🔝Call Girls Kakori Lucknow best sexual service Online ☂️
CALL ON ➥8923113531 🔝Call Girls Kakori Lucknow best sexual service Online  ☂️CALL ON ➥8923113531 🔝Call Girls Kakori Lucknow best sexual service Online  ☂️
CALL ON ➥8923113531 🔝Call Girls Kakori Lucknow best sexual service Online ☂️
 
Short Story: Unveiling the Reasoning Abilities of Large Language Models by Ke...
Short Story: Unveiling the Reasoning Abilities of Large Language Models by Ke...Short Story: Unveiling the Reasoning Abilities of Large Language Models by Ke...
Short Story: Unveiling the Reasoning Abilities of Large Language Models by Ke...
 
SyndBuddy AI 2k Review 2024: Revolutionizing Content Syndication with AI
SyndBuddy AI 2k Review 2024: Revolutionizing Content Syndication with AISyndBuddy AI 2k Review 2024: Revolutionizing Content Syndication with AI
SyndBuddy AI 2k Review 2024: Revolutionizing Content Syndication with AI
 
How To Use Server-Side Rendering with Nuxt.js
How To Use Server-Side Rendering with Nuxt.jsHow To Use Server-Side Rendering with Nuxt.js
How To Use Server-Side Rendering with Nuxt.js
 
Shapes for Sharing between Graph Data Spaces - and Epistemic Querying of RDF-...
Shapes for Sharing between Graph Data Spaces - and Epistemic Querying of RDF-...Shapes for Sharing between Graph Data Spaces - and Epistemic Querying of RDF-...
Shapes for Sharing between Graph Data Spaces - and Epistemic Querying of RDF-...
 
Tech Tuesday-Harness the Power of Effective Resource Planning with OnePlan’s ...
Tech Tuesday-Harness the Power of Effective Resource Planning with OnePlan’s ...Tech Tuesday-Harness the Power of Effective Resource Planning with OnePlan’s ...
Tech Tuesday-Harness the Power of Effective Resource Planning with OnePlan’s ...
 
Steps To Getting Up And Running Quickly With MyTimeClock Employee Scheduling ...
Steps To Getting Up And Running Quickly With MyTimeClock Employee Scheduling ...Steps To Getting Up And Running Quickly With MyTimeClock Employee Scheduling ...
Steps To Getting Up And Running Quickly With MyTimeClock Employee Scheduling ...
 
HR Software Buyers Guide in 2024 - HRSoftware.com
HR Software Buyers Guide in 2024 - HRSoftware.comHR Software Buyers Guide in 2024 - HRSoftware.com
HR Software Buyers Guide in 2024 - HRSoftware.com
 
Optimizing AI for immediate response in Smart CCTV
Optimizing AI for immediate response in Smart CCTVOptimizing AI for immediate response in Smart CCTV
Optimizing AI for immediate response in Smart CCTV
 
Right Money Management App For Your Financial Goals
Right Money Management App For Your Financial GoalsRight Money Management App For Your Financial Goals
Right Money Management App For Your Financial Goals
 
Unveiling the Tech Salsa of LAMs with Janus in Real-Time Applications
Unveiling the Tech Salsa of LAMs with Janus in Real-Time ApplicationsUnveiling the Tech Salsa of LAMs with Janus in Real-Time Applications
Unveiling the Tech Salsa of LAMs with Janus in Real-Time Applications
 

Refactoring tools for Perl code