Group
Extension

Matches 1364

Perl6-Bible ( A/AU/AUTRIJUS/Perl6-Bible-0.30.tar.gz, AUTRIJUS, 2006; MetaCPAN )
Perl6-Bible/lib/Perl6/Bible/S12.pod ( view source; MetaCPAN )
ector on
the right.  Our example is roughly equivalent to this closure:

    { $_.does(Str) and $_ ~~ /^[isnt|arent|amnot|aint]$/; }

except that a subtype knows when to call itself.

A subtype is not
um where { $^n % 2 == 0 }

    my Str_not2b $hamlet;
    $hamlet = 'isnt';   # Okay because 'isnt' ~~ /^[isnt|arent|amnot|aint]$/
    $hamlet = 'amnt';   # Bzzzzzzzt!   'amnt' !~ /^[isnt|arent|amnot|a
 Rules::Common :profanity;

    multi sub mesg ($mesg of Str where /<profanity>/ is copy) {
	$mesg ~~ s:g/<profanity>/[expletive deleted]/;
	print $MESG_LOG: $mesg;
    }

    multi sub mesg ($mesg of
DashProfiler ( T/TI/TIMB/DashProfiler-1.13.tar.gz, TIMB, 2008; MetaCPAN )
DashProfiler/lib/DashProfiler/Sample.pm ( view source; MetaCPAN )
r
refered to by the 'C<_dash_profile>' element of %$meta is marked as 'in use'
then a warning is given (just once) and C<new> returns undef, so no sample is
taken.

If $allow_overlap is true, then ove
Perl6-Pugs ( A/AU/AUDREYT/Perl6-Pugs-6.2.13.tar.gz, AUDREYT, 2006; MetaCPAN )
Perl6-Pugs/misc/Parser-Mini/pil1_json_emit_io.pl ( view source; MetaCPAN )
      if @params[$i+1] ~~ m:perl5 {:$} {
                @params[$i] ~~ s:perl5 {:$}{,};
            }
        }
    }
    my $param_list = @params.join(" ");
    $param_list ~~ s:perl5 {,$}{};  # rem
    "$statements\n" ~ 
    "    # TODO - _end_pad\n";
}
sub emit_Variable ( $s is copy ) { 
    $s ~~ s:perl5/^"(.*)"$/$0/;
    $s 
}
sub emit_Int ( $s ) { $s }
sub emit_Str ( $s ) { $s }
sub emit_Rat
f $default eq '';
    # rewrite '$name,' to '$name = default,'
    my ($name, $separator) = $param ~~ m:perl5 {(.*)(.)};
    
    $default ~ 
    $name ~ 
    ' = ' ~ 
    $separator
}

# -- Main prog
Perl6-Pugs ( A/AU/AUDREYT/Perl6-Pugs-6.2.13.tar.gz, AUDREYT, 2006; MetaCPAN )
Perl6-Pugs/ext/CGI/lib/CGI/Util.pm ( view source; MetaCPAN )
     for %attrs.keys.sort -> $key {
            my $copy = lc $key;
            
            $copy ~~ s:P5:g/_/-/;
            
            my $value = ($escape) ?? simple_escape(%attrs{$key}) !! %att
scape (Str $string is copy) returns Str {
    $string ~~ s:P5:g/&/&amp;/;
    $string ~~ s:P5:g/</&lt;/;
    $string ~~ s:P5:g/>/&gt;/;
    $string ~~ s:P5:g/"/&quot;/;
    
    return $string;
}

1;
Perl6-Pugs ( A/AU/AUDREYT/Perl6-Pugs-6.2.13.tar.gz, AUDREYT, 2006; MetaCPAN )
Perl6-Pugs/ext/Test/lib/Test.pm ( view source; MetaCPAN )
$got, Rule $expected, Str $desc?, :$todo, :$depends) returns Bool is export {
    my $test := $got ~~ $expected;
    Test::proclaim($test, $desc, $todo, $got, $expected, $depends);
}

## unlike

sub u
, Rule $expected, Str $desc?, :$todo, :$depends) returns Bool is export {
    my $test := not($got ~~ $expected);
    Test::proclaim($test, $desc, $todo, $got, $expected, $depends, :negate);
}

