package Logic::Var;

use Logic;
# use Logic::Join  - moved down into an eval in a sub!

use strict;

sub new {
	my ($package, $val) = @_;
	return bless \$val, $package;
}

sub illogic {
	return $$_[0];
}

use Carp qw(cluck);

use overload

'""' => sub {
	return ${$_[0]};
},

'.' => sub {
	eval "use Logic::Join";  # seems to be necessary to get Exporter to work
	my $c = Logic::Var->new;
	Logic::Join->new($_[0], $_[1], $c);
	return $c;
},

# TODO: check context

;

1
