t::Given;
=pod
=head1 NAME
PPI::Statement::Given - A given-when statement
=head1 SYNOPSIS
given ( foo ) {
say $_;
}
=head1 INHERITANCE
PPI::Statement::Given
isa PPI::Statement
tatement?
In Perl 5.10, use the C<given-when> construct described in L<perlsyn>:
use 5.010;
given ( $string ) {
when( 'Fred' ) { say "I found Fred!" }
when( 'Barney' ) { say "I fo
nes to list (a windowful).
$incr = $window - 1;
# Set the start to the argument given (if there was one).
$start = $1 if $1;
# Back up by the context amount.
NV{PERL_MEM_LOG} =~ /t/ include timestamp in Log
$ENV{PERL_MEM_LOG} =~ /^(\d+)/ write to FD given (default is 2)
Memory logging is somewhat similar to C<-Dm> but is independent of
C<-DDEBUGGING>
gives the token index of each token/non-terminal; then use this to
# create yy_type_tab.
#
# ie given (in perly.y),
#
# %token <opval> A
# %token <ival> B
# %type <pval> C
# %type <opval>
and C<D>.
=item hangul_terminator
-- see 7.1.4 Trailing Weights, UTS #10.
If a true value is given (non-zero but should be positive),
it will be added as a terminator primary weight to the end of
0;
########
# from t/op/getppid.t
pipe my ($r, $w)
########
# TODO switch
use feature 'switch';
given(my $x = "bar") { }
########
# TODO attribute t/op/attrhand.t
sub something : TypeCheck(
QNET:
e structure of the directory tree (including symbolic
links to directories) you might traverse a given (physical) directory
more than once (only if C<follow_fast> is in effect).
Furthermore, deleting
@_;
return match { return $_ ~~ $match for $sub->() };
}
sub any {
my @possibilities = @_;
return match {
for my $candidate (@possibilities) {
return 1 if $_ ~~ $candidate;
}
return;
};
rn match { scalar hash and [ sort keys %{$_} ] ~~ [ sort keys %{$hash} ] };
}
sub value {
my $value = shift;
return $value if blessed($value);
given (ref $value) {
when ('') {
return $value;
NAME
Smart::Match - Smart matching utilities
=head1 VERSION
version 0.008
=head1 SYNOPSIS
given ($foo) {
say "We've got a positive number" when positive;
say "We've got an array" when
output items; if item is a reference, will print dump
=cut
sub debug {
my $layer = $_[0] && $_[0] ~~ @Layer_const ? shift : DefaultLayer;
# drop the layer prefix to print in a config-fasion manner
tput OFF
=cut
sub _verbose {
my $layer = shift;
my $conf = Crop->C->{debug};
return 1 unless $conf->{output} eq 'On';
return unless exists $conf->{layer};
$layer ~~ @{$conf->{layer}};
}
1;
e structure of the directory tree (including symbolic
links to directories) you might traverse a given (physical) directory
more than once (only if C<follow_fast> is in effect).
Furthermore, deleting
ge names, not general bareword
quoting. If there's no such package at compile time a warning is given (see
L<perldiag/Bareword "%s" refers to nonexistent package>)
my $class = No::Such::Package:
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.
{
return $_[0]->{postfix} // q~~ if !defined $_[1];
$_[0]->{postfix} = $_[1];
return $_[0]->{postfix};
}
sub prefix {
return $_[0]->{prefix} // q~~ if !defined $_[1];
$_[0]->{pre
the directory in which perl thinks the code is running.
2. If a list of su_base_file_names is given (in $DATA_SEISMIC_TXT)
split files are written to $DATA_SEISMIC_SU.
3. If an su_base_file_name
turns the Greenwich hour angle of the mean equinox at
0 hours universal on the day whose time is given (i.e. the argument is
a standard Perl time).
=cut
sub theta0 {
my ($time) = @_;
my @t =
ten to
the directory perl thinks the code is running .
2. If a list of su_base_file_names is given (in $DATA_SEISMIC_TXT)
split files are written to $DATA_SEISMIC_SU.
3. If an su_base_file_name
empfoo;
my $start = [gettimeofday];
while ($mux->handles < $opt{conc} && new_conn()) {
##warn ~~ $mux->handles();
die if $mux->handles > $opt{conc};
}
$mux->loop;
my $howlong = tv_interval($
- alias for domain2proxy
# Returns: $self
# Comment:
# FIXME
# If more than one leg is given (e.g. legs+outgoing_proxy) than you have
# to provide a function to find out, which leg is used t
n ISO8601
return $dow; # return Mon=1 as in ISO8601
}
# return month days count for given ( year, month ) (not strictly julian_ namespace)
sub julian_date_month_days_ym
{
my $y = shift;