Group
Extension

Matches 1302

Perl-Tidy ( S/SH/SHANCOCK/Perl-Tidy-20240511.tar.gz, SHANCOCK, 2024; MetaCPAN )
Perl-Tidy/lib/Perl/Tidy/VerticalAligner.pm ( view source; MetaCPAN )
]                  ~~ [];
            #  [ ["foo"], ["bar"] ] ~~ [ qr/o/, qr/a/ ];
            #  [ qr/o/, qr/a/ ]     ~~ [ ["foo"], ["bar"] ];
            #  [ "foo", "bar" ]     ~~ [ qr/o/, qr/a/ ];

            #  [ qr/o/, qr/a/ ]     ~~ [ "foo", "bar" ];
            #  $deep1               ~~ $deep1;

            # So we will use two thresholds.
            my $nmin_mono     = $depth + 2;
     
ame left side patterns, so we will align the equals.
        #     my $orig = my $format = "^<<<<< ~~\n";
        #     my $abc  = "abc";
        # But these have a different left pattern so they will
Type-Tiny ( T/TO/TOBYINK/Type-Tiny-2.004000.tar.gz, TOBYINK, 2023; 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
Sim-OPT ( G/GL/GLBRUNE/Sim-OPT-0.729.tar.gz, GLBRUNE, 2024; MetaCPAN )
Sim-OPT/lib/Sim/OPT/Report.pm ( view source; MetaCPAN )
] = $retfile;
                  print RETBLOCK "$retfile\n";

                  if ( not ($retfile ~~ @retcases ) )
                  {
                    push ( @retcases, $retfile );
              
               }  @miditers = Sim::OPT::washn( @miditers );

                  if ( not ( $retfile ~~ @{ $notecases[ $countcase ][ $countblock ][ $counttool ][ $countinstance ] } ) )
                 
