Group
Extension

Matches 1400

XML-SRS ( M/MU/MUTANT/XML-SRS-0.09.tar.gz, MUTANT, 2011; MetaCPAN )
XML-SRS/lib/XML/SRS/Types.pm ( view source; MetaCPAN )
6_re \z }xms;
	};

our @Boolean = qw(0 1);
subtype "${PKG}::Boolean"
	=> as "Bool"
	=> where {
	$_ ~~ @Boolean;
	};
coerce "${PKG}::Boolean"
	=> from "Bool"
	=> via { $_ ? 1 : 0 };
coerce "${PKG}::Dol
 @AccountingAction = qw(Credit Debit);
subtype "${PKG}::token_OTHERS"
	=> as "Str",
	=> where { $_ ~~ @AccountingAction };

enum "${PKG}::DomainWriteAction" =>
	qw(DomainCreate DomainUpdate);

enum "$
MooseX-Unique ( E/EA/EALLENIII/MooseX-Unique-0.005.tar.gz, EALLENIII, 2011; MetaCPAN )
MooseX-Unique/lib/MooseX/Unique/Meta/Trait/Object.pm ( view source; MetaCPAN )
   if (  $attr->has_value($instance) )  {
                        if ( $attr->get_value($instance) ~~ $params->{$match_attr} )  {
                            $match++;
                        }
      
EntityModel-Storage-PostgreSQL ( T/TE/TEAM/EntityModel-Storage-PostgreSQL-0.003-TRIAL.tar.gz, TEAM, 2011; MetaCPAN )
EntityModel-Storage-PostgreSQL/lib/EntityModel/Storage/PostgreSQL.pm ( view source; MetaCPAN )
tries, so that we can allow self-reference
		foreach my $dep (@deps) {
			unless(grep { $dep->name ~~ $_->name } @pending, @existing, $entity) {
				logError("%s unresolved (pending %s, deps %s for %s
n(',', @deps), $entity->name);
				die "Dependency error";
			}
		}

		my @unsatisfied = grep { $_ ~~ [ map { $_->name } @deps ] } @pendingNames;
		if(@unsatisfied) {
			logInfo("%s has %d unsatisfied
SmartMatch-Sugar ( L/LE/LEONT/SmartMatch-Sugar-0.05.tar.gz, LEONT, 2011; MetaCPAN )
SmartMatch-Sugar/lib/SmartMatch/Sugar.pm ( view source; MetaCPAN )
    => [ qw/match/ ],
	},
};

use 5.010;

{
	package SmartMatch::Sugar::Overloaded;
	use overload '~~' => sub { $_[0]->(@_) };
}

sub match (&) { bless $_[0], "SmartMatch::Sugar::Overloaded" }

use co
ch friendly tests.

=head1 SYNOPSIS

	use SmartMatch::Sugar;

	if ( $data ~~ non_empty_array ) {
		@$data;
	}

	if ( $object ~~ inv_isa("Class") {

	}	

=head1 DESCRIPTION

This module provides simple
d object in a smart match will cause an error
unless C<fallback> is true or the object overloads C<~~>, in which case the
matcher sub will not get a chance to work anyway.

=item stringifies

Returns 
CSS-Prepare ( M/MN/MNF/CSS-Prepare-v0.9.2.4.tar.gz, MNF, 2011; MetaCPAN )
CSS-Prepare/lib/CSS/Prepare.pm ( view source; MetaCPAN )
 my $self = shift;
    my $url  = shift;
    
    my $provider = $self->get_http_provider();
    given ( $provider ) {
        when ( 'lite' ) { return $self->get_url_lite( $url ); }
        when ( 'l
ttp->{'timeout'} = $self->get_http_timeout;
    
    my $code = $http->request( $url );
    
    given ( $code ) {
        when ( 200 ) { return $http->body(); }
        when ( 301 || 302 || 303 || 30
t_http_timeout );
    
    my $resp = $http->get( $url );
    my $code = $resp->code();
    
    given ( $code ) {
        when ( 200 ) { return $resp->decoded_content(); }
        default      { retu
CSS-Prepare ( M/MN/MNF/CSS-Prepare-v0.9.2.4.tar.gz, MNF, 2011; MetaCPAN )
CSS-Prepare/lib/CSS/Prepare/Property/Expansions.pm ( view source; MetaCPAN )
    my $value   = shift;
    
    my @values = split( m{\s+}, $value );
    my %values;
    
    given ( $#values ) {
        when ( 0 ) {
            # top/bottom/left/right shorthand
            for
HTML-TagCloud-Simple ( C/CO/CONOR/HTML-TagCloud-Simple-0.03.tar.gz, CONOR, 2011; MetaCPAN )
HTML-TagCloud-Simple/lib/HTML/TagCloud/Simple.pm ( view source; MetaCPAN )
{$_}{count} > $min_count; } keys %tags;
	foreach (keys %tags) {
		delete $tags{$_} unless @keepers ~~ /$_/;
	}

	my @ordered = sort { $tags{$a}{count} <=> $tags{$b}{count} } keys %tags;
	my $high = $t
Hash-Abbrev ( A/AS/ASG/Hash-Abbrev-0.01.tar.gz, ASG, 2011; MetaCPAN )
Hash-Abbrev/lib/Hash/Abbrev.pm ( view source; MetaCPAN )
ut this way if the C< := > operator meant 'alias
the lhs to the rhs':

    abbrev 'abc', 'xyz'  ~~  $h{abc} = 'abc'
                             $h{ab} := $h{abc}
                             $h{
Perl-Dist-WiX ( C/CS/CSJEWELL/Perl-Dist-WiX-1.500002.tar.gz, CSJEWELL, 2011; MetaCPAN )
Perl-Dist-WiX/lib/Perl/Dist/WiX/Mixin/Support.pm ( view source; MetaCPAN )
ecute_build

	$dist->execute_build('install');

Executes a Module::Build script with the options given (which can be
empty).

=cut 

sub execute_build {
	my $self   = shift;
	my @params = @_;
	$self->
t->execute_make('install');

Executes a ExtUtils::MakeMaker-generated makefile with the options given 
(which can be empty) using the C<dmake> being installed.

=cut 

sub execute_make {
	my $self   =
Perl-Dist-WiX ( C/CS/CSJEWELL/Perl-Dist-WiX-1.500002.tar.gz, CSJEWELL, 2011; MetaCPAN )
Perl-Dist-WiX/lib/Perl/Dist/WiX/Mixin/BuildPerl.pm ( view source; MetaCPAN )
 $self->_delay_upgrade($module) ) {
			unshift @delayed_modules, $module;
			next MODULE;
		}

		given ( $module->cpan_file() ) {

			when (m{/Net-Ping-\d}msx) {

				# Net::Ping seems to require that
$release_testing   = 0;
		my $overwritable      = 0;
		my $force             = $default_force;
		given ($dist) {

			when (/Scalar-List-Util/msx) {

				# Does something weird with tainting
				$force
Tree-Family ( B/BD/BDUGGAN/Tree-Family-0.02.tar.gz, BDUGGAN, 2011; MetaCPAN )
Tree-Family/lib/Tree/Family.pm ( view source; MetaCPAN )
 a decent order, to minimize the
#              distance between elements of the pairs.
#
# e.g. given ( [d,c], [a,b], [b,c] )
# the best ordering would be one of
#            ( [a,b], [b,c], [c,d] )
SADI ( E/EK/EKAWAS/SADI-1.10.tar.gz, EKAWAS, 2011; MetaCPAN )
SADI/lib/SADI/Data/Object.pm ( view source; MetaCPAN )
');
    $self->namespace ('');
    $self->primitive ('no');
}


# return the same value as given (but others may override it - eg,
# Boolean changes here 1 to 'true'

sub _express_value {
  
Perl6-Doc ( H/HI/HINRIK/Perl6-Doc-0.47.tar.gz, HINRIK, 2010; MetaCPAN )
Perl6-Doc/share/Synopsis/S32-setting-library/Containers.pod ( view source; MetaCPAN )
 of C<@array>, in order.

If C<$indextest> is provided, only elements whose indices match
C<$index ~~ $indextest> are iterated.  (To select on values use C<grep>.)

What is returned at each element of
 as C<%hash> doesn't change.

If C<$keytest> is provided, only elements whose keys evaluate
C<$key ~~ $keytest> as true are iterated.

What is returned at each element of the iteration varies with fun
Padre-Plugin-Perl6 ( A/AZ/AZAWAWI/Padre-Plugin-Perl6-0.71.tar.gz, AZAWAWI, 2010; MetaCPAN )
Padre-Plugin-Perl6/lib/Padre/Plugin/Perl6/QuickFix.pm ( view source; MetaCPAN )
 the following:
				# 	$string =~ /abc/;
				# into:
				# 	$string ~~ /abc/;
				push @items, {
					text     => Wx::gettext('Use ~~ for pattern matching'),
					listener => sub {

						#Replace fir
						my $line_text  = $editor->GetTextRange( $line_start, $line_end );
						$line_text =~ s/\=\~/~~/;
						$editor->SetSelection( $line_start, $line_end );
						$editor->ReplaceSelection($line_tex
nto:
				# 	$string !~~ /abc/;
				push @items, {
					text     => Wx::gettext('Use !~~ for negated pattern matching'),
					listener => sub {

						#Replace first '!~' with '!~~' in the current line
Perl6-Doc ( H/HI/HINRIK/Perl6-Doc-0.47.tar.gz, HINRIK, 2010; MetaCPAN )
Perl6-Doc/share/Synopsis/S32-setting-library/Str.pod ( view source; MetaCPAN )
will return 0 and issue
a warning.


=item pack

 our buf8 multi pack( *@items where { all(@items) ~~ Pair } )
 our buf8 multi pack( Str $template, *@items )

C<pack> takes a list of pairs and formats
me,0,1);

Optionally, you can use substr on the left hand side of an assignment
like so:

 $string ~~ /(barney)/;
 substr($string, $0.from, $0.to) = "fred";

If the replacement string is longer or sho
Perl6-Doc ( H/HI/HINRIK/Perl6-Doc-0.47.tar.gz, HINRIK, 2010; MetaCPAN )
Perl6-Doc/share/Exegesis/E05.pod ( view source; MetaCPAN )
as literals

[Update: C<< <> >> is no longer the input operator.  And C<=~> has been
replaced by C<~~>.]

which in Perl 5 we'd have to write as:

        # Perl 5
        my $target = <>;             
     <appendline>+
              { @$appendline =~ s/<in_marker>/</;

[Update: Smartmatch is now C<~~>.]

                @$deleteline =~ s/<out_marker>/>/;
                let $0 := "${to}c${from}\n"
   $str =~ m{ /\* .*? \*/ }xs;

        # Perl 6
        $str =~ m{ /\* .*? \*/ };

[Update: Use C<~~> now.]


=item Remove leading qualifiers from a Perl identifier

        # Perl 5
        $ident =
Perl6-Doc ( H/HI/HINRIK/Perl6-Doc-0.47.tar.gz, HINRIK, 2010; MetaCPAN )
Perl6-Doc/share/Apocalypse/A05.pod ( view source; MetaCPAN )
nite strings in
parallel, though that seems a bit scary.

[Update: The C<=~> operator is renamed C<~~>, and it doesn't automatically
"any-fy" an array anymore, so we could pretty easily make it work o
 backtrack over C<< <cut> >>, the entire match
will fail.)

[Update: Now we can just say C<<@lines ~~ s/^.*? \n**{2...} //>>.]

=head2 RFC 110: counting matches

I think we can avoid using any options
ingly, that can also be written:

    / <( _/\d+/ =~ 1..10 )> /

[Update: That'd be C<< <?{ ~/\d+/ ~~ 1..10 }> >> these days.]

=head2 RFC 198: Boolean Regexes

Again, I'm not much in favor of inventi
OWL2Perl ( E/EK/EKAWAS/OWL2Perl-1.00.tar.gz, EKAWAS, 2011; MetaCPAN )
OWL2Perl/lib/OWL/Data/Object.pm ( view source; MetaCPAN )
');
    $self->namespace ('');
    $self->primitive ('no');
}


# return the same value as given (but others may override it - eg,
# Boolean changes here 1 to 'true'

sub _express_value {
  
Template-JavaScript ( A/AV/AVAR/Template-JavaScript-0.01.tar.gz, AVAR, 2011; MetaCPAN )
Template-JavaScript/lib/Template/JavaScript.pm ( view source; MetaCPAN )
<undef>';
        $@ //= '<unknown error>';
        die "retval:[$retval] \$\@:[$@]";
    }

    given ( ref $self->{output} ) {
        when ( 'SCALAR' ){
            ${ $self->{output} } = $self->{_
Perl6-Bible ( A/AU/AUTRIJUS/Perl6-Bible-0.30.tar.gz, AUTRIJUS, 2006; MetaCPAN )
Perl6-Bible/lib/Perl6/Bible/S05.pod ( view source; MetaCPAN )
r context.  The first match at any position is returned.

     $str = "abracadabra";

     if $str ~~ m:overlap/ a (.*) a / {
         @substrings = $/.matches();    # bracadabr cadabr dabr br
     }
ontext, or a disjunction of matches in a scalar context.

     $str = "abracadabra";

     if $str ~~ m:exhaustive/ a (.*) a / {
         @substrings = $/.matches();    # br brac bracad bracadabr
    
 in a value context (void,
Boolean, string, or numeric), or when it is an explicit argument of
a C<~~>.  Otherwise it's a rule constructor.  So this:

     $var = /pattern/;

no longer does the match 

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