09 May 2022 20:00:12 UTC
- Distribution: Module-Refresh
- Module version: 0.18
- Source (raw)
- Browse (raw)
- How to Contribute
- Issues (2)
- Testers (111 / 0 / 0)
- KwaliteeBus factor: 1
- 97.14% Coverage
- License: perl_5
- Perl: v5.8.1
- Activity24 month
- Download (23.41KB)
- MetaCPAN Explorer
- Subscribe to distribution
- This version
- Latest version++ed by:1 non-PAUSE userBPS Best Practical Solutions »|«and 1 contributors
- Jesse Vincent
- SEE ALSO
Module::Refresh - Refresh %INC files when updated on disk
# During each request, call this once to refresh changed modules: Module::Refresh->refresh; # Each night at midnight, you automatically download the latest # Acme::Current from CPAN. Use this snippet to make your running # program pick it up off disk: $refresher->refresh_module('Acme/Current.pm');
This module is a generalization of the functionality provided by Apache::StatINC and Apache::Reload. It's designed to make it easy to do simple iterative development when working in a persistent environment.
It does not require mod_perl.
Initialize the module refresher.
Refresh all modules that have mtimes on disk newer than the newest ones we've got. Calls
newto initialize the cache if it had not yet been called.
Specifically, it will renew any module that was loaded before the previous call to
new) and has changed on disk since then. If a module was both loaded for the first time and changed on disk between the previous call and this one, it will not be reloaded by this call (or any future one); you will need to update the modification time again (by using the Unix
touchcommand or making a change to it) in order for it to be reloaded.
If $module has been modified on disk, refresh it. Otherwise, do nothing
Refresh a module. It doesn't matter if it's already up to date. Just do it.
Note that it only accepts module names like
Remove a module from
%INC, and remove all subroutines defined in it.
Get the last modified time of $file in seconds since the epoch;
Updates the cached "last modified" time for $file.
Wipe out subs defined in $file.
When we walk the symbol table to whack reloaded subroutines, we don't have a good way to invalidate the symbol table properly, so we mess up on things like global variables that were previously set.
Copyright 2004,2011 by Jesse Vincent <firstname.lastname@example.org>, Audrey Tang <email@example.com>
This program is free software; you can redistribute it and/or modify it under the same terms as Perl itself.
Module Install Instructions
To install Module::Refresh, copy and paste the appropriate command in to your terminal.
perl -MCPAN -e shell install Module::Refresh
For more information on module installation, please visit the detailed CPAN module installation guide.