package Search::Tools::Object;
use Moo;
use namespace::autoclean;

has 'debug' => (
    is      => 'rw',
    default => sub { $ENV{PERL_DEBUG} || 0 },
    coerce  => sub {
        return 0 if !$_[0];    # allow for undef or zero
        return $_[0];

our $VERSION = '1.007';



=head1 NAME

Search::Tools::Object - base class for Search::Tools objects


 package MyClass;
 use Moo;
 extends 'Search::Tools::Object';
 has 'foo' => ( is => 'rw' );
 has 'bar' => ( is => 'rw' );
 # elsewhere
 use MyClass;
 my $object = MyClass->new;
 print $object->bar . "\n";


Search::Tools::Object is a simple Moo subclass. 

Prior to version 1.00 STO was a subclass of Rose::ObjectX::CAF.

Prior to version 0.24 STO was a subclass of Class::Accessor::Fast. 

=head1 METHODS

=head2 debug( I<n> )

Get/set the debug value for the object. All objects inherit this attribute.
You can use the C<PERL_DEBUG> env var to set this value as well.

=head1 AUTHOR

Peter Karman C<< <> >>

=head1 BUGS

Please report any bugs or feature requests to C<bug-search-tools at>, or through
the web interface at L<>.  
I will be notified, and then you'll
automatically be notified of progress on your bug as I make changes.

=head1 SUPPORT

You can find documentation for this module with the perldoc command.

    perldoc Search::Tools

You can also look for information at:

=over 4

=item * RT: CPAN's request tracker


=item * AnnoCPAN: Annotated CPAN documentation


=item * CPAN Ratings


=item * Search CPAN




Copyright 2009 by Peter Karman.

This package is free software; you can redistribute it and/or modify it under the 
same terms as Perl itself.

=head1 SEE ALSO