package main;
use Evo;
use Evo::Util;
use Test::More;
use Test::Fatal;

sub stash { Evo::Util::stash(@_) }

my $obj = {};

is stash($obj), $obj;
is stash($obj, bar => 'BAR'), $obj;
is stash($obj, one => '1', two => '2'), $obj;
is stash($obj, 'bar'), 'BAR';
is stash($obj, 'one'), 1;
is stash($obj, 'two'), 2;


# exception
like exception { stash(undef, one => 1) }, qr/Not a hash reference/;

done_testing;
