view release on metacpan or search on metacpan
.claude/skills/perl-ai-langertha/SKILL.md view on Meta::CPAN
print $response; # Stringifies to content
# Async
use Future::AsyncAwait;
my $response = await $engine->simple_chat_f('Tell me a story.');
say $response->model; # Model name
say $response->prompt_tokens; # Token usage
say $response->completion_tokens;
say $response->thinking; # Chain-of-thought (if available)
```
`Langertha::Response` overloads `""` so it works in string contexts.
</simple-chat>
.claude/skills/perl-ai-langertha/SKILL.md view on Meta::CPAN
mcp_servers => [$mcp], # Pass MCP server(s)
);
# One-shot tool calling
my $response = await $engine->chat_with_tools_f('Find all .pm files in lib/');
say $response;
```
</tool-calling>
<raider>
## Raider â Autonomous Agent
.claude/skills/perl-ai-langertha/SKILL.md view on Meta::CPAN
# Raid (autonomous tool-calling loop)
my $result = await $raider->raid_f('Review lib/App.pm');
# Result handling
say $result; # Stringified response
say $result->is_question; # Agent asked a question
say $result->is_abort; # Agent aborted
# Continue conversation (has context from previous raids)
my $r2 = await $raider->raid_f('Now suggest improvements.');
# Respond to question
.claude/skills/perl-ai-langertha/SKILL.md view on Meta::CPAN
$raider->add_history('user', $content); # Replay from DB
$raider->clear_history; # Reset
# Metrics
my $m = $raider->metrics;
say "Iterations: $m->{iterations}";
say "Tool calls: $m->{tool_calls}";
```
### Raid Loop (simplified)
1. Auto-compress history if context threshold exceeded
view all matches for this distribution
view release on metacpan or search on metacpan
lib/App/Rakubrew.pm view on Meta::CPAN
sub run_script {
my ($self) = @_;
my @args = @{$self->{args}};
sub _cant_access_home {
say STDERR "Can't create rakubrew home directory in $prefix";
say STDERR "Probably rakubrew was denied access. You can either change that folder to be writable";
say STDERR "or set a different rakubrew home directory by setting the `\$RAKUBREW_HOME` environment";
say STDERR "prior to calling the rakubrew shell hook. ";
exit 1;
}
unless (-d $prefix) {
_cant_access_home() unless mkdir $prefix;
lib/App/Rakubrew.pm view on Meta::CPAN
&& !(@args && $args[0] eq 'init')
&& !(@args && $args[0] eq 'home')
&& !(@args && $args[0] =~ /^internal_/)
|| @args && $args[0] eq 'shell'
|| @args >= 2 && $args[0] eq 'mode' && $args[1] eq 'env') {
say STDERR << "EOL";
The shell hook required to run rakubrew in either 'env' mode or with the 'shell' command seems not to be installed.
Run '$brew_name init' for installation instructions if you want to use those features,
or run '$brew_name mode shim' to use 'shim' mode which doesn't require a shell hook.
EOL
exit 1;
lib/App/Rakubrew.pm view on Meta::CPAN
my $arg = shift(@args) // 'help';
if ($arg eq 'version' || $arg eq 'current') {
if (my $c = get_version()) {
if (@args && $args[0] eq '--short') {
say "$c"
}
else {
say "Currently running $c"
}
} else {
say STDERR "Not running anything at the moment. Use '$brew_name switch' to set a version";
exit 1;
}
} elsif ($arg eq 'versions' || $arg eq 'list') {
my $cur = get_version() // '';
lib/App/Rakubrew.pm view on Meta::CPAN
my $version_line = '';
$version_line .= 'BROKEN ' if is_version_broken($_);
$version_line .= $_ eq $cur ? '* ' : ' ';
$version_line .= $_;
$version_line .= ' -> ' . (get_version_path($_, 1) || '') if is_registered_version($_);
say $version_line;
} get_versions();
} elsif ($arg eq 'global' || $arg eq 'switch') {
if (!@args) {
my $version = get_global_version();
if ($version) {
say $version;
}
else {
say "$brew_name: no global version configured";
}
}
else {
$self->match_and_run($args[0], sub {
set_global_version(shift);
lib/App/Rakubrew.pm view on Meta::CPAN
} elsif ($arg eq 'shell') {
if (!@args) {
my $shell_version = get_shell_version();
if (defined $shell_version) {
say "$shell_version";
}
else {
say "$brew_name: no shell-specific version configured";
}
}
else {
my $version = shift @args;
if ($version ne '--unset') {
lib/App/Rakubrew.pm view on Meta::CPAN
} elsif ($arg eq 'local') {
validate_brew_mode();
if (!@args) {
my $version = get_local_version();
if ($version) {
say $version;
}
else {
say "$brew_name: no local version configured for this directory";
}
}
else {
my $version = shift @args;
if ($version eq '--unset') {
lib/App/Rakubrew.pm view on Meta::CPAN
my ($cur_backend, $cur_rakudo) = split '-', (get_version() // ''), 2;
$cur_backend //= '';
$cur_rakudo //= '';
my @downloadables = App::Rakubrew::Download::available_precomp_archives();
say "Available Rakudo versions:";
map {
my $ver = $_;
my $d = (grep {$_->{ver} eq $ver} @downloadables) ? 'D' : ' ';
my $s = $cur_rakudo eq $ver ? '*' : ' ';
say "$s$d $ver";
} App::Rakubrew::Build::available_rakudos();
say '';
$cur_backend |= '';
$cur_rakudo |= '';
say "Available backends:";
map { say $cur_backend eq $_ ? "* $_" : " $_" } App::Rakubrew::Variables::available_backends();
} elsif ($arg eq 'build-rakudo' || $arg eq 'build') {
my ($impl, $ver, @args) =
App::Rakubrew::VersionHandling::match_version(@args);
if (!$ver) {
lib/App/Rakubrew.pm view on Meta::CPAN
@versions = grep { /^\d\d\d\d\.\d\d/ } @versions;
$ver = $versions[-1];
}
if ($impl eq "panda") {
say "panda is discontinued; please use zef (rakubrew build-zef) instead";
} elsif ($impl eq "zef") {
my $version = get_version();
if (!$version) {
say STDERR "$brew_name: No version set.";
exit 1;
}
App::Rakubrew::Build::build_zef($version);
# Might have new executables now -> rehash.
rehash();
say "Done, built zef for $version";
} elsif (!exists $impls{$impl}) {
my $warning = "Cannot build Rakudo with backend '$impl': this backend ";
if ($impl eq "parrot") {
$warning .= "is no longer supported.";
} else {
$warning .= "does not exist.";
}
say $warning;
exit 1;
}
else {
my $configure_opts = '';
if (@args && $args[0] =~ /^--configure-opts=/) {
lib/App/Rakubrew.pm view on Meta::CPAN
$configure_opts =~ s/^'//;
$configure_opts =~ s/'$//;
}
if ($configure_opts =~ /--prefix/) {
say STDERR "Building Rakudo in a custom folder is not supported. If you need";
say STDERR "this it's recommended to build it manually and then use the";
say STDERR "`register` command to make that installation available in Rakubrew.";
exit 1;
}
my $name = "$impl-$ver";
$name = $impl if $impl eq 'moar-blead' && $ver eq 'main';
lib/App/Rakubrew.pm view on Meta::CPAN
# Might have new executables now -> rehash.
rehash();
if (get_version() eq 'system') {
set_global_version($name);
}
say "Done, $name built";
}
} elsif ($arg eq 'triple') {
my ($rakudo_ver, $nqp_ver, $moar_ver) = @args[0 .. 2];
my $name = App::Rakubrew::Build::build_triple($rakudo_ver, $nqp_ver, $moar_ver);
lib/App/Rakubrew.pm view on Meta::CPAN
# Might have new executables now -> rehash
rehash();
if (get_version() eq 'system') {
set_global_version($name);
}
say "Done, $name built";
} elsif ($arg eq 'download-rakudo' || $arg eq 'download') {
my ($impl, $ver, @args) =
App::Rakubrew::VersionHandling::match_version(@args);
if (!exists $impls{$impl}) {
say STDERR "Cannot download Rakudo on '$impl': this backend does not exist.";
exit 1;
}
my $name = App::Rakubrew::Download::download_precomp_archive($impl, $ver);
# Might have new executables now -> rehash
rehash();
if (get_version() eq 'system') {
set_global_version("$name");
}
say "Done, $name installed";
} elsif ($arg eq 'register') {
my ($name, $path) = @args[0 .. 1];
if (!$name || !$path) {
say STDERR "$brew_name: Need a version name and rakudo installation path";
exit 1;
}
if (version_exists($name)) {
say STDERR "$brew_name: Version $name already exists";
exit 1;
}
sub invalid {
my $path = shift;
say STDERR "$brew_name: No valid rakudo installation found at '$path'";
exit 1;
}
$path = rel2abs($path);
invalid($path) if is_version_path_broken($path);
$path = clean_version_path($path);
lib/App/Rakubrew.pm view on Meta::CPAN
} elsif ($arg eq 'build-zef') {
my $version = get_version();
my $zef_version = shift(@args);
if (!$version) {
say STDERR "$brew_name: No version set.";
exit 1;
}
say("Building zef ", $zef_version || "latest");
App::Rakubrew::Build::build_zef($version, $zef_version);
# Might have new executables now -> rehash
rehash();
say "Done, built zef for $version";
} elsif ($arg eq 'build-panda') {
say "panda is discontinued; please use zef (rakubrew build-zef) instead";
} elsif ($arg eq 'exec') {
my $param = shift @args;
if ($param eq '--with') {
my $version = shift @args;
lib/App/Rakubrew.pm view on Meta::CPAN
$self->do_exec($param, \@args);
}
} elsif ($arg eq 'which') {
if (!@args) {
say STDERR "Usage: $brew_name which <command>";
}
else {
my $version = get_version();
if (!$version) {
say STDERR "$brew_name: No version set.";
exit 1;
}
map {say $_} which($args[0], $version);
}
} elsif ($arg eq 'whence') {
if (!@args) {
say STDERR "Usage: $brew_name whence [--path] <command>";
}
else {
my $param = shift @args;
my $pathmode = $param eq '--path';
my $prog = $pathmode ? shift(@args) : $param;
map {say $_} whence($prog, $pathmode);
}
} elsif ($arg eq 'mode') {
if (!@args) {
say get_brew_mode();
}
else {
set_brew_mode($args[0]);
}
lib/App/Rakubrew.pm view on Meta::CPAN
} elsif ($arg eq 'init') {
$self->init(@args);
} elsif ($arg eq 'home') {
say $prefix;
} elsif ($arg eq 'test') {
my $version = shift @args;
if (!$version) {
$self->test(get_version());
lib/App/Rakubrew.pm view on Meta::CPAN
# figure out what to do with this
# filename, let Windows have a try.
# The first line is potentially the shebang. Thus the search for "perl" and/or perl6/raku.
my ($basename, undef, $suffix) = my_fileparse($prog_name);
if($suffix =~ /^\Q\.(exe|bat|cmd)\E\z/i) {
say $path;
}
elsif($suffix =~ /^\Q\.nqp\E\z/i) {
say which('nqp', get_version()).' '.$path;
}
else {
open(my $fh, '<', $path);
my $first_line = <$fh>;
close($fh);
if($first_line =~ /#!.*(perl6|raku)/) {
say get_raku(get_version()) . ' ' . $path;
}
elsif($first_line =~ /#!.*perl/) {
say 'perl '.$path;
}
else {
say $path;
}
}
} elsif ($arg eq 'internal_update') {
App::Rakubrew::Update::internal_update(@args);
} elsif ($arg eq 'rakubrew-version') {
say "rakubrew v$VERSION Build type: $distro_format OS: $^O";
} else {
require Pod::Usage;
my $help_text = "";
open my $pod_fh, ">", \$help_text;
lib/App/Rakubrew.pm view on Meta::CPAN
close $pod_fh;
my $backends = join '|', App::Rakubrew::Variables::available_backends(), 'all';
say $help_text;
}
}
sub match_and_run {
my ($self, $version, $action) = @_;
if (!$version) {
say "Which version do you mean?";
say "Available builds:";
map {say} get_versions();
return;
}
if (grep { $_ eq $version } get_versions()) {
$action->($version);
}
else {
say "Sorry, '$version' not found.";
my @match = grep { /\Q$version/ } get_versions();
if (@match) {
say "Did you mean:";
say $_ for @match;
}
}
}
sub test {
lib/App/Rakubrew.pm view on Meta::CPAN
$self->match_and_run($version, sub {
my $matched = shift;
verify_version($matched);
my $v_dir = catdir($versions_dir, $matched);
if (!-d $v_dir) {
say STDERR "Version $matched was not built by rakubrew.";
say STDERR "Refusing to try running spectest there.";
exit 1;
}
chdir catdir($versions_dir, $matched);
say "Spectesting $matched";
if (!-f 'Makefile') {
say STDERR "Can only run spectest in self built Rakudos.";
say STDERR "This Rakudo is not self built.";
exit 1;
}
run(App::Rakubrew::Build::determine_make($matched), 'spectest');
});
}
lib/App/Rakubrew.pm view on Meta::CPAN
sub nuke {
my ($self, $version) = @_;
$self->match_and_run($version, sub {
my $matched = shift;
if (is_registered_version($matched)) {
say "Unregistering $matched";
unlink(catfile($versions_dir, $matched));
}
elsif ($matched eq 'system') {
say 'I refuse to nuke system Raku!';
exit 1;
}
elsif ($matched eq get_version()) {
say "$matched is currently active. I refuse to nuke.";
exit 1;
}
else {
say "Nuking $matched";
remove_tree(catdir($versions_dir, $matched));
}
});
# Might have lost executables -> rehash
rehash();
lib/App/Rakubrew.pm view on Meta::CPAN
my $self = shift;
my $brew_exec = catfile($RealBin, $brew_name);
if (+@_ == 1) {
# We have an argument. That has to be the shell.
# We already retrieved the shell above, so no need to look at the passed argument here again.
say $self->{hook}->get_init_code;
}
else {
my $shell = ref($self->{hook});
$shell =~ s/.+:://;
my $shell_text = join('|', App::Rakubrew::Shell->available_shells);
my $text = <<EOT;
Your shell has been identified as $shell. If that's wrong, run
$brew_exec init --shell $shell_text
EOT
say $text;
say $self->{hook}->install_note;
}
}
sub de_par_environment {
# The PAR packager modifies the environment.
view all matches for this distribution
view release on metacpan or search on metacpan
lib/App/Raps2/UI.pm view on Meta::CPAN
sub read_multiline {
my ( $self, $str ) = @_;
my $in;
say "${str} (^D or empty line to quit)";
while ( my $line = $self->read_line('multiline') ) {
$in .= "${line}\n";
}
view all matches for this distribution
view release on metacpan or search on metacpan
lib/App/RecordStream/Operation/toptable.pm view on Meta::CPAN
__FORMAT_TEXT__
So, now in one table we can see all the intersections of state and priority
values with the count and sum_rss fields. Remember that the ALL field (row and
column) are provided by the --cube functionality of recs-collate
Now, say you want to pin value, lets just look at processes in state run for
instance:
__FORMAT_TEXT__
\$ cat /var/tmp/psrecs | recs-collate --perfect --cube --key priority,state -a count -a sum,rss | recs-toptable --x priority,FIELD --y state -v sum_rss,count --pin state=run
+-----+--------+-----+-------+-----+-------+-----+--------+
view all matches for this distribution
view release on metacpan or search on metacpan
lib/Regexp/Common/Patch/DumpPatterns.pm view on Meta::CPAN
}
END {
print "# BEGIN DUMP $config{-tag}\n";
local $Data::Dmp::OPT_DEPARSE = 0;
say dmp(\@main::_patterns);
print "# END DUMP $config{-tag}\n";
}
sub patch_data {
return {
view all matches for this distribution
view release on metacpan or search on metacpan
relate_complex view on Meta::CPAN
will screen out files ending in "htm" (but not "html").
This script has the extremely useful feature of automatically
omitting uninteresting files, but it's guaranteed that you'll
be confused by this some day, so don't say I didn't warn you.
As of this writing, by default files are ignored that match
these patterns:
'~$'; # emacs backups
'/\#'; # emacs autosaves
relate_complex view on Meta::CPAN
wouldn't be very useful (consider that with full paths *all*
listings match "^/") So instead we DWIM and turn "^" into a
beginning-of-name match. An embedded or trailing "^" is left
alone. Ditto for a "^" in front of a slash: if you ask for
'^/home/bin', maybe that's really what you want (as opposed to,
say '/tmp/backup/home/bin').
=head2 alternate filters
You can always determine which filters are available with the
"-L" option:
relate_complex view on Meta::CPAN
(2) An efficiency hack where terms are sorted by length to
find a good one to use as the primary_term to hand to
locate... but you need to screen out any regexp terms when
you do that, and the overall behavior becomes too hard to
remember (it's eaisier to just say "the first term is
different, deal with that").
=head2 Relate Isn't Really
I like this slogan as a mnemonic: "relate makes the file
view all matches for this distribution
view release on metacpan or search on metacpan
=head2 standard filter
This script has the extremely useful feature of automatically
omitting uninteresting files, but it's guaranteed that you'll
be confused by this some day, so don't say I didn't warn you.
Remember that there's a "-a" option (also called "--all")
which overrides the default filter and returns all matches.
As of this writing, by default files are ignored that match
view all matches for this distribution
view release on metacpan or search on metacpan
lib/App/RemoteCommand/Tutorial.pod view on Meta::CPAN
App::RemoteCommand or its frontend C<< rcommand >>
is a simple remote command launcher via ssh.
You can use it like C< ssh > command.
Let's say you have 6 hosts:
www001.example.com, www002.example.com, www003.examle.com,
www001.example.jp, www002.example.jp, www003.examle.jp
and you can ssh these hosts without password or passphrase.
view all matches for this distribution
view release on metacpan or search on metacpan
lib/App/Repo/Agent.pm view on Meta::CPAN
my @packages_list = qw( Packages Packages.bz2 Packages.gz );
mkpath($base_path);
for(@packages_list){
my $packages_tmp_file = "$base_path/$_";
say "packages_tmp_file: $packages_tmp_file";
say "trying $repo_url/$_";
my $system = system("curl --user-agent \"Telesphoreo APT-HTTP/1.0.592\" -kLo $packages_tmp_file $repo_url/$_");
say "system: $system";
#my $res = $curl->get("$repo_url/$_");
#if($res->is_success){
#open(my $fh,"> :raw :bytes",$packages_tmp_file);
# print $fh $res->content;
lib/App/Repo/Agent.pm view on Meta::CPAN
sub parse_control {
my( $repo_url, $packages_tmp_file ) = @_;
my( @packages, %packages, $i ) = ();
if( -f "$base_path/Packages.gz"){
say "gz exist";
system("gunzip -f $base_path/Packages.gz");
}
if( -f "$base_path/Packages.bz2"){
say "bz2 exist";
system("bzcat $base_path/Packages.bz2 > $base_path/Packages");
}
if( -f "$base_path/Packages"){
open(my $fh, '<', "$base_path/Packages") || die "cant open $base_path/Packages: $!";
lib/App/Repo/Agent.pm view on Meta::CPAN
}
#my @url = grep { $_->{Name} } @{get_packages("$ARGV[0]")};
#for(@url){
# say $_->{url};
#}
printer("$ARGV[0]");
#for(@p){ say $_->{Name} };
__DATA__
my $res = $furl->get('http://repo.biteyourapple.net/#download.php?package=repo.biteyourapple.net.phixretroios9');
open( my $fh,">", 'debian.deb' ) || die "cant write to debian.deb: $!";
print $fh $res->content;
view all matches for this distribution
view release on metacpan or search on metacpan
lib/App/RepoSync/Command/Export.pm view on Meta::CPAN
$export_file ||= 'repos.yml';
@dirs = getcwd() unless @dirs;
my @data = ();
for( @dirs ) {
say "scanning $_";
chdir $cwd;
my @repos = App::RepoSync::Export->run( $_ );
push @data, @repos;
}
chdir $cwd;
say "writing $export_file...";
YAML::DumpFile( $export_file , {
version => 0.1,
repos => \@data,
});
say "done. @{[ scalar @data ]} repositories exported.";
}
1;
view all matches for this distribution
view release on metacpan or search on metacpan
lib/App/ReslirpTunnel.pm view on Meta::CPAN
log_to_stderr => $self->{log_to_stderr},
log_file => $self->{log_file});
$butler->start or $self->_die("Failed to start butler");
$butler->hello
or $self->_die("Failed to say hello to butler");
$self->_log(info => "Elevated slave process started and ready");
}
sub _send_to_background {
my $self = shift;
view all matches for this distribution
view release on metacpan or search on metacpan
lib/App/Ringleader.pm view on Meta::CPAN
})
);
$self->start_monitor;
say 'ringleader started...';
$proxy->start;
}
sub start_monitor {
view all matches for this distribution
view release on metacpan or search on metacpan
bin/svn-bisect view on Meta::CPAN
=head1 EXAMPLE
...Because, you know, no software documentation is complete without a flashy
screenshot, these days.
So, lets say you were wondering when the subversion project added the
"Last Changed Rev:" line to the output of "svn info". Determining the
existence of this change is a straightforward matter of searching for the
text string... if a result was found, the current revision is "after",
otherwise it was "before". So a bisect looks like this:
view all matches for this distribution
view release on metacpan or search on metacpan
lib/App/Sandy/Base.pm view on Meta::CPAN
sub log_msg {
my ($msg) = @_;
return if not defined $msg;
chomp $msg;
say STDERR $msg if $LOG_VERBOSE;
}
sub import {
my ($class, @opts) = @_;
my $caller = caller;
view all matches for this distribution
view release on metacpan or search on metacpan
lib/App/Scheme79asm.pm view on Meta::CPAN
my $spaces = ' ' x ($bits + 5 - (length $val));
$index = sprintf $index_format, $index;
my $string = "mem[$index] <= $val;";
$string .= "$spaces // $comment" if defined $comment;
say $fh $string or croak "Failed to print verilog: $!"; # uncoverable branch true
}
}
sub parse_and_print_binary16 {
my ($self, $string, $fh) = @_;
view all matches for this distribution
view release on metacpan or search on metacpan
lib/App/Seacan.pm view on Meta::CPAN
my $self = shift;
my $perlbrew_root_path = join_path($self->config->{seacan}{output}, "perlbrew");
return 0 unless -d $perlbrew_root_path;
my $perl_executable = join_path($perlbrew_root_path, "perls", $self->config->{perl}{installed_as}, "bin", "perl");
if (my $r = -f $perl_executable) {
say STDERR "perl is installed: $perl_executable";
return 1;
}
return 0;
}
view all matches for this distribution
view release on metacpan or search on metacpan
lib/App/SeismicUnixGui/big_streams/iPick.pl view on Meta::CPAN
}
=head2 sub set_exit
say goodbye
clear old images
kill window
stop script
=cut
view all matches for this distribution
view release on metacpan or search on metacpan
lib/App/SeqPericmd.pm view on Meta::CPAN
$width_frac = 0 if $width_frac < 0;
$fmt = sprintf("%%0%d.%df",
$width_whole+$width_frac+($width_frac ? 1:0) + $neg,
$width_frac,
);
#say "D:fmt=$fmt";
} elsif ($args{from} != int($args{from}) ||
defined($args{to}) && $args{to} != int($args{to}) ||
$args{increment} || int($args{increment})) {
# use fixed floating point to avoid showing round-off errors
my $width_frac = max(
view all matches for this distribution
view release on metacpan or search on metacpan
t/App/Services/Forker/01_forker.t view on Meta::CPAN
/;
my @child_objects = ( 1 .. 10 );
sub child_actions {
say "child: $_[0]";
}
my $cntnr = container '01_basic_t' => as {
service log_conf => \$log_conf;
view all matches for this distribution
view release on metacpan or search on metacpan
DESCRIPTION
This module came about because I found myself frequently running the
following command:
$ perl -MSession::Token -E 'say Session::Token->new->get'
YwXYXGLMMnudk33MbClseQ
Before I wrote Session::Token I used to run the following command:
$ openssl rand -base64 16
view all matches for this distribution
view release on metacpan or search on metacpan
devdata/perlbrew-help.0.74 view on Meta::CPAN
set this environment variable in your "bashrc" to the directory in
your shell RC before sourcing perlbrew's RC.
It is possible to share one perlbrew root with multiple user account
on the same machine. Therefore people do not have to install the
same version of perl over an over. Let's say "/opt/perl5" is the
directory we want to share. All users should be able append this
snippet to their bashrc to make it effective:
export PERLBREW_ROOT=/opt/perl5
source ${PERLBREW_ROOT}/etc/bashrc
view all matches for this distribution
view release on metacpan or search on metacpan
local/lib/perl5/Const/Fast.pm view on Meta::CPAN
Perl doesn't distinguish between restricted hashes and readonly hashes. This means that:
use Const::Fast;
const my %a => (foo => 1, bar => 2);
say 1 unless $a{baz}
Will give the error "Attempt to access disallowed key 'baz' in a restricted hash". You have to use C<exists $a{baz}> instead. This is a limitation of perl that can hopefully be solved in the future.
=head1 ACKNOWLEDGEMENTS
view all matches for this distribution
view release on metacpan or search on metacpan
lib/App/SimpleScan/Substitution.pm view on Meta::CPAN
forgetting to put curly braces around it.
=item C<< dictionary must be a hash reference >>
You passed in a value for dictionary that wasn't a hash reference. Did you
forget to say \%hash?
=item C<< find_vars_callback must be a code reference >>
You passed in a value for find_vars_callback that wasn't a code reference.
Did you try to just use a regex without sub{} around it?
view all matches for this distribution
view release on metacpan or search on metacpan
lib/App/SimulateReads/Base.pm view on Meta::CPAN
sub log_msg {
my ($msg) = @_;
return if not defined $msg;
chomp $msg;
say STDERR $msg if $LOG_VERBOSE;
}
sub import {
my ($class, @opts) = @_;
my $caller = caller;
view all matches for this distribution
view release on metacpan or search on metacpan
bin/slackeria view on Meta::CPAN
'h|help' => sub { show_help(0) },
'P|projects=s@' => sub { push( @projects, split( qr{,}, $_[1] ) ) },
'p|plugins=s@' => sub { push( @plugins, split( qr{,}, $_[1] ) ) },
't|template=s' => \$template,
'v|verbose' => \$verbose,
'V|version' => sub { say "slackeria version ${VERSION}"; exit 0 },
) or show_help(1);
my $filename = shift or show_help(1);
sub show_help {
my ($exit_status) = @_;
say 'Usage: slackeria [-v] [-P projects] [-p plugins] [-t template] '
. '<outfile>';
exit $exit_status;
}
bin/slackeria view on Meta::CPAN
for my $p ( keys %{$project} ) {
for my $name ( $plugin->list() ) {
if ($verbose) {
say "Running ${p}/${name}";
}
$project->{$p}->{$name}
= $plugin->run( $name, $conf->get( $p, $name ) );
}
view all matches for this distribution
view release on metacpan or search on metacpan
share/public/highlight/highlight.min.js view on Meta::CPAN
className:"title.class",begin:/[A-Za-z$_][\u00C0-\u02B80-9A-Za-z$_]*/}),...B]
},H,J,{beginKeywords:"import",end:/$/,contains:[...v],relevance:0
},...B,..._,...M,I,P,...z,...q,U,V]}}})();hljs.registerLanguage("swift",e)})();/*! `perl` grammar compiled for Highlight.js 11.7.0 */
(()=>{var e=(()=>{"use strict";return e=>{
const n=e.regex,t=/[dualxmsipngr]{0,12}/,r={$pattern:/[\w.]+/,
keyword:"abs accept alarm and atan2 bind binmode bless break caller chdir chmod chomp chop chown chr chroot close closedir connect continue cos crypt dbmclose dbmopen defined delete die do dump each else elsif endgrent endhostent endnetent endprotoen...
},s={className:"subst",begin:"[$@]\\{",end:"\\}",keywords:r},i={begin:/->\{/,
end:/\}/},a={variants:[{begin:/\$\d/},{
begin:n.concat(/[$%@](\^\w\b|#\w+(::\w+)*|\{\w+\}|\w+(::\w*)*)/,"(?![A-Za-z])(?![@$%])")
},{begin:/[$%@][^\s\w{]/,relevance:0}]
},c=[e.BACKSLASH_ESCAPE,s,a],o=[/!/,/\//,/\|/,/\?/,/'/,/"/,/#/],g=(e,r,s="\\1")=>{
view all matches for this distribution
view release on metacpan or search on metacpan
lib/App/SlowQuitApps.pm view on Meta::CPAN
_defaults("delete $APP_ID");
# Set up delay...
if ($DELAY) {
_defaults("write $APP_ID delay -int $DELAY");
say "Slowquit after $DELAY msec";
}
# Set up whitelist or blacklist...
if (keys %SLOWQUIT) {
_defaults("write $APP_ID invertList -bool YES");
for my $app (keys %SLOWQUIT) {
_defaults("write $APP_ID whitelist -array-add $SLOWQUIT{$app}");
say "Slowquit: $app";
}
}
elsif (keys %FASTQUIT) {
_defaults("write $APP_ID invertList -bool NO");
for my $app (keys %FASTQUIT) {
_defaults("write $APP_ID whitelist -array-add $FASTQUIT{$app}");
say "Fastquit: $app";
}
}
# Restart to effect changes...
system("killall $APP_NAME");
view all matches for this distribution
view release on metacpan or search on metacpan
socialcalc/simpleedit15.pl view on Meta::CPAN
}
return null;
}
scf.RemoteFunctionInfo.waitingForServer = "SOCIALTEXT"; // say what waiting for
funcquery = query; // remember for setting when get it
ajaxrequest2("", "&rpc=socialtext&"+query);
return "Waiting for server"; // return an error for function
}
view all matches for this distribution
view release on metacpan or search on metacpan
inc/Test/Builder.pm view on Meta::CPAN
}
sub _is_qr {
my $regex = shift;
# is_regexp() checks for regexes in a robust manner, say if they're
# blessed.
return re::is_regexp($regex) if defined &re::is_regexp;
return ref $regex eq 'Regexp';
}
view all matches for this distribution
view release on metacpan or search on metacpan
script/sort-by-lines view on Meta::CPAN
sort-by-lines [OPTIONS]... FILE1 FILE2
Examples:
# Sort by length of lines
% sort-by-lines -n file.txt <(perl -nE'say length' file.txt)
Options:
--ignore-case, -f
--numeric-sort, -n
--reverse, -r
script/sort-by-lines view on Meta::CPAN
% sort-by-lines [OPTION]... FILE1 FILE2
Sample command:
% sort-by-lines file.txt <(perl -nE'say length' file.txt)
You can use C<"-"> (in at most one of the files) to mean standard input. Tip:
You can use process substitution in bash.
Sample input file F<file.txt>:
view all matches for this distribution