Result:
found more than 846 distributions - search limited to the first 2001 files matching your query ( run in 2.264 )


Alt-Acme-Math-XS-CPP

 view release on metacpan or  search on metacpan

inc/Inline.pm  view on Meta::CPAN

85
86
87
88
89
90
91
92
93
94
95
sub import_heavy {
    local ($/, $") = ("\n", ' '); local ($\, $,);
 
    my $o;
    my ($pkg, $script) = caller(1);
    # Not sure what this is for. Let's see what breaks.
    # $pkg =~ s/^.*[\/\\]//;
    my $class = shift;
    if ($class ne 'Inline') {
        croak M01_usage_use($class) if $class =~ /^Inline::/;

 view all matches for this distribution


Alt-Acme-Math-XS-ModuleBuild

 view release on metacpan or  search on metacpan

inc/Inline.pm  view on Meta::CPAN

85
86
87
88
89
90
91
92
93
94
95
sub import_heavy {
    local ($/, $") = ("\n", ' '); local ($\, $,);
 
    my $o;
    my ($pkg, $script) = caller(1);
    # Not sure what this is for. Let's see what breaks.
    # $pkg =~ s/^.*[\/\\]//;
    my $class = shift;
    if ($class ne 'Inline') {
        croak M01_usage_use($class) if $class =~ /^Inline::/;

 view all matches for this distribution


Alt-Acme-Math-XS-ModuleInstall

 view release on metacpan or  search on metacpan

inc/Inline.pm  view on Meta::CPAN

85
86
87
88
89
90
91
92
93
94
95
sub import_heavy {
    local ($/, $") = ("\n", ' '); local ($\, $,);
 
    my $o;
    my ($pkg, $script) = caller(1);
    # Not sure what this is for. Let's see what breaks.
    # $pkg =~ s/^.*[\/\\]//;
    my $class = shift;
    if ($class ne 'Inline') {
        croak M01_usage_use($class) if $class =~ /^Inline::/;

 view all matches for this distribution


Alt-Crypt-OpenSSL-PKCS12-Broadbean

 view release on metacpan or  search on metacpan

ppport.h  view on Meta::CPAN

16648
16649
16650
16651
16652
16653
16654
16655
16656
16657
16658
    ccstack = top_si->si_cxstack;
    cxix = DPPP_dopoptosub_at(ccstack, top_si->si_cxix);
}
if (cxix < 0)
    return NULL;
/* caller() should not report the automatic calls to &DB::sub */
if (PL_DBsub && GvCV(PL_DBsub) && cxix >= 0 &&
        ccstack[cxix].blk_sub.cv == GvCV(PL_DBsub))
    level++;
if (!level--)
    break;

ppport.h  view on Meta::CPAN

16664
16665
16666
16667
16668
16669
16670
16671
16672
16673
16674
if (CxTYPE(cx) == CXt_SUB || CxTYPE(cx) == CXt_FORMAT) {
    const I32 dbcxix = DPPP_dopoptosub_at(ccstack, cxix - 1);
    /* We expect that ccstack[dbcxix] is CXt_SUB, anyway, the
       field below is defined for any cx. */
    /* caller() should not report the automatic calls to &DB::sub */
    if (PL_DBsub && GvCV(PL_DBsub) && dbcxix >= 0 && ccstack[dbcxix].blk_sub.cv == GvCV(PL_DBsub))
        cx = &ccstack[dbcxix];
}
 
return cx;

 view all matches for this distribution


Alt-Crypt-RSA-BigInt

 view release on metacpan or  search on metacpan

lib/Crypt/RSA/Debug.pm  view on Meta::CPAN

17
18
19
20
21
22
23
24
25
26
27
my $DEBUG = 0;
 
sub debug{
    return unless $DEBUG;
    my ($caller, undef) = caller;
    my (undef,undef,$line,$sub) = caller(1); $sub =~ s/.*://;
    $sub = sprintf "%12s()%4d", $sub, $line;
    $sub .= " |  " . (shift); 
    $sub =~ s/\x00/[0]/g;
    $sub =~ s/\x01/[1]/g;
    $sub =~ s/\x02/[2]/g;

 view all matches for this distribution


Alt-Devel-GlobalDestruction-XS-Inline

 view release on metacpan or  search on metacpan

inc/Inline.pm  view on Meta::CPAN

85
86
87
88
89
90
91
92
93
94
95
sub import_heavy {
    local ($/, $") = ("\n", ' '); local ($\, $,);
 
    my $o;
    my ($pkg, $script) = caller(1);
    # Not sure what this is for. Let's see what breaks.
    # $pkg =~ s/^.*[\/\\]//;
    my $class = shift;
    if ($class ne 'Inline') {
        croak M01_usage_use($class) if $class =~ /^Inline::/;

 view all matches for this distribution


Alt-Math-Prime-FastSieve-Inline

 view release on metacpan or  search on metacpan

inc/Inline.pm  view on Meta::CPAN

85
86
87
88
89
90
91
92
93
94
95
sub import_heavy {
    local ($/, $") = ("\n", ' '); local ($\, $,);
 
    my $o;
    my ($pkg, $script) = caller(1);
    # Not sure what this is for. Let's see what breaks.
    # $pkg =~ s/^.*[\/\\]//;
    my $class = shift;
    if ($class ne 'Inline') {
        croak M01_usage_use($class) if $class =~ /^Inline::/;

 view all matches for this distribution


Alt-Module-Runtime-ButEUMM

 view release on metacpan or  search on metacpan

lib/Module/Runtime.pm  view on Meta::CPAN

129
130
131
132
133
134
135
136
137
138
139
        compose_module_name
);
my %export_ok = map { ($_ => undef) } @EXPORT_OK;
sub import {
        my $me = shift;
        my $callpkg = caller(0);
        my $errs = "";
        foreach(@_) {
                if(exists $export_ok{$_}) {
                        # We would need to do "no strict 'refs'" here
                        # if we had enabled strict at file scope.

lib/Module/Runtime.pm  view on Meta::CPAN

146
147
148
149
150
151
152
153
154
155
156
                        $errs .= "\"$_\" is not exported by the $me module\n";
                }
        }
        if($errs ne "") {
                die "${errs}Can't continue after import errors ".
                        "at @{[(caller(0))[1]]} line @{[(caller(0))[2]]}.\n";
        }
}
 
# Logic duplicated from Params::Classify.  Duplicating it here avoids
# an extensive and potentially circular dependency graph.

 view all matches for this distribution


Alt-Sub-Delete-NewPackageSeparator

 view release on metacpan or  search on metacpan

lib/Sub/Delete.pm  view on Meta::CPAN

23
24
25
26
27
28
29
30
31
32
33
my %sigils = qw( SCALAR $  ARRAY @  HASH % );
 
sub delete_sub {
        my $sub = shift;
        my($stashname, $key) = $sub =~ /(.*::)((?:(?!::).)*)\z/s
                ? ($1,$2) : (caller()."::", $sub);
        exists +(my $stash = \%$stashname)->{$key} or return;
        ref $stash->{$key} eq 'SCALAR' and  # perl5.10 constant
                delete $stash->{$key}, return;
        my $globname = "$stashname$key";
        my $glob = *$globname; # autovivify the glob in case future perl

 view all matches for this distribution


Alter

 view release on metacpan or  search on metacpan

lib/Alter/AlterXS_in_perl.pm  view on Meta::CPAN

22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
}
 
sub alter ($$) {
    @_ == 2 or croak "Usage: Alter::alter(obj, val)";
    my ( $obj, $val) = @_;
    corona( $obj)->{ caller()} = $val;
    $obj;
}
 
sub ego ($) {
    @_ == 1 or die "Usage: Alter::ego(obj)";
    my $obj = shift;
    corona( $obj)->{ caller()} ||= _vivify( caller());
}
 
sub is_xs { 0 }
 
### Autovivification

 view all matches for this distribution


Alzabo

 view release on metacpan or  search on metacpan

lib/Alzabo/Driver.pm  view on Meta::CPAN

35
36
37
38
39
40
41
42
43
44
45
{
    my $self = shift;
 
    unless ( $self->{dbh} )
    {
        my $sub = (caller(1))[3];
        Alzabo::Exception::Driver->throw( error => "Cannot call $sub before calling connect." );
    }
 
    $self->{dbh} = $self->_dbi_connect( $self->{connect_params} )
        if $$ != $self->{connect_pid};

lib/Alzabo/Driver.pm  view on Meta::CPAN

439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
{
    my $self = shift;
 
    $self->_ensure_valid_dbh;
 
    my $callee = (caller(1))[3];
 
    # More commits than begin_tran.  Not correct.
    if ( defined $self->{tran_count} )
    {
        $self->{tran_count}--;
    }
    else
    {
        my $caller = (caller(1))[3];
        require Carp;
        Carp::cluck( "$caller called commit without corresponding begin_work call\n" );
    }
 
    # Don't actually commit until we reach 'uber-commit'

lib/Alzabo/Driver.pm  view on Meta::CPAN

479
480
481
482
483
484
485
486
487
488
489
sub _virtual
{
    my $self = shift;
 
    my $sub = (caller(1))[3];
    Alzabo::Exception::VirtualMethod->throw( error =>
                                             "$sub is a virtual method and must be subclassed in " . ref $self );
}
 

 view all matches for this distribution


Amazon-SecretsManager

 view release on metacpan or  search on metacpan

lib/Amazon/SecretsManager.pm  view on Meta::CPAN

45
46
47
48
49
50
51
52
53
54
55
    AWS_SERVICE_URL_BASE => 'secretsmanager',
    TRUE                 => 1,
    FALSE                => 0
  };
 
__PACKAGE__->main() if ! caller();
 
sub new {
  my $class = shift;
  $class = ref($class) || $class;
  

 view all matches for this distribution


Amazon-SimpleDB

 view release on metacpan or  search on metacpan

t/99-pod-coverage.t  view on Meta::CPAN

3
4
5
6
7
8
9
10
11
plan skip_all => "Test::Pod::Coverage 1.00 required for testing POD coverage" if $@;
all_pod_coverage_ok( );
 
# Workaround for dumb bug (fixed in 5.8.7) where Test::Builder thinks that
# certain "die"s that happen inside evals are not actually inside evals,
# because caller() is broken if you turn on $^P like Module::Refresh does
#
# (I mean, if we've gotten to this line, then clearly the test didn't die, no?)
Test::Builder->new->{Test_Died} = 0;

 view all matches for this distribution


Ambrosia

 view release on metacpan or  search on metacpan

lib/Ambrosia/Assert.pm  view on Meta::CPAN

16
17
18
19
20
21
22
23
24
25
26
return if eval{$package->can('assert')};
 
assign(shift) if @_;
 
no strict 'refs';
my $package_instance = caller(0);
if ( debug_mode($PROCESS_MAP{$$}, @_) )
{
    *{"${package_instance}::assert"} = sub(&$) { goto &__assert; };
}
else

 view all matches for this distribution


Amon2-DBI

 view release on metacpan or  search on metacpan

lib/Amon2/DBI.pm  view on Meta::CPAN

56
57
58
59
60
61
62
63
64
65
66
        Scalar::Util::weaken($self->{private_txn_manager}->{dbh});
    }
    return $self->{private_txn_manager};
}
 
sub txn_scope { $_[0]->_txn_manager->txn_scope(caller => [caller(0)]) }
 
sub do_i {
    my $self = shift;
    my ($sql, @bind) = SQL::Interp::sql_interp(@_);
    $self->do($sql, {}, @bind);

 view all matches for this distribution


Amon2-Lite

 view release on metacpan or  search on metacpan

lib/Amon2/Lite.pm  view on Meta::CPAN

18
19
20
21
22
23
24
25
26
27
28
sub import {
    my $class = shift;
    no strict 'refs';
 
    my $router = Router::Simple->new();
    my $caller = caller(0);
 
    my $base_class = 'Amon2::Lite::_child_' . $COUNTER++;
    {
        no warnings;
        unshift @{"$base_class\::ISA"}, qw/Amon2 Amon2::Web/;

lib/Amon2/Lite.pm  view on Meta::CPAN

37
38
39
40
41
42
43
44
45
46
47
48
my $vpath = Data::Section::Simple->new($caller)->get_data_section();
my $orig_app = $app;
my $app_file_1;
my $app_file_2;
my $root1 = File::Spec->catdir( dirname((caller(0))[1]), 'static' );
my $root2 = File::Spec->catdir( dirname((caller(0))[1]) );
$app = sub {
    my $env = shift;
    if ((my $content = $vpath->{$env->{PATH_INFO}}) && $env->{PATH_INFO} =~ m{^/}) {
        my $ct = Plack::MIME->mime_type($env->{PATH_INFO});
        return [200, ['Content-Type' => $ct, 'Content-Length' => length($content)], [$content]];

lib/Amon2/Lite.pm  view on Meta::CPAN

100
101
102
103
104
105
106
107
108
109
110
*{"$caller\::router"} = sub { $router };
 
# any [qw/get post delete/] => '/bye' => sub { ... };
# any '/bye' => sub { ... };
*{"$caller\::any"} = sub ($$;$) {
    my $pkg = caller(0);
    if (@_==3) {
        my ($methods, $pattern, $code) = @_;
        $router->connect(
            $pattern,
            {code => $code, method => [ map { uc $_ } @$methods ]},

lib/Amon2/Lite.pm  view on Meta::CPAN

146
147
148
149
150
151
152
153
154
155
156
            return $c->res_404();
        }
    }
};
 
my $tmpl_dir = File::Spec->catdir(dirname((caller(0))[1]), 'tmpl');
*{"${base_class}::create_view"} = sub {
    $base_class->template_options();
};
*{"${base_class}::template_options"} = sub {
    my ($class, %options) = @_;

 view all matches for this distribution


Amon2-Plugin-LogDispatch

 view release on metacpan or  search on metacpan

inc/Module/Install.pm  view on Meta::CPAN

363
364
365
366
367
368
369
370
371
372
373
374
375
376
#####################################################################
# Common Utility Functions
 
sub _caller {
        my $depth = 0;
        my $call  = caller($depth);
        while ( $call eq __PACKAGE__ ) {
                $depth++;
                $call = caller($depth);
        }
        return $call;
}
 
# Done in evals to avoid confusing Perl::MinimumVersion

 view all matches for this distribution


Amon2-Plugin-Web-FormValidator-Simple

 view release on metacpan or  search on metacpan

inc/Module/Install.pm  view on Meta::CPAN

363
364
365
366
367
368
369
370
371
372
373
374
375
376
#####################################################################
# Common Utility Functions
 
sub _caller {
        my $depth = 0;
        my $call  = caller($depth);
        while ( $call eq __PACKAGE__ ) {
                $depth++;
                $call = caller($depth);
        }
        return $call;
}
 
# Done in evals to avoid confusing Perl::MinimumVersion

 view all matches for this distribution


Amon2-Web-Dispatcher-RouterSimple-Extended

 view release on metacpan or  search on metacpan

inc/Module/Install.pm  view on Meta::CPAN

363
364
365
366
367
368
369
370
371
372
373
374
375
376
#####################################################################
# Common Utility Functions
 
sub _caller {
        my $depth = 0;
        my $call  = caller($depth);
        while ( $call eq __PACKAGE__ ) {
                $depth++;
                $call = caller($depth);
        }
        return $call;
}
 
# Done in evals to avoid confusing Perl::MinimumVersion

 view all matches for this distribution


Amon2

 view release on metacpan or  search on metacpan

lib/Amon2/Setup/Flavor.pm  view on Meta::CPAN

27
28
29
30
31
32
33
34
35
36
37
sub infof {
    my $caller = do {
        my $x;
        for (1..10) {
            $x = caller($_);
            last if $x ne __PACKAGE__;
        }
        $x;
    };
    $caller =~ s/^Amon2::Setup:://;

 view all matches for this distribution


Analizo

 view release on metacpan or  search on metacpan

lib/Analizo/Model.pm  view on Meta::CPAN

370
371
372
373
374
375
376
377
378
379
380
    }
  }
 
} else {
  # listing raw dependency info
  foreach my $caller (grep { $self->_include_caller($_, @{$args{omit}}) } sort(keys(%{$self->calls}))) {
    foreach my $callee (grep { $self->_include_callee($_, $args{include_externals}, @{$args{omit}}) } sort(keys(%{$self->calls->{$caller}}))) {
      my $style = _reftype_to_style($self->calls->{$caller}->{$callee});
      $graph->add_edge($caller, $callee);
      $graph->set_edge_attribute($caller, $callee, 'style', $style);
      $graph->set_vertex_attribute($caller, 'group', $self->_function_to_module($caller));

lib/Analizo/Model.pm  view on Meta::CPAN

402
403
404
405
406
407
408
409
410
  return !grep { $function eq $_ } @omitted;
}
 
sub _include_callee {
  my ($self, $member, $include_externals, @omitted) = @_;
  return $self->_include_caller($member, @omitted) && ( exists($self->members->{$member}) || $include_externals );
}
 
1;

 view all matches for this distribution


Anansi-Class

 view release on metacpan or  search on metacpan

lib/Anansi/Class.pm  view on Meta::CPAN

204
205
206
207
208
209
210
211
212
213
214
=cut
 
 
sub import {
    my ($self, @parameters) = @_;
    my $caller = caller();
    foreach my $parameter (@parameters) {
        my $value = $self->implicate($caller, $parameter);
        *{$caller.'::'.$parameter} = $value if(defined($value));
    }
}

 view all matches for this distribution


Android-ElectricSheep-Automator

 view release on metacpan or  search on metacpan

lib/Android/ElectricSheep/Automator.pm  view on Meta::CPAN

80
81
82
83
84
85
86
87
88
89
90
91
# NOTE: without connecting to a device you can not use e.g. open_app(), swipe() etc.
sub new {
        my $class = ref($_[0]) || $_[0]; # aka proto
        my $params = $_[1] // {};
 
        my $parent = ( caller(1) )[3] || "N/A";
        my $whoami = ( caller(0) )[3];
 
        my $self = {
                '_private' => {
                        'confighash' => undef,
                        'configfile' => '', # this should never be undef

lib/Android/ElectricSheep/Automator.pm  view on Meta::CPAN

159
160
161
162
163
164
165
166
167
168
169
170
# or undef on failure
sub connect_device {
        my ($self, $params) = @_;
        $params //= {};
 
        my $parent = ( caller(1) )[3] || "N/A";
        my $whoami = ( caller(0) )[3];
 
        my $log = $self->log();
        my $verbosity = $self->verbosity;
 
        my ($what_device, $m);

lib/Android/ElectricSheep/Automator.pm  view on Meta::CPAN

218
219
220
221
222
223
224
225
226
227
228
229
#                  XML string, ready to do XPath queries
# it needs that connect_device() to have been called prior to this call
sub dump_current_screen_ui {
        my ($self, $params) = @_;
 
        my $parent = ( caller(1) )[3] || "N/A";
        my $whoami = ( caller(0) )[3];
 
        my $log = $self->log();
        my $verbosity = $self->verbosity;
 
        if( ! $self->is_device_connected() ){ $log->error("${whoami} (via $parent), line ".__LINE__." : error, you need to connect a device to the desktop and ALSO explicitly call ".'device_connected()'." before calling this."); return undef }

lib/Android/ElectricSheep/Automator.pm  view on Meta::CPAN

314
315
316
317
318
319
320
321
322
323
324
# it needs that connect_device() to have been called prior to this call
sub swipe {
        my ($self, $params) = @_;
        $params //= {};
 
        my $parent = ( caller(1) )[3] || "N/A";
        my $whoami = ( caller(0) )[3];
        my $log = $self->log();
        my $verbosity = $self->verbosity();
 
        if( ! $self->is_device_connected() ){ $log->error("${whoami} (via $parent), line ".__LINE__." : error, you need to connect a device to the desktop and ALSO explicitly call ".'connect_device()'." before calling this."); return 1 }

lib/Android/ElectricSheep/Automator.pm  view on Meta::CPAN

438
439
440
441
442
443
444
445
446
447
448
#           This will append to apps() the result.
sub find_installed_apps {
        my ($self, $params) = @_;
        $params //= {};
 
        my $parent = ( caller(1) )[3] || "N/A";
        my $whoami = ( caller(0) )[3];
        my $log = $self->log();
        my $verbosity = $self->verbosity();
 
        if( ! $self->is_device_connected() ){ $log->error("${whoami} (via $parent), line ".__LINE__." : error, you need to connect a device to the desktop and ALSO explicitly call ".'connect_device()'." before calling this."); return undef }

lib/Android/ElectricSheep/Automator.pm  view on Meta::CPAN

515
516
517
518
519
520
521
522
523
524
525
526
# It returns undef on failure.
sub search_app {
        my ($self, $params) = @_;
        $params //= {};
 
        my $parent = ( caller(1) )[3] || "N/A";
        my $whoami = ( caller(0) )[3];
        my $log = $self->log();
        my $verbosity = $self->verbosity();
 
        my $package;
        if( ! exists($params->{'package'}) || ! defined($package=$params->{'package'}) ){ $log->error("${whoami} (via $parent), line ".__LINE__." : error, input parameter 'package' was not specified, it must be a package name or a compiled regex (e.g. via "...

lib/Android/ElectricSheep/Automator.pm  view on Meta::CPAN

587
588
589
590
591
592
593
594
595
596
597
# it needs that connect_device() to have been called prior to this call
sub open_app {
        my ($self, $params) = @_;
        $params //= {};
 
        my $parent = ( caller(1) )[3] || "N/A";
        my $whoami = ( caller(0) )[3];
        my $log = $self->log();
        my $verbosity = $self->verbosity();
 
        if( ! $self->is_device_connected() ){ $log->error("${whoami} (via $parent), line ".__LINE__." : error, you need to connect a device to the desktop and ALSO explicitly call ".'connect_device()'." before calling this."); return undef }

lib/Android/ElectricSheep/Automator.pm  view on Meta::CPAN

698
699
700
701
702
703
704
705
706
707
708
# it needs that connect_device() to have been called prior to this call
sub close_app {
        my ($self, $params) = @_;
        $params //= {};
 
        my $parent = ( caller(1) )[3] || "N/A";
        my $whoami = ( caller(0) )[3];
        my $log = $self->log();
        my $verbosity = $self->verbosity();
 
        if( ! $self->is_device_connected() ){ $log->error("${whoami} (via $parent), line ".__LINE__." : error, you need to connect a device to the desktop and ALSO explicitly call ".'connect_device()'." before calling this."); return undef }

lib/Android/ElectricSheep/Automator.pm  view on Meta::CPAN

789
790
791
792
793
794
795
796
797
798
799
# it needs that connect_device() to have been called prior to this call
sub tap {
        my ($self, $params) = @_;
        $params //= {};
 
        my $parent = ( caller(1) )[3] || "N/A";
        my $whoami = ( caller(0) )[3];
        my $log = $self->log();
        my $verbosity = $self->verbosity();
 
        if( ! $self->is_device_connected() ){ $log->error("${whoami} (via $parent), line ".__LINE__." : error, you need to connect a device to the desktop and ALSO explicitly call ".'connect_device()'." before calling this."); return undef }

lib/Android/ElectricSheep/Automator.pm  view on Meta::CPAN

818
819
820
821
822
823
824
825
826
827
828
# it needs that connect_device() to have been called prior to this call
sub input_text {
        my ($self, $params) = @_;
        $params //= {};
 
        my $parent = ( caller(1) )[3] || "N/A";
        my $whoami = ( caller(0) )[3];
        my $log = $self->log();
        my $verbosity = $self->verbosity();
 
        if( ! $self->is_device_connected() ){ $log->error("${whoami} (via $parent), line ".__LINE__." : error, you need to connect a device to the desktop and ALSO explicitly call ".'connect_device()'." before calling this."); return undef }

lib/Android/ElectricSheep/Automator.pm  view on Meta::CPAN

856
857
858
859
860
861
862
863
864
865
866
# it needs that connect_device() to have been called prior to this call
sub clear_input_field {
        my ($self, $params) = @_;
        $params //= {};
 
        my $parent = ( caller(1) )[3] || "N/A";
        my $whoami = ( caller(0) )[3];
        my $log = $self->log();
        my $verbosity = $self->verbosity();
 
        if( ! $self->is_device_connected() ){ $log->error("${whoami} (via $parent), line ".__LINE__." : error, you need to connect a device to the desktop and ALSO explicitly call ".'connect_device()'." before calling this."); return undef }

lib/Android/ElectricSheep/Automator.pm  view on Meta::CPAN

930
931
932
933
934
935
936
937
938
939
940
941
# NOTE: it uses _ps_parse_output() which is copied verbatim from System::Process
#       I wish they would load ps info from a string rather than running their own `ps`
sub list_running_processes {
        my ($self, $params) = @_;
 
        my $parent = ( caller(1) )[3] || "N/A";
        my $whoami = ( caller(0) )[3];
 
        my $log = $self->log();
        my $verbosity = $self->verbosity;
 
        if( ! $self->is_device_connected() ){ $log->error("${whoami} (via $parent), line ".__LINE__." : error, you need to connect a device to the desktop and ALSO explicitly call ".'device_connected()'." before calling this."); return undef }

lib/Android/ElectricSheep/Automator.pm  view on Meta::CPAN

1016
1017
1018
1019
1020
1021
1022
1023
1024
1025
1026
# it needs that connect_device() to have been called prior to this call
sub geofix {
        my ($self, $params) = @_;
        $params //= {};
 
        my $parent = ( caller(1) )[3] || "N/A";
        my $whoami = ( caller(0) )[3];
        my $log = $self->log();
        my $verbosity = $self->verbosity();
 
        if( ! $self->is_device_connected() ){ $log->error("${whoami} (via $parent), line ".__LINE__." : error, you need to connect a device to the desktop and ALSO explicitly call ".'connect_device()'." before calling this."); return undef }

lib/Android/ElectricSheep/Automator.pm  view on Meta::CPAN

1049
1050
1051
1052
1053
1054
1055
1056
1057
1058
1059
# it needs that connect_device() to have been called prior to this call
sub dump_current_location {
        my ($self, $params) = @_;
        $params //= {};
 
        my $parent = ( caller(1) )[3] || "N/A";
        my $whoami = ( caller(0) )[3];
        my $log = $self->log();
        my $verbosity = $self->verbosity();
 
        if( ! $self->is_device_connected() ){ $log->error("${whoami} (via $parent), line ".__LINE__." : error, you need to connect a device to the desktop and ALSO explicitly call ".'connect_device()'." before calling this."); return undef }

lib/Android/ElectricSheep/Automator.pm  view on Meta::CPAN

1104
1105
1106
1107
1108
1109
1110
1111
1112
1113
1114
# it needs that connect_device() to have been called prior to this call
sub list_physical_displays {
        my ($self, $params) = @_;
        $params //= {};
 
        my $parent = ( caller(1) )[3] || "N/A";
        my $whoami = ( caller(0) )[3];
        my $log = $self->log();
        my $verbosity = $self->verbosity();
 
        if( ! $self->is_device_connected() ){ $log->error("${whoami} (via $parent), line ".__LINE__." : error, you need to connect a device to the desktop and ALSO explicitly call ".'connect_device()'." before calling this."); return undef }

lib/Android/ElectricSheep/Automator.pm  view on Meta::CPAN

1133
1134
1135
1136
1137
1138
1139
1140
1141
1142
1143
1144
# on success.
# it needs that connect_device() to have been called prior to this call
sub dump_current_screen_shot {
        my ($self, $params) = @_;
 
        my $parent = ( caller(1) )[3] || "N/A";
        my $whoami = ( caller(0) )[3];
 
        my $log = $self->log();
        my $verbosity = $self->verbosity;
 
        if( ! $self->is_device_connected() ){ $log->error("${whoami} (via $parent), line ".__LINE__." : error, you need to connect a device to the desktop and ALSO explicitly call ".'device_connected()'." before calling this."); return undef }

lib/Android/ElectricSheep/Automator.pm  view on Meta::CPAN

1201
1202
1203
1204
1205
1206
1207
1208
1209
1210
1211
1212
# It returns 1 on failure, 0 on success.
# it needs that connect_device() to have been called prior to this call
sub dump_current_screen_video {
        my ($self, $params) = @_;
 
        my $parent = ( caller(1) )[3] || "N/A";
        my $whoami = ( caller(0) )[3];
 
        my $log = $self->log();
        my $verbosity = $self->verbosity;
 
        if( ! $self->is_device_connected() ){ $log->error("${whoami} (via $parent), line ".__LINE__." : error, you need to connect a device to the desktop and ALSO explicitly call ".'device_connected()'." before calling this."); return 1 }

lib/Android/ElectricSheep/Automator.pm  view on Meta::CPAN

1280
1281
1282
1283
1284
1285
1286
1287
1288
1289
1290
# it needs that connect_device() to have been called prior to this call
sub wake_up {
        my ($self, $params) = @_;
        $params //= {};
 
        my $parent = ( caller(1) )[3] || "N/A";
        my $whoami = ( caller(0) )[3];
        my $log = $self->log();
        my $verbosity = $self->verbosity();
 
        if( ! $self->is_device_connected() ){ $log->error("${whoami} (via $parent), line ".__LINE__." : error, you need to connect a device to the desktop and ALSO explicitly call ".'connect_device()'." before calling this."); return undef }

lib/Android/ElectricSheep/Automator.pm  view on Meta::CPAN

1302
1303
1304
1305
1306
1307
1308
1309
1310
1311
1312
# it needs that connect_device() to have been called prior to this call
sub home_screen {
        my ($self, $params) = @_;
        $params //= {};
 
        my $parent = ( caller(1) )[3] || "N/A";
        my $whoami = ( caller(0) )[3];
        my $log = $self->log();
        my $verbosity = $self->verbosity();
 
        if( ! $self->is_device_connected() ){ $log->error("${whoami} (via $parent), line ".__LINE__." : error, you need to connect a device to the desktop and ALSO explicitly call ".'connect_device()'." before calling this."); return undef }

lib/Android/ElectricSheep/Automator.pm  view on Meta::CPAN

1326
1327
1328
1329
1330
1331
1332
1333
1334
1335
1336
# it needs that connect_device() to have been called prior to this call
sub     next_screen {
        my ($self, $params) = @_;
        $params //= {};
 
        my $parent = ( caller(1) )[3] || "N/A";
        my $whoami = ( caller(0) )[3];
        my $log = $self->log();
        my $verbosity = $self->verbosity();
 
        if( ! $self->is_device_connected() ){ $log->error("${whoami} (via $parent), line ".__LINE__." : error, you need to connect a device to the desktop and ALSO explicitly call ".'connect_device()'." before calling this."); return undef }

lib/Android/ElectricSheep/Automator.pm  view on Meta::CPAN

1345
1346
1347
1348
1349
1350
1351
1352
1353
1354
1355
# it needs that connect_device() to have been called prior to this call
sub     previous_screen {
        my ($self, $params) = @_;
        $params //= {};
 
        my $parent = ( caller(1) )[3] || "N/A";
        my $whoami = ( caller(0) )[3];
        my $log = $self->log();
        my $verbosity = $self->verbosity();
 
        if( ! $self->is_device_connected() ){ $log->error("${whoami} (via $parent), line ".__LINE__." : error, you need to connect a device to the desktop and ALSO explicitly call ".'connect_device()'." before calling this."); return undef }

lib/Android/ElectricSheep/Automator.pm  view on Meta::CPAN

1364
1365
1366
1367
1368
1369
1370
1371
1372
1373
1374
sub     navigation_menu_back_button {
        my ($self, $params) = @_;
        $params //= {};
 
        my $parent = ( caller(1) )[3] || "N/A";
        my $whoami = ( caller(0) )[3];
        my $log = $self->log();
        my $verbosity = $self->verbosity();
 
        if( ! $self->is_device_connected() ){ $log->error("${whoami} (via $parent), line ".__LINE__." : error, you need to connect a device to the desktop and ALSO explicitly call ".'connect_device()'." before calling this."); return undef }

lib/Android/ElectricSheep/Automator.pm  view on Meta::CPAN

1387
1388
1389
1390
1391
1392
1393
1394
1395
1396
1397
sub     navigation_menu_home_button {
        my ($self, $params) = @_;
        $params //= {};
 
        my $parent = ( caller(1) )[3] || "N/A";
        my $whoami = ( caller(0) )[3];
        my $log = $self->log();
        my $verbosity = $self->verbosity();
 
        if( ! $self->is_device_connected() ){ $log->error("${whoami} (via $parent), line ".__LINE__." : error, you need to connect a device to the desktop and ALSO explicitly call ".'connect_device()'." before calling this."); return undef }

lib/Android/ElectricSheep/Automator.pm  view on Meta::CPAN

1411
1412
1413
1414
1415
1416
1417
1418
1419
1420
1421
sub     navigation_menu_overview_button {
        my ($self, $params) = @_;
        $params //= {};
 
        my $parent = ( caller(1) )[3] || "N/A";
        my $whoami = ( caller(0) )[3];
        my $log = $self->log();
        my $verbosity = $self->verbosity();
 
        if( ! $self->is_device_connected() ){ $log->error("${whoami} (via $parent), line ".__LINE__." : error, you need to connect a device to the desktop and ALSO explicitly call ".'connect_device()'." before calling this."); return undef }

lib/Android/ElectricSheep/Automator.pm  view on Meta::CPAN

1436
1437
1438
1439
1440
1441
1442
1443
1444
1445
1446
# it needs that connect_device() to have been called prior to this call
sub find_all_apps_roundabout_way {
        my ($self, $params) = @_;
        $params //= {};
 
        my $parent = ( caller(1) )[3] || "N/A";
        my $whoami = ( caller(0) )[3];
        my $log = $self->log();
        my $verbosity = $self->verbosity();
 
        if( ! $self->is_device_connected() ){ $log->error("${whoami} (via $parent), line ".__LINE__." : error, you need to connect a device to the desktop and ALSO explicitly call ".'connect_device()'." before calling this."); return undef }

lib/Android/ElectricSheep/Automator.pm  view on Meta::CPAN

1474
1475
1476
1477
1478
1479
1480
1481
1482
1483
1484
# it needs that connect_device() to have been called prior to this call
sub open_app_roundabout_way {
        my ($self, $params) = @_;
        $params //= {};
 
        my $parent = ( caller(1) )[3] || "N/A";
        my $whoami = ( caller(0) )[3];
        my $log = $self->log();
        my $verbosity = $self->verbosity();
 
        if( ! $self->is_device_connected() ){ $log->error("${whoami} (via $parent), line ".__LINE__." : error, you need to connect a device to the desktop and ALSO explicitly call ".'connect_device()'." before calling this."); return undef }

lib/Android/ElectricSheep/Automator.pm  view on Meta::CPAN

1537
1538
1539
1540
1541
1542
1543
1544
1545
1546
1547
1548
1549
1550
1551
1552
1553
1554
1555
1556
1557
1558
# setting a verbosity level will also spawn a chain of other debug subs,
sub verbosity {
        my ($self, $m) = @_;
        my $log = $self->log();
        if( defined $m ){
                my $parent = ( caller(1) )[3] || "N/A";
                my $whoami = ( caller(0) )[3];
                $self->{'_private'}->{'debug'}->{'verbosity'} = $m;
                if( defined $self->adb ){ $self->adb->{'verbosity'} = $m }
        }
        return $self->{'_private'}->{'debug'}->{'verbosity'}
}
sub cleanup {
        my ($self, $m) = @_;
        my $log = $self->log();
        if( defined $m ){
                my $parent = ( caller(1) )[3] || "N/A";
                my $whoami = ( caller(0) )[3];
                $self->{'_private'}->{'debug'}->{'cleanup'} = $m;
        }
        return $self->{'_private'}->{'debug'}->{'cleanup'}
}

lib/Android/ElectricSheep/Automator.pm  view on Meta::CPAN

1562
1563
1564
1565
1566
1567
1568
1569
1570
1571
1572
1573
sub configfile {
        my ($self, $infile) = @_;
 
        return $self->{'_private'}->{'configfile'} unless defined $infile;
 
        my $parent = ( caller(1) )[3] || "N/A";
        my $whoami = ( caller(0) )[3];
 
        # this can be called before the logger is created, so create a temp logger for this
        my $log = $self->log() // Mojo::Log->new();
 
        my $ch = parse_configfile($infile, $log);

lib/Android/ElectricSheep/Automator.pm  view on Meta::CPAN

1584
1585
1586
1587
1588
1589
1590
1591
1592
1593
1594
1595
# return configfile or read+check+set a configfile,
# returns undef on failure or the configfile on success
sub parse_configfile {
        my ($infile, $log) = @_;
 
        my $parent = ( caller(1) )[3] || "N/A";
        my $whoami = ( caller(0) )[3];
 
        # this can be called before the logger is created, so create a temp logger for this
        $log //= Mojo::Log->new();
 
        my $ch = Config::JSON::Enhanced::config2perl({

lib/Android/ElectricSheep/Automator.pm  view on Meta::CPAN

1614
1615
1616
1617
1618
1619
1620
1621
1622
1623
1624
1625
sub confighash {
        my ($self, $m) = @_;
 
        if( ! defined $m ){ return $self->{'_private'}->{'confighash'} }
 
        my $parent = ( caller(1) )[3] || "N/A";
        my $whoami = ( caller(0) )[3];
 
        #print STDOUT "${whoami} (via $parent), line ".__LINE__." : called ...\n";
 
        # we are storing specified confighash but first check it for some fields
        # required fields:

lib/Android/ElectricSheep/Automator.pm  view on Meta::CPAN

1659
1660
1661
1662
1663
1664
1665
1666
1667
1668
1669
1670
# initialises
# do the verbositys
# returns 1 on failure, 0 on success
sub init {
        my ($self, $params) = @_;
        my $parent = ( caller(1) )[3] || "N/A";
        my $whoami = ( caller(0) )[3];
 
        # Confighash
        # first see if either user specified a config file or the default is present and read it,
        # then we will overwrite with user-specified params if any
        my ($configfile, $confighash);

lib/Android/ElectricSheep/Automator.pm  view on Meta::CPAN

1739
1740
1741
1742
1743
1744
1745
1746
1747
1748
1749
# initialises module-specific things, no need to copy this to other modules
# returns 1 on failure, 0 on success
sub init_module_specific {
        my ($self, $params) = @_;
        my $parent = ( caller(1) )[3] || "N/A";
        my $whoami = ( caller(0) )[3];
        my $log = $self->log();
        my $verbosity = $self->verbosity();
        my $confighash = $self->confighash();
        if( $verbosity > 0 ){ $log->info("${whoami} (via $parent), line ".__LINE__." : called ...") }

lib/Android/ElectricSheep/Automator.pm  view on Meta::CPAN

1788
1789
1790
1791
1792
1793
1794
1795
1796
1797
1798
        return 0 # success
}
 
sub disconnect_device {
        my ($self, $params) = @_;
        my $parent = ( caller(1) )[3] || "N/A";
        my $whoami = ( caller(0) )[3];
        my $log = $self->log();
        my $verbosity = $self->verbosity();
 
        if( $verbosity > 0 ){ $log->info("${whoami} (via $parent), line ".__LINE__." : called ...") }

lib/Android/ElectricSheep/Automator.pm  view on Meta::CPAN

1812
1813
1814
1815
1816
1817
1818
1819
1820
1821
1822
# On failure it returns undef
# On success it creates a new DeviceProperties Object which is saved in $self
# and also returned to caller
sub find_current_device_properties {
        my ($self, $params) = @_;
        my $parent = ( caller(1) )[3] || "N/A";
        my $whoami = ( caller(0) )[3];
        my $log = $self->log();
        my $verbosity = $self->verbosity();
        my $confighash = $self->confighash();
        if( $verbosity > 0 ){ $log->info("${whoami} (via $parent), line ".__LINE__." : called ...") }

 view all matches for this distribution


Anki-Import

 view release on metacpan or  search on metacpan

share/log_config/anki-import.cfg  view on Meta::CPAN

68
69
70
71
72
73
74
75
76
77
78
79
80
81
log4perl.appender.info.layout=PatternLayout
log4perl.appender.warn.layout=PatternLayout
log4perl.appender.error.layout=PatternLayout
log4perl.appender.fatal.layout=PatternLayout
 
log4j.PatternLayout.cspec.E = sub { return [caller(5)]->[1]; };
log4j.PatternLayout.cspec.e = sub { return [caller(5)]->[2]; };
#log4j.PatternLayout.cspec.D = sub { use Data::Dumper qw(Dumper); return Dumper($_[1]); };
log4j.PatternLayout.cspec.s = sub { return [caller(6)]->[1] . ': ' . [caller(6)]->[2]; };
 
log4perl.appender.trace.layout.ConversionPattern=[%-5p] %-80m %c: %e%n
log4perl.appender.debug.layout.ConversionPattern=[%-5p] %c: %e%n        %8m%n
log4perl.appender.info.layout.ConversionPattern= [%-5p] %-80m %c: %e%n
#log4perl.appender.info.layout.ConversionPattern= [%-5p] %-80m %n

 view all matches for this distribution


Announcements

 view release on metacpan or  search on metacpan

inc/Module/Install.pm  view on Meta::CPAN

363
364
365
366
367
368
369
370
371
372
373
374
375
376
#####################################################################
# Common Utility Functions
 
sub _caller {
        my $depth = 0;
        my $call  = caller($depth);
        while ( $call eq __PACKAGE__ ) {
                $depth++;
                $call = caller($depth);
        }
        return $call;
}
 
# Done in evals to avoid confusing Perl::MinimumVersion

 view all matches for this distribution


Ansible

 view release on metacpan or  search on metacpan

lib/Ansible.pm  view on Meta::CPAN

691
692
693
694
695
696
697
698
699
700
701
    return join('', @r);
}
 
sub callerlevels {
    my $n = 1;
    1 while caller($n ++);
    return $n;
}
 
sub mget {
    my ($self, @designators) = @_;

 view all matches for this distribution


Antsy

 view release on metacpan or  search on metacpan

lib/Antsy.pm  view on Meta::CPAN

502
503
504
505
506
507
508
509
510
511
512
sub _is_iterm { _is_term_type( _iterm_id() ) }
 
sub _iterm_seq ( $command, @args ) {
        unless( _is_iterm() ) {
                my $sub = ( caller(1) )[3];
                carp( "$sub only works in iTerm2" );
                return;
                }
 
        OSC() . join( ';', @args, '' ) . $command . ST();

lib/Antsy.pm  view on Meta::CPAN

592
593
594
595
596
597
598
599
600
601
602
=cut
 
sub _osc_1337 ( $content ) {
        unless( _is_iterm() ) {
                my $sub = ( caller(1) )[3];
                carp( "$sub only works in iTerm2" );
                return;
                }
 
        OSC() . 1337 . ';' . $content . ST()

 view all matches for this distribution


Any-Moose-Convert

 view release on metacpan or  search on metacpan

inc/Module/Install.pm  view on Meta::CPAN

363
364
365
366
367
368
369
370
371
372
373
374
375
376
#####################################################################
# Common Utility Functions
 
sub _caller {
        my $depth = 0;
        my $call  = caller($depth);
        while ( $call eq __PACKAGE__ ) {
                $depth++;
                $call = caller($depth);
        }
        return $call;
}
 
# Done in evals to avoid confusing Perl::MinimumVersion

 view all matches for this distribution


AnyEvent-APNS

 view release on metacpan or  search on metacpan

inc/Module/Install.pm  view on Meta::CPAN

363
364
365
366
367
368
369
370
371
372
373
374
375
376
#####################################################################
# Common Utility Functions
 
sub _caller {
        my $depth = 0;
        my $call  = caller($depth);
        while ( $call eq __PACKAGE__ ) {
                $depth++;
                $call = caller($depth);
        }
        return $call;
}
 
# Done in evals to avoid confusing Perl::MinimumVersion

 view all matches for this distribution


AnyEvent-Atom-Stream

 view release on metacpan or  search on metacpan

inc/Module/Install.pm  view on Meta::CPAN

338
339
340
341
342
343
344
345
346
347
348
349
350
351
#####################################################################
# Common Utility Functions
 
sub _caller {
        my $depth = 0;
        my $call  = caller($depth);
        while ( $call eq __PACKAGE__ ) {
                $depth++;
                $call = caller($depth);
        }
        return $call;
}
 
sub _read {

 view all matches for this distribution


( run in 2.264 seconds using v1.01-cache-2.11-cpan-26ccb49234f )