mod_perl logo perl icon
previous page: Apache::Debug - Utilities for debugging embedded perl codepage up: mod_perl 1.0 APInext page: Apache::SIG - Override apache signal handlers with Perl's

Apache::Symbol - Things for symbol things






Embedding Perl in HTML with Mason

Embedding Perl in HTML with Mason

By Dave Rolsky, Ken Williams
mod_perl2 User's Guide

mod_perl2 User's Guide

By Stas Bekman, Jim Brandt
Practical mod_perl

Practical mod_perl

By Stas Bekman, Eric Cholet
The mod_perl Developer's Cookbook

The mod_perl Developer's Cookbook

By Geoffrey Young, Paul Lindner, Randy Kobes
mod_perl Pocket Reference

mod_perl Pocket Reference

By Andrew Ford
Writing Apache Modules with Perl and C

Writing Apache Modules with Perl and C

By Lincoln Stein, Doug MacEachern


Table of Contents

Synopsis

  use Apache::Symbol ();
  
  @ISA = qw(Apache::Symbol);


TOP

Description

Apache::Symbol helps mod_perl users avoid Perl warnings related with redefined constant functions.

perlsub/Constant Functions says:

  If you redefine a subroutine which was eligible for inlining you'll
  get a mandatory warning.  (You can use this warning to tell whether
  or not a particular subroutine is considered constant.)  The warning
  is considered severe enough not to be optional because previously
  compiled invocations of the function will still be using the old
  value of the function.

mandatory warning means there is no way to avoid this warning no matter what tricks you pull in Perl. This is bogus for us mod_perl users when restarting the server with PerlFreshRestart on or when Apache::StatINC pulls in a module that has changed on disk.

You can, however, pull some tricks with XS to avoid this warning, Apache::Symbol::undef_functions does just that.



TOP

Arguments

undef_functions takes two arguments: skip and only_undef_exports.

skip is a regular expression indicating the function names to skip.

Use the only_undef_exports flag to undef only those functions which are listed in @EXPORT, @EXPORT_OK, %EXPORT_TAGS, or @EXPORT_EXTRAS. @EXPORT_EXTRAS is not used by the Exporter, it is only exists to communicate with undef_functions.

As a special case, if none of the EXPORT variables are defined ignore only_undef_exports. This takes care of trivial modules that don't use the Exporter.



TOP

Players

This module and the undefining of functions is optional, if you wish to have this functionality enabled, there are one or more switches you need to know about.



TOP

See Also

perlsub, Devel::Symdump



TOP

Maintainers

Maintainer is the person(s) you should contact with updates, corrections and patches.



TOP

Authors

Only the major authors are listed above. For contributors see the Changes file.






TOP
previous page: Apache::Debug - Utilities for debugging embedded perl codepage up: mod_perl 1.0 APInext page: Apache::SIG - Override apache signal handlers with Perl's