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 8577575
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 11, 20262026-06-11T20:11:26+00:00 2026-06-11T20:11:26+00:00

I am creating a bigger application in Perl, and I am wondering whether something

  • 0

I am creating a bigger application in Perl, and I am wondering whether something like class autoloading similar to php’s can be done in Perl?

I checked catching exceptions and $SIG{__DIE__} redefining etc., but this doesn’t seem to be solution because it will be stopped on first “cannot find method new via package”, and then to load every module I should again call the whole program.

One solution could be to maybe scan all files in my lib and give it to @INC at runtime, but I don’t know whether this is good solution — probably not.

Do anybody have a suggestion?

  • 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-11T20:11:27+00:00Added an answer on June 11, 2026 at 8:11 pm

    Well, you probably want to read up on the following:

    • AUTOLOAD and AutoLoader
    • autouse
    • Class::AutoUse
    • later
    • etc.

    None of those are quite the same as PHP’s approach though.

    However, it really is best practice to list all “normal” dependencies. This makes it easier to build installers / deploy to CPAN etc. There are a bunch of other modules that deal with loading plugins, where you really don’t know what to load until runtime.

    Is there some difficulty with figuring out your dependencies, or do you just want to avoid a bunch of “use” statements at the top of each file?

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Creating a class at runtime is done as follows: klass = Class.new superclass, &block
I'm creating a image editing program in PHP and Javascript but I can't work
Error creating bean with name 'sessionFactory' defined in class path resource [ApplicationContext.xml]: Invocation of
I creating a web application using JSF,Hibernate,Spring. I have added a filter for checking
I'm creating an application that consists of a ListView with 5 rows: - 1st
I am creating an .Net 2.0 SP2 windows Forms Application. The form fonts looks
How would I go about creating a similar kind of animation as the genie
When using wx.grid for creating table with wxpython, how can I automatically extend the
I am using codeigniter's session class to handle my PHP sessions. One of the
I currently creating a project, in which a user can click on thumbnail of

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.