package OBB ; use strict ; use warnings ; use Carp ; use Exporter ; use OBB::Base ; use OBB::Levels ; use OBB::Dumper ; use OBB::JSON ; use OBB::Dbs ; our @ISA = qw(Exporter) ; our @EXPORT = qw(Inline Pretty) ; sub Dump { my $self = shift ; my %opts = ( ( @_ == 1 ) ? ( tag => shift ) : @_ ) ; $self -> DUMPER -> Text ( $self, %opts ) ; } sub Pretty { _args_odd ( scalar @_ ) ; my $obj = shift ; OBB -> DUMPER -> Text ( $obj, prints => 1, pretty => 1, @_ ) ; } sub Inline { _args_odd ( scalar @_ ) ; my $obj = shift ; OBB -> DUMPER -> Text ( $obj, prints => 0, pretty => 0, tag => '', @_ ) ; } # BEGIN { __PACKAGE__ -> Mk_class_methods ( DUMPER => OBB::Dumper -> Make () ) ; } DESTROY { my $self = shift ; return unless defined $self ; _destroy ( __PACKAGE__, $self ) ; # we may not have a store during global destruction if ( defined $self -> OBB_LEVELS and defined $self -> OBB_LEVELS -> store ) { $self -> My_verbosity ( undef ) ; } elsif ( OBB::Base -> _bugs1 ) { printf "No store for $self\n" ; } } 1 ;