Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 7997277
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 4, 20262026-06-04T14:56:05+00:00 2026-06-04T14:56:05+00:00

I am currently working on a roughly 15 years old web application. It contains

  • 0

I am currently working on a roughly 15 years old web application.

It contains mainly CGI perl scripts with HTML::Template templates.

It has over 12 000 files and roughly 260 MB of total code. I estimate that no more than 1500 perl scripts are needed and I want to get rid of all the unused code.

There are practically no tests written for the code.

My questions are:

  • Are you aware of any CPAN module that can help me get a list of only used and required modules?
  • What would be your approach if you’d want to get rid of all the extra code?

I was thinking at the following approaches:

  • try to override the use and require perl builtins with ones that output the loaded file name in a specific location
  • override the warnings and/or strict modules import function and output the file name in the specific location
  • study the Devel::Cover perl module and take the same approach and analyze the code when doing manual testing instead of automated tests
  • replace the perl executable with a custom one, which will log each name of file it reads (I don’t know how to do that yet)
  • some creative use of lsof (?!?)
  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-04T14:56:06+00:00Added an answer on June 4, 2026 at 2:56 pm

    Devel::Modlist may give you what you need, but I have never used it.

    The few times I have needed to do somehing like this I have opted for the more brute force approach of inspecting %INC at the end the program.

    END {
        open my $log_fh, ...;
        print $log_fh "$_\n" for sort keys %INC;
    }
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Currently working on a Spring 2.5 web application, looks as if the business has
Am currently working on an application that requires users to submit posts and comments
I'm currently working with on a fat client application using a self written RMI
Currently working on an ASP.NET web app and am starting to realise i'm writing
Currently working on a little Windows Phone (7.5) application and one of the pages
Currently working on a multi-threaded WP 7.1.1 application and slightly more than half of
Currently working in the deployment of an OFBiz based ERP, we've come to the
Currently working on a VBScript to automate some of the dirty PST ingestion work
Currently working on a site built in Django and i'm getting an issue when
Currently working with NSURLConnection. Found a great website showing important delegate methods coming with

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.