|
| |||||||||||||||||||||||
MMAgic::Trace Class ReferenceMMAgic::Trace - Perl filter used to (de)activate trace statements. More...
Detailed DescriptionMMAgic::Trace - Perl filter used to (de)activate trace statements. SYNOPSISuse MMAgic::Trace; # ...or... use MMAgic::Trace qw(XXX); # set XXX tag #!# this line is a trace statement #*# include this trace statement (easy one-line include) #$# include trace statements to end of subroutine #!# include this if use Trace qw(XXX); #[XXX] #!# include this if one of tags set #[XXX YYY] DESCRIPTIONThe Unlike many trace mechanisms, the trace statements that are not activated are never executing at run-time. There is a minor compile-time penalty for using the source filter but once the program is running the un-activated statements are just comments and take up no CPU cycles whatsoever. It is possible to use this filter for anything, not (just) trace statements. For other uses it may be necessary to write a more specific filter. Special CommentsSpecial comment sequences are used to mark lines that will potentially be activated by the filter. The first three characters of the line are Statements can be activated by changing them slightly, replacing There is no way to activate lines at this level of granularity without editing the source file to change the comment sequences. It is possible, of course, to activate lines that have additional control behavior that will be executed at run-time, gaining the best of both worlds. Tag GroupsIt is also possible to mark one or more lines with tags, grouping lines together so that they can be (de)activated at one time. These tags only apply to lines that begin with a comment sequence such as There are two means of activating lines by tag. The first is to add the desired tags onto the The second method is to use one or more command-line parameters of the form COPYRIGHT AND LICENSECopyright 2001-2008 by Marc M. Adkins Definition at line 95 of file Trace.pm. Member Function Documentation
Filter source to activate trace statements. This is the basic mechanism used by Some might prefer
Activate and configure trace filter. Using the package activates the source filter. Special comment sequences are recognized and converted to normal code lines based on the comment sequence and/or tags specified therein. The
The documentation for this class was generated from the following file:
Generated on Mon Dec 27 2010 15:15:42 for MMAgic Demo by 1.7.1 | ||||||||||||||||||||||||