Icon for Dimension.orgIcon for TalentIcon for ToolsIcon for Doorways.org
Icon for ToolsIcon for Perl Tools

MMAgic Demo: MMAgic/Log/Indent.pm Source File

  • Main Page
  • Related Pages
  • Namespaces
  • Classes
  • Files
  • File List
  • File Members

MMAgic/Log/Indent.pm

Go to the documentation of this file.
00001 package MMAgic::Log::Indent;
00002 #
00003 # MMAgic/Log/Indent.pm
00004 #
00005 #   Object indents specified Log when created,
00006 #   then removes indent when it is destroyed.
00007 #   When assigned to a lexical ('my') variable
00008 #   it should be destroyed when the variable
00009 #   goes out of scope.  We hope.
00010 #
00011 
00012 # use   warnings;
00013 
00014 ###########################################################################
00015 ###########################################################################
00016 sub new     # $class, $log [, $incr ]
00017 #
00018     {
00019     my  $self = bless { target => $_[1] }, $_[0];
00020     
00021     $self->{target}->push($_[2]);
00022     $self
00023     }
00024 
00025 ###########################################################################
00026 sub DESTROY # $self
00027 #
00028     {
00029     $_[0]->{target}->pop;
00030     }
00031 
00032 1

Generated on Mon Dec 27 2010 15:15:42 for MMAgic Demo by  doxygen 1.7.1

www.dimension.org logo

(C)opyright 1998 - 2012 Dimension.org

WebMaster