Perl6-Pugs

 view release on metacpan or  search on metacpan

docs/feather/~/gen.pl  view on Meta::CPAN

<body>
<h1>~</h1>
<p>(<a href="/">Back to /</a>)</p>
<p>
These users have something in their <tt>~/public_html</tt> directory:
</p>
<ul>
END

my @dir = glob "/home/*/public_html/*";
my @users = keys %{ { map { (split m[/])[2] => undef } @dir } };

print { $fh } qq[<li><a href="/~$_/">$_</a></li>\n] for sort @users;

print { $fh } <<'END';
</ul>
<p>
Or <a href="#" onclick="openNewWindows(); return false;">open each link in a
new window</a>.  (Useful with Firefox 1.5's Preferences/Tabs/Force/NewTab
setting.)
</p>

misc/pX/Common/Regexp-Test-Perl5Tests/t/op/taint.t  view on Meta::CPAN

sub test ($;$) {
    my($ok, $diag) = @_;

    my $curr_test = curr_test();

    if ($ok) {
	print "ok $curr_test\n";
    } else {
	print "not ok $curr_test\n";
        printf "# Failed test at line %d\n", (caller)[2];
	for (split m/^/m, $diag) {
	    print "# $_";
	}
	print "\n" unless
	    $diag eq ''
	    or substr($diag, -1) eq "\n";
    }

    next_test();

    return $ok;

misc/pX/Common/parrot_pge_tests/pge/p5regex/p5rx.t  view on Meta::CPAN


\n in the tests are interpolated, as are variables of the form ${\w+}.

=head1 SYNOPSIS

    % prove t/compilers/pge/p5regex/p5rx.t

=cut


my @file_path = split m{/}, 't/compilers/pge/p5regex/re_tests';
open my $test_file, catfile($PConfig{build_dir}, @file_path)
	or die "Can't open ".catfile ($PConfig{build_dir}, @file_path);

## figure out how many tests there are
1 while (<$test_file>);
my $numtests = $.;
seek($test_file,0,0);
$. = 0;

plan tests => $numtests;

t/builtins/strings/split.t  view on Meta::CPAN


# split on a variable delimiter

my $delimiter = '::';
split_test split($delimiter, "Perl6::Pugs::Test"),
           qw/Perl6 Pugs Test/,
           q{split $delimiter, Str};

# split with a reg-exp
split_test split(rx:Perl5 {,}, "split,me"),
           qw/split me/,
           q/split rx:Perl5 {,}, Str/;

# split on multiple space characters
split_test split(rx:Perl5 {\s+}, "Hello World    Goodbye   Mars"),
           qw/Hello World Goodbye Mars/,
           q/split rx:Perl5 {\s+}, Str/;

split_test split(rx:Perl5 {(\s+)}, "Hello test"),
           ('Hello', ("Hello test" ~~ rx:Perl5 {(\s+)}), 'test'),
           q/split rx:Perl5 {(\s+)}, Str/;

util/package-osx.pl  view on Meta::CPAN

    my ($dest, %symlinks) = @_;
    make_dir("${dest}/usr/bin") unless (-d "${dest}/usr/bin");
    chdir("${dest}/usr/local/bin");
    qx/ln -s $_ $symlinks{$_}/ for (keys %symlinks);
}


sub make_dir {
    my ($dir) = @_;
    my $curr_dir = "";
    for (split m#/#, $dir) {
        $curr_dir .= "$_/";
        if (!-d $curr_dir) {
            mkdir $curr_dir;
            print "Made $curr_dir\n";
        }
    }
}

sub remove_svn {
    my ($dir) = @_;



( run in 0.679 second using v1.01-cache-2.11-cpan-71847e10f99 )