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

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

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

MMAgic/Log/Value.pm

Go to the documentation of this file.
00001 package MMAgic::Log::Value;
00002 #
00003 # /MMAgic/Log/Value.pm
00004 #
00005 #   NOT a sub-class of MMAgic::Log.
00006 #   This is a simple table from the B::Value
00007 #   functions visitTypes and walkTypes.
00008 #
00009 #   (C)opyright 2000 Marc M. Adkins
00010 #
00011 
00012 # use   warnings;
00013 
00014 use     MMAgic::Log;
00015 use     MMAgic::Trace;
00016 
00017 eval
00018     {
00019     require MMAgic::B::Value;
00020     $loaded = 1;
00021     };
00022 
00023 unless ($loaded && ! $@)
00024     {
00025 #!# Log->warning(__PACKAGE__, ' functionality unavailable without B::Value');
00026     Log->warning('  ', $@) if $@;
00027     }
00028 
00029 ###########################################################################
00030 ###########################################################################
00031 sub Table   # $flag
00032 #
00033     {
00034 #!# my  $auto  = Log->method(@_)->block;
00035     
00036     return unless $loaded;
00037     
00038     my  $flag  = shift || 'T';
00039     my  $visit = MMAgic::B::Value::visitTypes();
00040     my  $walk  = MMAgic::B::Value::walkTypes();
00041     
00042 #!# Log->trace('Visit:  ', $visit);
00043 #!#  Log->trace('Walk:   ', $walk);
00044     
00045     Log->message
00046         ($flag,
00047          "Type", ' ' x 22, "visited |  walked |    lost\n",
00048          '-' x (26 + 3 * 7 + 2 * 3));
00049     
00050     for my $type (sort keys %$visit)
00051         {
00052         Log->message
00053             ($flag,
00054              sprintf
00055                 ("%-25s %7d | %7d | %7d",
00056                  length($type) > 25 ? substr($type, 0, 25) : $type,
00057                  $visit->{$type},  $walk->{$type},
00058                  $visit->{$type} - $walk->{$type}));
00059         }
00060     
00061     for my $type (sort keys %$walk)
00062         {
00063         $visit->{$type} or
00064         Log->message
00065             ($flag,
00066              sprintf
00067                 ('%-25s <<< walked but not visited >>>',
00068                  length($type) > 25 ? substr($type, 0, 25) : $type));
00069         }
00070 
00071     Log->message($flag, '-' x (26 + 3 * 7 + 2 * 3));
00072     }
00073 
00074 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