Group
Extension

Matches 2

Type-Tiny ( T/TO/TOBYINK/Type-Tiny-2.008002.tar.gz, TOBYINK, 2025; MetaCPAN )
Type-Tiny/lib/Types/Standard.pm ( view source; MetaCPAN )
y::Package";
   \%h ~~ Tied;                   # true
   \%h ~~ Tied[ $My_Package ];    # true
   \%h ~~ Tied["My::Package"];    # true
   
   tie my $s, "Other::Package";
   \$s ~~ Tied;             
      # true
   $s  ~~ Tied;                   # false !!

If you need to check that something is specifically a reference to
a tied hash, use an intersection:

   use Types::Standard qw( Tied HashRef
hRef);
   
   tie my %h, "My::Package";
   tie my $s, "Other::Package";
   
   \%h ~~ $TiedHash;     # true
   \$s ~~ $TiedHash;     # false

=item *

B<< StrMatch[`a] >>

A string that matches a regu
Type-Tiny ( T/TO/TOBYINK/Type-Tiny-2.008002.tar.gz, TOBYINK, 2025; MetaCPAN )
Type-Tiny/lib/Type/Tiny/Manual/NonOO.pod ( view source; MetaCPAN )
ngWithMoo3>.

=head2 Type::Tiny and Smart Match

Perl 5.10 introduced the smart match operator C<< ~~ >>, which has since
been deprecated because though the general idea is fairly sound, the details
w
qw( Str Int );
  
  given ( $value ) {
    when ( Int ) { ... }
    when ( Str ) { ... }
  }

This will do what you wanted:

  use Types::Standard qw( is_Str is_Int );
  
  given ( $value ) {
    when

Powered by Groonga
Maintained by Kenichi Ishigaki <ishigaki@cpan.org>. If you find anything, submit it on GitHub.