
package Text::Wigwam::Dtree::Const;

    use strict;
    use warnings;
    our $VERSION = '0.01';

    use Text::Wigwam::Const qw(:all);

    sub new { return bless [], ref($_[0]) || $_[0] }
    sub err { return $_[0]->[0] }

    sub AUTOLOAD {
        my $self = shift;
        return if our $AUTOLOAD =~ /::DESTROY$/;
        my( $meth ) = $AUTOLOAD =~ /.*::(.*)$/;
        my( undef, $file, $line ) = caller();
        $self->[0] = "Prototype attempted to call a non-existent method \"$meth\" in $file, line $line.";
        return ANY; # Attempt a clean exit
    }

1;