es = uniq( @retcases );
                my $retfile = $resfile;
                if ( not ($retfile ~~ @retcases ) )
                {
                  push ( @retcases, $retfile );
                  
match-simple ( T/TO/TOBYINK/match-simple-0.012.tar.gz, TOBYINK, 2023; MetaCPAN )
match-simple/lib/match/smart.pm ( view source; MetaCPAN )
	my @mro = @{ mro::get_linear_isa( ref $obj ) };
	for my $class ( @mro ) {
		my $name = "$class\::(~~";
		my $overload = do {
			no strict 'refs';
			exists( &$name ) ? \&$name : undef;
		};
		return 
  
   if (match($this, $that))
   {
      say "$this matches $that";
   }

=head2 Differences with ~~

There were major changes to smart match between 5.10.0 and 5.10.1. This
module attempts to emulat
smart's operator does not.

   @foo ~~ %bar       # means: \@foo ~~ \%bar
   @foo |M| %bar      # means: scalar(@foo) |M| scalar(%bar)

If you want the C<< \@foo ~~ \%bar >> behaviour, you need to add
AsposeCellsCloud-CellsApi ( A/AS/ASPOSE/AsposeCellsCloud-CellsApi-24.4.tar.gz, ASPOSE, 2024; MetaCPAN )
AsposeCellsCloud-CellsApi/lib/AsposeCellsCloud/Role/AutoDoc.pm ( view source; MetaCPAN )
                               ^<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<< ~~
                                 $role_reqs
.

	format INHERIT_POD =
=head1 NAME

@*
$mycl
<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<< ~~
                                                               $handles
.

	format ATTR_NARROW
        $handles
             ^<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<< ~~
             $handles

.
	format ATTRHEAD_POD =
=head1 ATTRIBUTES

.
	format ATTR_POD =

WebService-Fastly ( F/FA/FASTLY/WebService-Fastly-6.03.tar.gz, FASTLY, 2024; MetaCPAN )
WebService-Fastly/lib/WebService/Fastly/Role/AutoDoc.pm ( view source; MetaCPAN )
                               ^<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<< ~~
                                 $role_reqs
.

    format INHERIT_POD =
=head1 NAME

@*
$myclass

<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<< ~~
                                                               $handles
.

    format ATTR_NARROW 
         $handles
             ^<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<< ~~
             $handles

.
    format ATTRHEAD_POD =
=head1 ATTRIBUTES

.
    format ATTR_POD =

=he
Acme-CPANModules-SmartMatch ( P/PE/PERLANCAR/Acme-CPANModules-SmartMatch-0.003.tar.gz, PERLANCAR, 2024; MetaCPAN )
Acme-CPANModules-SmartMatch/lib/Acme/CPANModules/SmartMatch.pm ( view source; MetaCPAN )
N = '0.003'; # VERSION

my $text = <<'_';
**About smart match**

Smart matching, via the operator `~~`, was introduced in perl 5.10 (released
2007). It's probably inspired by Perl 6 (now called Raku)'
tr ~~ @ary`, probably the most common
use-case for smart matching, can do value-in-array checking, equivalent to `grep
{ $str eq $_ } @ary` but with short-circuiting capability. Then there's `$re ~~
@
ch::smart> (as `|M|` operator or as function `match`) gives you a
similar behaviour to perl's own `~~`.

<pm:match::simple>, also by the author of `match::smart`, offers a simplified
version of smart 
Sim-OPT ( G/GL/GLBRUNE/Sim-OPT-0.729.tar.gz, GLBRUNE, 2024; MetaCPAN )
Sim-OPT/lib/Sim/OPT/Descend.pm ( view source; MetaCPAN )
blockelts_r };
        foreach my $key ( sort ( keys %varns ) )
        {
          if ( not( $key ~~ @blockelts ) )
          {
            $varns{$key} = 1;
          }
        }
        return( %va
  {
          foreach my $key ( sort ( keys( %varnums ) ) )
          {
            if ( not( $key ~~ @blockelts ) )
            {
              $modhs{$key} = $varnums{$key};
              $torecover
 foreach my $instance ( @{ $vehicles{cumulateall} } )
          {
            if ( $instance->{is} ~~ @reds )
            {
              my @instancees;
              push( @instancees, $instance );
Sim-OPT ( G/GL/GLBRUNE/Sim-OPT-0.729.tar.gz, GLBRUNE, 2024; MetaCPAN )
Sim-OPT/lib/Sim/OPT/Sim.pm ( view source; MetaCPAN )
esfile, $shortflfile );

    #if ( ( $dowhat{simulate} eq "y")
    #  and ( ( ( not ( $to{cleanto} ~~ ( @trieds ) ) ) or ( not ( $precious eq "" ) ) )
    #    or ( ( $gaproc eq "yes" ) and ( $fire eq
";

              if ( ( not ( $resfile ~~ @simcases ) ) and ( not ( -e $resfile ) ) and ( $dowhat{simulate} eq "y")
                and ( not ( $to{cleanto} ~~ ( @trieds ) ) ) )
              {
     

                print SIMBLOCK "$resfile\n";
              }

              if ( ( not ( $resfile ~~ @retcases ) ) and ( not ( -e $resfile ) ) )
              {
                push ( @simcases, $res
Text-CSV ( I/IS/ISHIGAKI/Text-CSV-2.04.tar.gz, HMBRAND, 2023; MetaCPAN )
Text-CSV/Text-CSV-0.007/t/90_csv.t ( view source; MetaCPAN )
 if ($in ~~ Array && $in.elems > 0) {
        $type ~= $in.list[0].WHAT.gist;
        $type ~~ s{")("} = " of ";
        }
    my Str $s-in = sprintf "%-16s %s", $type, $in.gist;
    $s-in ~~ s:g{\n} 
> $csv),  "Sub/Obj { s-in ($in) }");
    }

# Test supported "out" formats
my $datn = $data; $datn ~~ s:g{ "\r\n" } = "\n";
for in () -> $in {
    is (csv (in => $in, out => Str, :!quote-space), $data
ODF-lpOD ( A/AB/ABEVERLEY/ODF-lpOD-1.200.tar.gz, ABEVERLEY, 2024; MetaCPAN )
ODF-lpOD/lpOD/TextElement.pm ( view source; MetaCPAN )
         return wantarray ? $start : ($start, $end);
                }

        my $tag;
        given ($opt{role})
                {
                when (undef)
                        {
           
defined $t;
                    }
                else
                    {
                    given ($node->get_tag)
                        {
                        when ('text:tab')
            
      }
        my $tag;
        my %attr = $opt{attributes} ? %{$opt{attributes}} : ();
        given ($opt{type})
                {
                when (["lexical", "alphabetical"])
               
Type-Tiny ( T/TO/TOBYINK/Type-Tiny-2.004000.tar.gz, TOBYINK, 2023; 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
rd 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 (\&i
Perinci-Sub-Gen-AccessTable ( P/PE/PERLANCAR/Perinci-Sub-Gen-AccessTable-0.593.tar.gz, PERLANCAR, 2023; MetaCPAN )
Perinci-Sub-Gen-AccessTable/lib/Perinci/Sub/Gen/AccessTable.pm ( view source; MetaCPAN )
lters, [$f, $ftype, "~~", $args->{"$f.has"}, $ftype, $cic];
        }
        if (defined $args->{"$f.lacks"}) {
            $exists++;
            push @filters, [$f, $ftype, "!~~", $args->{"$f.lacks
q 'truth') {
                    next REC if $r_h->{$f} xor $opn;
                } elsif ($op eq '~~') {
                    if ($stringy) {
                        if ($cic) {
                      
} @{$r_h->{$f}};
                        }
                    }
                } elsif ($op eq '!~~') {
                    if ($stringy) {
                        if ($cic) {
                      
Locale-CLDR ( J/JG/JGNI/Locale-CLDR-v0.44.1.tar.gz, JGNI, 2024; MetaCPAN )
Locale-CLDR/lib/Locale/CLDR.pm ( view source; MetaCPAN )
 /^ ( (?: (?: ~~ )*+ ~ \[ | [^\[] )++ ) /x;
        $raw //= '';
		if (length $raw) {
			$text =~ s/^ ( (?: (?: ~~ )*+ ~ \[ | [^\[] )++ ) //gx;
			# Fix up escapes
			$raw =~ s/(?:~~)*+\K~\[/[/g;

			$raw =~ s/(?:~~)*+\K~,/,/g;
			$raw =~ s/~~/~/g;
			
			# Escape stuff for perl
			$raw =~ s/\\/\\\\/g;
			$raw =~ s/'/\\'/g;
			
			$sub .= ", '$raw'";
		}
		
		last unless length $tex

		$method =~ s/ \[ \s* (.*?) \s* \] /$1/x;
		
		# sort out ~, and ~~
		$method =~ s/(?:~~)*+\K~,/\x{00}/g;
		$method =~ s/~~/~/g;
		($method, my @params) = split /,/, $method;
		
		# if $is_p
Rinci ( P/PE/PERLANCAR/Rinci-1.1.104.tar.gz, PERLANCAR, 2024; MetaCPAN )
Rinci/lib/Rinci/function.pod ( view source; MetaCPAN )
eginning with $word
                 local $CWD = "/home";
                 return [grep {-d && $_ ~~ /^\Q$word/} <*>];
             },
         },
         force => {schema=>[bool => {default=>0}]},
grep {-d && $_ ~~ /^\Q$word/} <*>];

                 # exclude users already mentioned by user
                 my $ary = $args{args}{usernames};
                 $res = [grep {!($_ ~~ @$ary)}] @$res
Syntax-Infix-Smartmatch ( L/LE/LEONT/Syntax-Infix-Smartmatch-0.005.tar.gz, LEONT, 2023; MetaCPAN )
Syntax-Infix-Smartmatch/lib/Syntax/Infix/Smartmatch.xs ( view source; MetaCPAN )
opy(d);
	}
	else
		d = &PL_sv_undef;

	assert(e);
	if (SvGMAGICAL(e))
		e = sv_mortalcopy(e);

	/* ~~ undef */
	if (!SvOK(e)) {
		return !SvOK(d);
	}
	else if (SvROK(e)) {
		/* First of all, handle ov
		SV* sv = amagic_call(d, e, smart_amg, AMGf_noleft);
			if (sv)
				return SvTRUEx(sv);
		}

		/* ~~ qr// */
		if (SvTYPE(SvRV(e)) == SVt_REGEXP) {
			dSP;
			REGEXP* re = (REGEXP*)SvRV(e);
			PMOP* 
urn result;
		}
		/* Non-overloaded object */
		else if (SvOBJECT(SvRV(e)))
			return d == e;
		/* ~~ sub */
		else if (SvTYPE(SvRV(e)) == SVt_PVCV) {
			dSP;
			ENTER_with_name("smartmatch_array_elem
Padre ( S/SZ/SZABGAB/Padre-1.02.tar.gz, SZABGAB, 2023; MetaCPAN )
Padre/share/doc/perlopquick/perlopquick.pod ( view source; MetaCPAN )
st operators
    nonassoc          < > <= >= lt gt le ge
    nonassoc          == != <=> eq ne cmp ~~
    left              &
    left              | ^
    left              &&
    left              |
now 0
    my $z = "c" cmp "b"; #$x is now positive

=head3 See also

L</X E<lt>=E<gt> Y>

=head2 X ~~ Y

=head3 Class

This belongs to L<perlop/Equality Operators>.

=head3 Description

This is the sm
ead.

=head3 Example

See L<perlsyn/"Smart matching in detail"> for examples.

=head3 See also

L</~~X>, L<perlsyn/"Smart matching in detail">, and L<perlfunc/scalar>

=head2 X & Y

=head3 Class

This
Text-CSV ( I/IS/ISHIGAKI/Text-CSV-2.04.tar.gz, HMBRAND, 2023; MetaCPAN )
Text-CSV/Text-CSV-0.007/t/85_util.t ( view source; MetaCPAN )
sep, ",", "Sep = ,");

for < , ; > -> $sep {
    my Str $data = "bAr,foo\n1,2\n3,4,5\n";
    $data ~~ s:g{ "," } = $sep;

    $csv.column-names (False);
    {   my $fh = IO::String.new: $data;
	ok (my
,", ";" ];
for ",", ";", "|", "\t" -> $sep {
    my Str $data = "bAr,foo\n1,2\n3,4,5\n";
    $data ~~ s:g{ "," } = $sep;

    $csv.column-names (False);
    {   my $fh = IO::String.new: $data;
	ok (my
>], "Headers");
    }

for < , ; > -> $sep {
    my Str $data = "bAr,foo\n1,2\n3,4,5\n";
    $data ~~ s:g{ "," } = $sep;

    $csv.column-names (False);
    {   my $fh = IO::String.new: $data;
	ok (my
Text-CSV ( I/IS/ISHIGAKI/Text-CSV-2.04.tar.gz, HMBRAND, 2023; MetaCPAN )
Text-CSV/Text-CSV-0.007/lib/Text/CSV.pod6 ( view source; MetaCPAN )
my $fh  = open "test.csv", :r, chomp => False;
 while (my @row = $csv.getline($fh)) {
     @row[2] ~~ m/pattern/ or next; # 3rd field should match
     @rows.push: @row;
     }
 $fh.close;

 # and wri
cept and C<False>
for records to reject.

 csv (in => "file.csv", filter => {
            $^row[2] ~~ /a/ &&  # third field should contain an "a"
            $^row[4].chars > 4  # length of the 5th fi
at have no visible data

This filter is a shortcut for

 filter => { $^row.first: { .defined && $_ ~~ /\S/ }}

This filter rejects all lines that I<not> have at least one field that does
not evaluate 
ODF-lpOD ( A/AB/ABEVERLEY/ODF-lpOD-1.200.tar.gz, ABEVERLEY, 2024; MetaCPAN )
ODF-lpOD/lpOD/Table.pm ( view source; MetaCPAN )
            alert "Grouping not allowed"; return FALSE;
                }
        my $tag = ($type ~~ ['column', 'row']) ?
                        'table:table-' . $type . '-group'       :
           
                     {
                        $min //= $v; $max //= $v;
                        given ($type)
                                {
                                when (['string', 'all']

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