+use blib;
+
+{ package Str; }
+
+{
+ package My::Types::Str;
+
+ sub new { bless { }, shift }
+}
+
+use Lexical::Types as => sub { 'My::Types::' . $_[0] => 'new' };
+
+my Str $x; # $x is now a My::Types::Str object
+print ref($x), "\n"; # My::Types::Str;
+