use My::Scalar; tie my $x, 'My:Scalar'; my $tieobj = tied $x;