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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 24, 20262026-05-24T14:08:35+00:00 2026-05-24T14:08:35+00:00

I thought I remember reading somewhere about where perl can be configured to automatically

  • 0

I thought I remember reading somewhere about where perl can be configured to automatically load a certain .pm file on start up.

I know about PERL5OPT, but to my recollection, this was a specific file that would be loaded if it exists.

Is it a compile option that can be set (i.e. via Configure)?

  • 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-05-24T14:08:37+00:00Added an answer on May 24, 2026 at 2:08 pm

    Reading through perldoc perlrun it looks like you are looking for what is talked about in the -f option:

    -f

    Disable executing $Config{sitelib}/sitecustomize.pl at startup.

    Perl can be built so that it by default will try to execute
    $Config{sitelib}/sitecustomize.pl at startup (in a BEGIN block). This
    is a hook that allows the sysadmin to customize how Perl behaves. It
    can for instance be used to add entries to the @INC array to make Perl
    find modules in non-standard locations.

    Perl actually inserts the following code:

    BEGIN {
    do { local $!; -f "$Config{sitelib}/sitecustomize.pl"; }
    && do "$Config{sitelib}/sitecustomize.pl";
    }
    

    Since it is an actual do (not a require), sitecustomize.pl doesn’t
    need to return a true value. The code is run in package main , in its
    own lexical scope. However, if the script dies, $@ will not be set.

    The value of $Config{sitelib} is also determined in C code and not
    read from Config.pm , which is not loaded.

    The code is executed very early. For example, any changes made to @INC
    will show up in the output of perl -V. Of course, END blocks will be
    likewise executed very late.

    To determine at runtime if this capability has been compiled in your
    perl, you can check the value of $Config{usesitecustomize} .

    I’ve never done this, but it looks like if you put what you want in $Config{sitelib}/sitecustomize.pl you’ll get what you are looking for.

    See:

    • http://perldoc.perl.org/perlrun.html
    • http://www.nntp.perl.org/group/perl.perl5.porters/2007/10/msg129926.html
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I may be way off here, but I thought I remember reading a while
I thought I had seen a bug report about this on the jQuery site,
I have a problem that I thought I knew how I can fix, but
I think I know the answer (I'm S.O.L.), but I thought I'd post the
I've done this before, but can't remember how its done now. Have one json
First of all, I know there are a few other StackOverflow questions about this
I remember seeing a tutorial somewhere that talks of how to style your input
Everyone remembers google browser sync right? I thought it was great. Unfortunately Google decided
I thought .Net code gets compiled into MSIL, so I always wondered how do
I thought jQuery Intellisense was supposed to be improved with SP1. I even downloaded

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.