view release on metacpan or search on metacpan
print qq{ sv_setiv_mg(get_svs("%", GV_ADD|GV_NOTQUAL), $%);\n} if $%; #PAGE_NUMBER
print qq{ sv_setiv_mg(get_svs("-", GV_ADD|GV_NOTQUAL), $-);\n} unless ($- == 0 or $- == 60); #LINES_LEFT
print qq{ sv_setiv_mg(get_svs("=", GV_ADD|GV_NOTQUAL), $=);\n} if $= != 60; #LINES_PER_PAGE
# deprecated global vars
print qq{ {SV* s = get_svs("[",GV_NOTQUAL); sv_setiv(s, $[); mg_set(s);}\n} if $[; #ARRAY_BASE
if ($] < 5.010) { # OFMT and multiline matching
eval q[
print sprintf(qq{ sv_setpv(GvSVn(gv_fetchpv("\$#", GV_ADD|GV_NOTQUAL, SVt_PV)), %s);\n},
cstring($#)) if $#;
print sprintf(qq{ sv_setiv(GvSVn(gv_fetchpv("\$*", GV_ADD|GV_NOTQUAL, SVt_IV)), %d);\n}, $*) if $*;
view all matches for this distribution
view release on metacpan or search on metacpan
lib/B/DeparseTree/P518.pm view on Meta::CPAN
my $type = $op->name;
my ($re, @texts);
my $opts = {};
if ($type eq "const") {
return info_from_text($op, $self, '$[', 're_dq_const', {})
if $op->private & OPpCONST_ARYBASE;
my $unbacked = B::Deparse::re_unback($self->const_sv($op)->as_string);
return B::Deparse::re_uninterp_extended(escape_extended_re($unbacked))
if $extended;
return B::Deparse::re_uninterp(B::Deparse::escape_str($unbacked));
view all matches for this distribution
view release on metacpan or search on metacpan
lib/B/Keywords.pm view on Meta::CPAN
$< $REAL_USER_ID $UID
$> $EFFECTIVE_USER_ID $EUID ),
'$(', qw( $REAL_GROUP_ID $GID ),
'$)', qw( $EFFECTIVE_GROUP_ID $EGID
$0 $PROGRAM_NAME
$[
$]
$^A $ACCUMULATOR
$^C $COMPILING
$^CHILD_ERROR_NATIVE
$^D $DEBUGGING
view all matches for this distribution
view release on metacpan or search on metacpan
configure.sh view on Meta::CPAN
s/-\n.*//
' >$as_me.lineno &&
chmod +x "$as_me.lineno" ||
{ $as_echo "$as_me: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&2; as_fn_exit 1; }
# Don't try to exec as it changes $[0], causing all sort of problems
# (the dirname of $[0] is not the place where we might find the
# original and so on. Autoconf is especially sensitive to this).
. "./$as_me.lineno"
# Exit status is that of the last command.
exit
}
view all matches for this distribution
view release on metacpan or search on metacpan
lib/Badger/Utils.pm view on Meta::CPAN
sub is_object($$) {
blessed $_[1] && $_[1]->isa($_[0]);
}
sub textlike($) {
! ref $_[0] # check if $[0] is a non-reference
|| blessed $_[0] # or an object with an overloaded
&& overload::Method($_[0], '""'); # '""' stringification operator
}
sub truelike($) {
view all matches for this distribution
view release on metacpan or search on metacpan
share/PerlCritic/Critic/Policy/RegularExpressions/ProhibitCaptureWithoutTest.pm view on Meta::CPAN
#-----------------------------------------------------------------------------
sub violates {
my ($self, $elem, $doc) = @_;
# TODO named capture variables
return if $elem !~ m/\A \$[1-9] \z/xms;
return if _is_in_conditional_expression($elem);
return if $self->_is_in_conditional_structure($elem);
return $self->violation( $DESC, $EXPL, $elem );
}
view all matches for this distribution
view release on metacpan or search on metacpan
lib/Ebig5.pm view on Meta::CPAN
$slash = 'div';
return $1;
}
# $ $ $ $ $ $ $ $ $ $ $ $ $ $
# $ @ # \ ' " / ? ( ) [ ] < >
elsif (/\G ( \$[\$\@\#\\\'\"\/\?\(\)\[\]\<\>] ) /oxmsgc) {
$slash = 'div';
return $1;
}
# while (<FILEHANDLE>)
lib/Ebig5.pm view on Meta::CPAN
$e_string .= $1;
$slash = 'div';
}
# $ $ $ $ $ $ $ $ $ $ $ $ $ $
# $ @ # \ ' " / ? ( ) [ ] < >
elsif ($string =~ /\G ( \$[\$\@\#\\\'\"\/\?\(\)\[\]\<\>] ) /oxmsgc) {
$e_string .= $1;
$slash = 'div';
}
# subroutines of package Ebig5
view all matches for this distribution
view release on metacpan or search on metacpan
lib/Ebig5hkscs.pm view on Meta::CPAN
$slash = 'div';
return $1;
}
# $ $ $ $ $ $ $ $ $ $ $ $ $ $
# $ @ # \ ' " / ? ( ) [ ] < >
elsif (/\G ( \$[\$\@\#\\\'\"\/\?\(\)\[\]\<\>] ) /oxmsgc) {
$slash = 'div';
return $1;
}
# while (<FILEHANDLE>)
lib/Ebig5hkscs.pm view on Meta::CPAN
$e_string .= $1;
$slash = 'div';
}
# $ $ $ $ $ $ $ $ $ $ $ $ $ $
# $ @ # \ ' " / ? ( ) [ ] < >
elsif ($string =~ /\G ( \$[\$\@\#\\\'\"\/\?\(\)\[\]\<\>] ) /oxmsgc) {
$e_string .= $1;
$slash = 'div';
}
# subroutines of package Ebig5hkscs
view all matches for this distribution
view release on metacpan or search on metacpan
lib/Bigtop/Backend/Control/Gantry.pm view on Meta::CPAN
[% BLOCK class_access %]
#-----------------------------------------------------------------
# get_model_name( )
#-----------------------------------------------------------------
sub get_model_name {
return $[% model_alias %];
}
[% END %]
[% BLOCK text_description %]
lib/Bigtop/Backend/Control/Gantry.pm view on Meta::CPAN
];
[% END %]
[% BLOCK main_heading %]
[% IF limit_by %]
my $header_option_suffix = ( $[% limit_by %] ) ? "/$[% limit_by %]" : '';
[% END %]
my @header_options = (
[% FOREACH option IN header_options %]
{
lib/Bigtop/Backend/Control/Gantry.pm view on Meta::CPAN
$search->{ user_id } = $limit_to_user_id if ( $limit_to_user_id );
[% IF dbix AND rows AND limit_by -%]
my $page = $params->{ page } || 1;
if ( $[% limit_by %] ) {
$search->{ [% limit_by %] } = $[% limit_by %];
}
my $schema = $self->get_schema();
my $results = $[% model %]->get_listing(
{
[% IF pseudo_cols.size > 0 %]
'+select' => [[% FOREACH pseudo_col IN pseudo_cols %][% pseudo_col.field %][% UNLESS loop.last %] [% END %][% END %]],
'+as' => [[% FOREACH pseudo_col IN pseudo_cols %]'[% pseudo_col.alias %]'[% UNLESS loop.last %] [% END %][% END %]],
[% END %]
lib/Bigtop/Backend/Control/Gantry.pm view on Meta::CPAN
while ( my $row = $rows->next ) {
[%- ELSIF dbix AND rows -%]
my $page = $params->{ page } || 1;
my $schema = $self->get_schema();
my $results = $[% model %]->get_listing(
{
[% IF pseudo_cols.size > 0 %]
'+select' => [[% FOREACH pseudo_col IN pseudo_cols %][% pseudo_col.field %][% UNLESS loop.last %] [% END %][% END %]],
'+as' => [[% FOREACH pseudo_col IN pseudo_cols %]'[% pseudo_col.alias %]'[% UNLESS loop.last %] [% END %][% END %]],
[% END %]
lib/Bigtop/Backend/Control/Gantry.pm view on Meta::CPAN
$retval->{ page } = $rows->pager();
ROW:
while ( my $row = $rows->next ) {
[%- ELSIF dbix AND limit_by -%]
if ( $[% limit_by %] ) {
$search->{ [% limit_by %] } = $[% limit_by %];
}
my $schema = $self->get_schema();
my @rows = $[% model %]->get_listing(
{
[% IF pseudo_cols.size > 0 %]
'+select' => [[% FOREACH pseudo_col IN pseudo_cols %][% pseudo_col.field %][% UNLESS loop.last %] [% END %][% END %]],
'+as' => [[% FOREACH pseudo_col IN pseudo_cols %]'[% pseudo_col.alias %]'[% UNLESS loop.last %] [% END %][% END %]],
[% END %]
lib/Bigtop/Backend/Control/Gantry.pm view on Meta::CPAN
ROW:
foreach my $row ( @rows ) {
[%- ELSIF dbix -%]
my $schema = $self->get_schema();
my @rows = $[% model %]->get_listing(
{
[% IF pseudo_cols.size > 0 %]
'+select' => [[% FOREACH pseudo_col IN pseudo_cols %][% pseudo_col.field %][% UNLESS loop.last %] [% END %][% END %]],
'+as' => [[% FOREACH pseudo_col IN pseudo_cols %]'[% pseudo_col.alias %]'[% UNLESS loop.last %] [% END %][% END %]],
[% END %]
lib/Bigtop/Backend/Control/Gantry.pm view on Meta::CPAN
);
ROW:
foreach my $row ( @rows ) {
[%- ELSE -%]
my @rows = $[% model %]->get_listing([% IF order_by %] { order_by => '[% order_by %]', } [% END %]);
ROW:
foreach my $row ( @rows ) {
[%- END -%]
last ROW if $perm_obj->hide_all_data;
my $id = $row->id;
[% FOREACH foreigner IN foreigners %]
my $[% foreigner %] = ( $row->[% foreigner %] )
? $row->[% foreigner %]->foreign_display()
: '';
[% END %]
push(
lib/Bigtop/Backend/Control/Gantry.pm view on Meta::CPAN
[% END %]
[% BLOCK form_body %]
[% arg_capture %]
[%- IF dbix -%]
my $selections = $[% model %]->get_form_selections(
{
schema => $self->get_schema(),
[% IF refers_to.size > 0 %]
foreign_tables => {
[% FOREACH rt_table IN refers_to %]
lib/Bigtop/Backend/Control/Gantry.pm view on Meta::CPAN
[% END -%]
}
);
[%- ELSE -%]
my $selections = $[% model %]->get_form_selections();
[%- END -%]
return {
[% IF form_name %] name => '[% form_name %]',
lib/Bigtop/Backend/Control/Gantry.pm view on Meta::CPAN
};
[% END %]
[% BLOCK crud_helpers %]
my $[% crud_name %] = Gantry::Plugins::CRUD->new(
add_action => \&[% crud_name %]_add,
edit_action => \&[% crud_name %]_edit,
delete_action => \&[% crud_name %]_delete,
form => __PACKAGE__->can( '[% form_method_name %]' ),
redirect => \&[% crud_name %]_redirect,
lib/Bigtop/Backend/Control/Gantry.pm view on Meta::CPAN
[% IF with_perms %]
Gantry::Plugins::CRUD::verify_permission( { site => $self } );
[% END %]
$[% crud_name %]->add( $self, { data => \@_ } );
}
#-------------------------------------------------
# $self->[% crud_name %]_add( $params, $data )
#-------------------------------------------------
sub [% crud_name %]_add {
my ( $self, $params, $data ) = @_;
# make a new row in the $[% model_alias %] table using data from $params
# remember to add commit if needed
$[% model_alias %]->gupdate_or_create( $self, $params );
}
#-------------------------------------------------
# $self->do_delete( $doomed_id, $confirm )
#-------------------------------------------------
sub do_delete {
my ( $self, $doomed_id, $confirm ) = @_;
my $row = $[% model_alias %]->gfind( $self, $doomed_id );
[% IF with_perms %]
Gantry::Plugins::CRUD::verify_permission( { site => $self, row => $row } );
[% END %]
$[% crud_name %]->delete( $self, $confirm, { row => $row } );
}
#-------------------------------------------------
# $self->[% crud_name %]_delete( $data )
#-------------------------------------------------
lib/Bigtop/Backend/Control/Gantry.pm view on Meta::CPAN
# $self->do_edit( $id )
#-------------------------------------------------
sub do_edit {
my ( $self, $id ) = @_;
my $row = $[% model_alias %]->gfind( $self, $id );
[% IF with_perms %]
Gantry::Plugins::CRUD::verify_permission( { site => $self, row => $row } );
[% END %]
$[% crud_name %]->edit( $self, { row => $row } );
}
#-------------------------------------------------
# $self->[% crud_name %]_edit( $param, $data )
#-------------------------------------------------
lib/Bigtop/Backend/Control/Gantry.pm view on Meta::CPAN
[% arg_capture %]
my $params = $self->params(); # easy way
[% FOREACH expected_param IN soap_params.expects %]
my $[% expected_param.name %] = $params->{ [% expected_param.name %] };
[% END %]
# hard way:
# my $xmlobj = XML::LibXML->new();
# my $dom = $xmlobj->parse_string( $self->get_post_body() )
# or return return_error( "Mal-formed XML request: $!" );
#
[% FOREACH expected_param IN soap_params.expects %]
# my ( $[% expected_param.name %]_node ) = $dom->getElementsByLocalName( '[% expected_param.name %]' );
# my $[% expected_param.name %] = $[% expected_param.name %]_node->textContent;
[% END %]
[% FOREACH returned_param IN soap_params.returns %]
my $[% returned_param.name %];
[% END %]
my $time = $self->soap_current_time();
my $ret_struct = [
{
GantrySoapServiceResponse => [
[% FOREACH returned_param IN soap_params.returns %]
{ [% returned_param.name %] => $[% returned_param.name %] },
[% END %]
]
}
];
view all matches for this distribution