>access_token,
token_secret => $self->access_secret,
);
}
if ($method ~~ ['POST', 'PUT']) {
my $u = URI->new('http:');
if (@args) {
push @extra
?$module\b/, \@args) );
unless (defined $success) {
require $module unless ($module ~~ @NON_INSTADIE); # death by suicide (which prints the proper error msg)
push @failed, $mo
:[A-Z]+\:(?!\:))?$module\b/, \@args) );
require $module unless (defined $success || $module !~~ @NON_INSTADIE); # death by suicide (which prints the proper error msg)
}
}
sub load_pragma {
# This is much simpler with the ~~ operator, but Perl 5.10
# features are being avoided until 5.10 is standard both on MacOSX
# and Debian
# Note that the ~~ operator only checks keys of h
ashes, not values
# unless(%atts1 ~~ %atts2)
unless($attkeys1 eq $attkeys2)
{
debug(3," elements have different attributes");
return 0;
}
foreach my $att (keys %at
$value = $list->index(0);
my ($key, $value) = $map->index(0);
Returns the value at the index given (zero starting). Returns a list if a map type. Returns undef or () if not present. Throws L<Th
%attrs = map {
my $asref = $self->meta->find_attribute_by_name($_)->type_constraint->name ~~ /Ref/;
$_, $entry->get_value($_, asref => $asref);
} $entry->attributes;
return (
) = @_;
return if $line =~ /(^#|^\n)/;
my ($key, $value) = split /\s+/, $line;
$self->{$key} = (
$key ~~ @has_scope ?
[split /\?/, $value] :
$value
);
}
1;
args) = parse_line('\s+', 0, $cmd);
next PROMPT unless $thiscmd;
unless ( lc($thiscmd) ~~
[ qw/h help q quit open create freeze thaw/ ]
) {
unless ( $self->_get_curr
( index($args[0], '--') == 0 ) {
my $f_opt = shift @args;
substr($f_opt, 0, 2, '');
given (lc($f_opt//'')) {
$format = 'YAMLXS' when "yaml";
$format = 'YAML' when "syck";
( index($args[0], '--') == 0 ) {
my $f_opt = shift @args;
substr($f_opt, 0, 2, '');
given (lc($f_opt//'')) {
$format = 'YAMLXS' when "yaml";
$format = 'YAML' when "syck";
}
default {
die q(I don't know what to do with $foo);
}
}
C<given(EXPR)> will assign the value of EXPR to C<$_>
within the lexical scope of the block, so it's simi
he power comes from implicit smart matching:
when $foo
is exactly equivalent to
when $_ ~~ $foo
In fact C<when EXPR> is treated as an implicit smart match most of the
time. The exceptions
ral array
or hash as the argument to C<when>, it is turned into a
reference. So C<given(@foo)> is the same as C<given(\@foo)>,
for example.
C<default> behaves exactly like C<when True>, which is
to s
ess ref $self->report;
return unless defined $self->report->status
and $self->report->status ~~ [qw/DONE FAIL/];
return $self->report->status
}
sub failed {
my ($self, $reason) = @_;
i
ump {
my ($self) = @_;
return unless ref $self->report;
return unless $self->report->status ~~ [ qw/DONE FAIL/ ];
return $self->report->netinfo
}
sub report { info(@_) }
sub info {
my ($s
he current parameter
set.
=item strip_like($regex)
Remove all parameters whose names match the given (qr-quoted) regex e.g.
$qq->strip_like(qr/^utm/)
Does NOT match against parameter values.
le-colon, dash or slash
$opts{cpan} =~ s![/-]!::!g if $opts{cpan};
# "If no argument is given (but the switch is specified - not specifying
# the switch will include everything), it defau
sub mk_query_to_server {
my ( $self, $method, $url, $params ) = @_;
unless ( $method ~~ [ qw( POST GET ) ] ) {
confess "Unknown request method: '$method'";
}
confess "UR
my $package = $params->{package};
unless ( $self->{fake_answer} ) {
unless ( $package ~~ $self->show_packages() ) {
return {error => 1, text => "No such package $package on server"};
h my $obj (@{$array}) {
while ( my ($key, $value) = each %{$obj} ) {
if ( $key ~~ @special_keys ) {
$self->_date_to_datetime($value);
}
$obj
$call, $isaRef, @params ) = @_;
for my $param ( @params )
{
given ( $param )
{
# Define singleton class
# via use param
=> $pkg
};
for ( @attrs )
{
given( $_ )
{
when ('Public' ) { makePublic ($call,$pkg,$sym,$r
e of property.
sub addProperty
{
my ( $this, $attr, $value ) = @_;
given( $attr )
{
when( /^__/ ) { return addPrivate(@_) }
when( /^_/ )
# now try to get it processing again
MogileFS::ProcManager->ProcessQueues;
}
}
# given (job, pid), record that this worker is about to die
# $level is so we can tell if watchdog reques
class = shift;
my $self = {};
bless $self, $class;
return $ReproxySelf = $self;
}
# given (clientproxy, primary_res_hdrs), initiate proceedings to process a
# request for a reproxy resour
for a pathway will be available
for many individuals, meaning that we now have many tests of the given (single)
hypothesis.
(This should not be confused with the scenario of multiple hypothesis
testin
############
# ===
# NEW create a new population path-scan object
# === ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
=head2 new
The object constructor takes a mandatory, but otherwise un-ordere
gn the manner in which genes will be internally organized
# ====== ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
=head2 assign
This method assigns the manner in which genes will b
}
return $ret;
};
# see if what we are returning is serializable itself
given (ref $value) {
when ('HASH') {
while (my ($k, $v) = each %$value) {
e what commands
would be sent to gnuplot. This is a dry run. Note that if the 'binary' option is
given (see below), then this dump will contain binary data. If this binary data
should be suppressed fr
gnuplot I<and> to the log. Useful for debugging I/O issues. Note that
if the 'binary' option is given (see below), then this log will contain binary
data. If this binary data should be suppressed fro