Module::Refresh

Module::Refresh is a Perl module that will refresh %INC files when updated on disk.
Download

Module::Refresh Ranking & Summary

Advertisement

  • Rating:
  • License:
  • Perl Artistic License
  • Price:
  • FREE
  • Publisher Name:
  • Jesse Vincent and Autrijus Tang
  • Publisher web site:
  • http://search.cpan.org/~jesse/

Module::Refresh Tags


Module::Refresh Description

Module::Refresh is a Perl module that will refresh %INC files when updated on disk. Module::Refresh is a Perl module that will refresh %INC files when updated on disk.SYNOPSIS # 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.newInitialize the module refresher.refreshRefresh all modules that have mtimes on disk newer than the newest ones we've got. Calls new to initialize the cache if it had not yet been called.Specifically, it will renew any module that was loaded before the previous call to refresh (or 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 touch command or making a change to it) in order for it to be reloaded.refresh_module_if_modified $moduleIf $module has been modified on disk, refresh it. Otherwise, do nothingrefresh_module $moduleRefresh a module. It doesn't matter if it's already up to date. Just do it.Note that it only accepts module names like Foo/Bar.pm, not Foo::Bar.unload_module $moduleRemove a module from %INC, and remove all subroutines defined in it.mtime $fileGet the last modified time of $file in seconds since the epoch;update_cache $fileUpdates the cached "last modified" time for $file.unload_subs $fileWipe out subs defined in $file. Requirements: · Perl


Module::Refresh Related Software