#!/usr/bin/perl -T use strict; use warnings; use App::Options; use App::Trace; use Devel::SimpleTrace; Animal::Hog->sound(); { package Animal::Hog; sub new { &App::sub_entry if ($App::Trace); my ($this, @args) = @_; my $class = ref($this) || $this; my $self = { @args }; bless $self, $class; &App::sub_exit($self) if ($App::Trace); return($self); } sub sound { my $sound1 = 'knor1'; my $sound2 = 'knor2'; &App::sub_entry if ($App::Trace); my $self = shift; &App::sub_exit($_) if ($App::Trace); print $sound1, "\n", $sound2, "\n"; } if ($App::debug && &App::in_debug_scope) { print "Debug output\n"; } }