# eval
o, :$depends) returns Bool is export {
    try { code() };
    if ($!) {
        &Test::ok.goto($! ~~ $match, $desc, :$todo, :$depends);
    }
    else {
        Test::proclaim(undef, $desc, $todo, "N
Perl6-Pugs ( A/AU/AUDREYT/Perl6-Pugs-6.2.13.tar.gz, AUDREYT, 2006; MetaCPAN )
Perl6-Pugs/ext/HTML-Entities/lib/HTML/Entities.pm ( view source; MetaCPAN )
$string;
    
    $result ~~ s:Perl5:g/&\#(\d+);?/{chr($0)}/;
    $result ~~ s:Perl5:g/(&\#[xX]([0-9a-fA-F]+);?)/{my $c = :16($1); $c < 256 ?? chr($c) !! $0}/;
    $result ~~ s:Perl5:g/(&(\w+);?)/{%en
code\n "
        #    ) if $!;
        #}
        #%subst{$unsafe_chars}($string);
        $result ~~ s:Perl5:g/([$unsafe_chars])/{
            %char_to_entity.exists($0)
                ?? %char_to_e
}
    else {
        # Encode control chars, high bit chars and '<', '&', '>', '"'
        $result ~~ s:perl5:g/([^\n\r\t !\#\$%\'-;=?-~])/{
            %char_to_entity.exists($0)
                ?? %
Perl6-Pugs ( A/AU/AUDREYT/Perl6-Pugs-6.2.13.tar.gz, AUDREYT, 2006; MetaCPAN )
Perl6-Pugs/docs/articles/tpr.pod ( view source; MetaCPAN )
bin/jerkme.rss HTTP/1.0\n",
      "Host: www.phreeow.net\n"
  );
  $hdl.flush;
  
  if ($hdl.slurp ~~ rx:perl5{<description>(.+)</description>\s*</item>}) {
      say $0;
  }
  else {
      say "*** O
sent over the wire, and analyzes the response. This line is worth
breaking down:

  if ($hdl.slurp ~~ rx:perl5{<description>(.+)</description>\s*</item>}) { ... }

  # Perl 5 equivalent

  sub slurp {
l 5. The other difference
is that instead of using C<=~>, we now use C<~~> to match. The change
is not just one of spelling: C<~~> is the shiny new I<smart match>
operator, which has very well-defined
Perl6-Pugs ( A/AU/AUDREYT/Perl6-Pugs-6.2.13.tar.gz, AUDREYT, 2006; MetaCPAN )
Perl6-Pugs/docs/Perl6/Spec/Functions.pod ( view source; MetaCPAN )
tem Matcher

 subset Matcher of Item | Junction;

Used to supply a test to match against. Assume C<~~> will be used against it.

=item Ordering

 subset KeyExtractor of Code where { .sig === :(Any -->
e where { .sig === :(Any, Any --> Int ) };
 subset OrderingPair of Pair where { .left ~~ KeyExtractor && .right ~~ Comparator };

 subset Ordering where Signature | KeyExtractor | Comparator | Orderin
f C<@array>, in order.

If C<@indextests> are provided, only elements whose indices match
C<$index ~~ any(@indextests)> are iterated.

What is returned at each element of the iteration varies with fun
Perl6-Pugs ( A/AU/AUDREYT/Perl6-Pugs-6.2.13.tar.gz, AUDREYT, 2006; MetaCPAN )
Perl6-Pugs/perl5/PIL2JS/lib6/Prelude/JS/Rules.pm ( view source; MetaCPAN )
elsif (($k.chars > 1) && (substr($k,-1,1) eq "x") # XXX - excess parens required
           && ($k ~~ %rx_helper_cache{'re_x'})) {
      my $n = 0+ ~$0; # +$0 XXX
      %mods.delete($k);
      %mods{'
n;
    }
    elsif (($k.chars > 2) && (substr($k,-2,2) eq ("th"|"st"|"nd"|"rd"))
           && ($k ~~ %rx_helper_cache{'re_nth'})) {
      my $n = 0+ ~$0; # +$0 XXX
      %mods.delete($k);
      %mods
g) {
      my $s = ~$string;
      my $offset = 0;
      my @a;
      while 1 {
        my $m = $s ~~ $rx;
        last if !$m;
        push(@a,$m);

        my $off = $m.to +1;
#        $m.from += $o
libwin32 ( J/JD/JDB/libwin32-0.29.tar.gz, GSAR, 2008; MetaCPAN )
libwin32/Sound/Sound.pm ( view source; MetaCPAN )
ctly C<Play()> it.

The second (and third) form opens the
wave output device with the format given
(or if none given, defaults to 44.1kHz,
16 bits, stereo); to produce something
audible you can 
App-TemplateServer ( J/JR/JROCKWAY/App-TemplateServer-0.04.tar.gz, JROCKWAY, 2008; MetaCPAN )
App-TemplateServer/lib/App/TemplateServer.pm ( view source; MetaCPAN )
$var (keys %{$to_instantiate||{}}){
            my $class = $to_instantiate->{$var};
            given(ref $class){
                when('HASH'){
                    my ($package, $method) = %$class;
 exit; # exit child
        }
    }
};

method _req_handler($req) {
    my $res = eval {
        given($req->uri){
            when(m{^/(?:index(?:[.]html?)?)?$}){
                return $self->_rende
Text-GooglewikiFormat ( F/FA/FAYLAND/Text-GooglewikiFormat-0.05.tar.gz, FAYLAND, 2007; MetaCPAN )
Text-GooglewikiFormat/lib/Text/GooglewikiFormat.pm ( view source; MetaCPAN )
to HTML

=head1 SYNOPSIS

    use Text::GooglewikiFormat;
    my $raw  = '*bold* _italic_ ~~strike~~';
    my $html = Text::GooglewikiFormat::format($raw);
    # $html is qq~<p><strong>bold</st
Package-FromData ( J/JR/JROCKWAY/Package-FromData-0.01.tar.gz, JROCKWAY, 2008; MetaCPAN )
Package-FromData/lib/Package/FromData.pm ( view source; MetaCPAN )
_function_from_definition {
    my ($package, $function, $fdef, $shift, $precondition) = @_;
    given(ref $fdef){
        when('ARRAY'){
            my @fdef = @$fdef;
            my $func;
         
Audio-LADSPA ( J/JD/JDIEPEN/Audio-LADSPA-0.021.tar.gz, JDIEPEN, 2007; MetaCPAN )
Audio-LADSPA/Plugin/Plugin.pod ( view source; MetaCPAN )
 = $plugin->upper_bound($port);

Returns the maximum value for the $port, or C<undef> if none is given (assume 1).

Also L</is_sample_rate|see is_sample_rate>.

=head2 is_sample_rate

 my $max = $plug
Perl6-Pugs ( A/AU/AUDREYT/Perl6-Pugs-6.2.13.tar.gz, AUDREYT, 2006; MetaCPAN )
Perl6-Pugs/ext/Pod-Event-Parser/lib/Pod/Event/Parser.pm ( view source; MetaCPAN )
ne = $fh.readline;
        last unless $line.defined; # exit as soon as possible
        if ($line ~~ rx:P5/^=pod/) {
            $is_parsing = 1;
            %events<start_document>();
        }
    
efined($_line)             && 
                              !($_line ~~ rx:P5/^$/)  && 
                                $_line ~~ rx:P5/^\s(.*?)$/ ) {                                
                
                while (defined($_line)             && 
                                   !($_line ~~ rx:P5/^$/) ) {
                                interpolate($_line, %events);
                     
Perl6-Pugs ( A/AU/AUDREYT/Perl6-Pugs-6.2.13.tar.gz, AUDREYT, 2006; MetaCPAN )
Perl6-Pugs/misc/pX/fglock/Rule.pl ( view source; MetaCPAN )
 ~~ m/^(\Q$const\E)(.*)/s;
        # return unless @_[0] ~~ perl5:m:s:/^(\Q$const\E)(.*)/;
        # return unless @_[0] ~~  /^ ( $const )(.*)/;  # (putter on #perl6)
        # return unless @_[0] ~~ 
Perl6-Pugs ( A/AU/AUDREYT/Perl6-Pugs-6.2.13.tar.gz, AUDREYT, 2006; MetaCPAN )
Perl6-Pugs/misc/old_pugs_perl5_backend/Perl6-MetaModel/t/08_multi_methods.t ( view source; MetaCPAN )
     "~~" . $::CLASS->name . "~~";
            }                
        }
    };

    my $pp = $PrettyPrinter->new();
    isa_ok($pp, 'PrettyPrinter');


    is($pp->pretty(), '~~PrettyPrinter~~', '.
  is(
        $pp->pretty({ array => [ \1, \'two', $pp ] }), 
        '{ array => [ 1, two, ~~PrettyPrinter~~ ] }', 
        '... recursive multi-methods');     

}

{
    my $PrettyPrinter2 = class '
ty = ::multi_sub 'PrettyPrinter2::pretty' => ('PrettyPrinter2') => sub { 
            "~~" . $::CLASS->name . "~~";
        };        
    
        $::CLASS->add_method('pretty' => ::make_method($pret
Perl6-Pugs ( A/AU/AUDREYT/Perl6-Pugs-6.2.13.tar.gz, AUDREYT, 2006; MetaCPAN )
Perl6-Pugs/misc/pX/Common/lrep/iterator_engine.pl ( view source; MetaCPAN )
 ~~ m/^(\Q$const\E)(.*)/s;
        # return unless @_[0] ~~ perl5:m:s:/^(\Q$const\E)(.*)/;
        # return unless @_[0] ~~  /^ ( $const )(.*)/;  # (putter on #perl6)
        # return unless @_[0] ~~ 
Perl6-Pugs ( A/AU/AUDREYT/Perl6-Pugs-6.2.13.tar.gz, AUDREYT, 2006; MetaCPAN )
Perl6-Pugs/ext/libwww-perl/t/getprint.t ( view source; MetaCPAN )
est = =$hdl;
      $request ~~ s:P5/\s+$//;
      #diag $request;
      if ($request ~~ rx:P5"^GET /stop-server/") {
        last();
      };

      while (readline($hdl) ~~ rx:P5/\S/) { 1 };
      $h
-)
#  threads while running an external command)

for @urls -> $t_url {
  my $url = $t_url;
  $url ~~ s:perl5/%s/$base_url/;
  my $inc = map {qq! "-I$_"!}, @*INC;

  # Will block forever
  # my $outpu
Perl6-Pugs ( A/AU/AUDREYT/Perl6-Pugs-6.2.13.tar.gz, AUDREYT, 2006; MetaCPAN )
Perl6-Pugs/docs/talks/perl6-apw2005/code/op/smart1.pl ( view source; MetaCPAN )
Perl 6: generalisierter Smart-Match-Operator
$s ~~ 1978;
$s ~~ "Hallo, Welt";
$s ~~ /regex/;
$s !~ funktion();
#=Alles zusammen: (änlich wie any)
$s ~~ (123, funktion, /regex/)
($a, $b, $c) !~ ($d, $

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