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

  • Home
  • SEARCH
  • 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 7308455
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 28, 20262026-05-28T23:33:34+00:00 2026-05-28T23:33:34+00:00

I have a mod_perl-enable Apache running native (handlers, not Apache::Registry or similar) mod_perl code.

  • 0

I have a mod_perl-enable Apache running native (handlers, not Apache::Registry or similar) mod_perl code. As it is known, modules could be compiled and loaded at run-time. For testing purposes, I have a dummy module:

package MyPackage;
our $data = '0123456789' x 1000000; # 10 millions characters
1;

At run-time I load it and my httpd child processes add up 10 megabytes, one by one, after multiple requests. This is fine. This way I can use use ocasionally some memory consuming code, but while it happens rarely, I would like to be able to unload the used module after it has done its work.

If you would mention to use the lexical my variables, I know that thay are destroyed when the scope is over. So, our or package variables are an important factor in this case.

Is it possible to get this at run-time? if yes, how it could pe done?

  • 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-28T23:33:35+00:00Added an answer on May 28, 2026 at 11:33 pm

    The core Symbol module contains a function delete_package which takes a package name and deletes all of the variables within it.

    So in your case:

    use Symbol 'delete_package';
    
    delete_package 'MyPackage';
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

My company develop web apps using combination of mod_perl, axkit and apache. We have
Say I don't have mod_deflate compiled into apache, and I don't feel like recompiling
Environment: Apache/2.2.11 (Win32) mod_apreq2-20051231/2.6.2-dev mod_perl/2.0.4-dev Perl/v5.10.0 Situation very similar to what's described in this
At work we have several Solaris servers. Each server runs apache which we compiled
I have a Mason template running under mod_perl, which is using Log::Log4perl. I want
Is it possible to have an apache mod_perl handler, which receives all incoming requests
mod_perl/apache doesn't seem able to follow symlinks. In httpd.conf I have: Options FollowSymLinks <VirtualHost
I have a mod_perl script: use strict; use warnings FATAL => 'all'; use 5.010001;
My attempts to install modperl under the default vanilla Leopard Apache 2 have failed
I have Apache with mod_rewrite, and whenever I enter a URI with an accented

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.