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


Android-Build

 view release on metacpan or  search on metacpan

lib/Android/Build.pm  view on Meta::CPAN

283
284
285
286
287
288
289
290
291
292
293
  android:targetSdkVersion="$targetSdk"/>
<application
  android:allowBackup="true"
  android:icon="\@drawable/ic_launcher"
  android:largeHeap="true"
  android:debuggable="true"
  android:hardwareAccelerated="true"
  android:label="\@string/app_name">
  <activity
    android:name=".$activity"
    android:configChanges="keyboard|keyboardHidden|orientation|screenSize"

lib/Android/Build.pm  view on Meta::CPAN

301
302
303
304
305
306
307
308
309
310
311
    </activity>
  </application>
  $permissions
</manifest>
END
  $manifest =~ s/android:debuggable="true"//gs unless $android->debug;
  overWriteFile($man, $manifest);
 }
 
#-------------------------------------------------------------------------------
# Create resources for app

lib/Android/Build.pm  view on Meta::CPAN

401
402
403
404
405
406
407
408
409
410
411
my $keyStoreFile = $android->keyStoreFileX;
-e $keyStoreFile or confess"Key store file does not exists:\n$keyStoreFile\n";
my $keyAlias     = $android->keyAliasX;
my $keyStorePwd  = $android->keyStorePwd;
 
my $alg = $android->debug ? '' : "-sigalg SHA1withRSA -digestalg SHA1";
 
my $c =
  "echo $keyStorePwd |".
  "jarsigner $alg -keystore $keyStoreFile $apkFile $keyAlias";
my $s = zzz($c);

lib/Android/Build.pm  view on Meta::CPAN

607
608
609
610
611
612
613
614
615
616
617
genLValueScalarMethods(qw(activity));                                         # Activity name: default is B<Activity>. The name of the activity to start on your android device: L<device|/device> is L<package|/package>/L<Activity|/Activity>
genLValueScalarMethods(qw(assets));                                           # A hash containing your assets folder (if any).  Each key is the file name in the assets folder, each corresponding value is the data for that file. The keys of this has...
genLValueScalarMethods(qw(buildTools));                                       # Name of the folder containing the build tools to be used to build the app, see L<prerequisites|/prerequisites>
genLValueScalarMethods(qw(buildFolder));                                      # Name of a folder in which to build the app, The default is B</tmp/app/>. If you wish to include assets with your app, specify a named build folder and load it with the ...
genLValueScalarMethods(qw(classes));                                          # A folder containing precompiled java classes and jar files that you wish to L<lint|/lint> against.
genLValueScalarMethods(qw(debug));                                            # The app will be debuggable if this option is true.
genLValueScalarMethods(qw(device));                                           # Device to run on, default is the only emulator or specify '-d', '-e', or '-s SERIAL' per L<adb|http://developer.android.com/guide/developing/tools/adb.html>
genLValueScalarMethods(qw(fastIcons));                                        # Create icons in parallel if true - the default is to create them serially which takes more elapsed time.
genLValueScalarMethods(qw(icon));                                             # Jpg file containing a picture that will be converted and scaled by L<ImageMagick|http://imagemagick.org/script/index.php> to make an icon for the app, default is B<icon...
genLValueScalarMethods(qw(keyAlias));                                         # Alias of the key in your key store file which will be used to sign this app. See L<Signing key|/Signing key> for how to generate a key.
genLValueScalarMethods(qw(keyStoreFile));                                     # Name of your key store file.  See L<Signing key|/Signing key> for how to generate a key.

 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

48
49
50
51
52
53
54
55
56
57
58
</* and <% vars %> and <% verbatim sections %> */>
{
        "adb" : {
                "path-to-executable" : "/usr/local/android-sdk/platform-tools/adb"
        },
        "debug" : {
                "verbosity" : 0,
                </* cleanup temp files on exit */>
                "cleanup" : 1
        },
        "logger" : {

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

88
89
90
91
92
93
94
95
96
97
98
my $self = {
        '_private' => {
                'confighash' => undef,
                'configfile' => '', # this should never be undef
                'Android::ADB' => undef,
                'debug' => {
                        'verbosity' => 0,
                        'cleanup' => 1,
                },
                'log' => {
                        'logger-object' => undef,

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

135
136
137
138
139
140
141
142
143
144
if( $self->init_module_specific($params) ){ $log->error("${whoami} (via $parent), line ".__LINE__." : error, call to init_module_specific() has failed."); return undef }
 
# optional params, defaults exist above or in the configfile
if( exists($params->{'verbosity'}) && defined($params->{'verbosity'}) ){ $self->verbosity($params->{'verbosity'}) } # later we will call verbosity()
if( exists($params->{'cleanup'}) && defined($params->{'cleanup'}) ){ $self->cleanup($params->{'cleanup'}) }
else { $self->cleanup($self->confighash->{'debug'}->{'cleanup'}) }
 
my $verbosity = $self->verbosity;
 
if( $verbosity > 0 ){ $log->info("${whoami} (via $parent), line ".__LINE__." : done, success (verbosity is set to ".$self->verbosity." and cleanup to ".$self->cleanup.").") }

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

1193
1194
1195
1196
1197
1198
1199
1200
1201
1202
1203
# It takes a video recording of current screen on device and
# saves its to the specified file ($filename).
# Optionally specify 'time-limit' or a default of 10s is used.
# Optionally specify 'bit-rate'.
# Optionally specify %size = ('width' => ..., 'height' => ...)
# Optionally specify if $bugreport==1, then Android will overlay debug info on movie.
# Optionally specify 'display-id'.
# Output format of recording is MP4.
# 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 {

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

1532
1533
1534
1535
1536
1537
1538
1539
1540
1541
1542
1543
1544
1545
1546
1547
1548
1549
1550
1551
1552
1553
1554
1555
1556
1557
1558
1559
1560
1561
1562
sub apps_roundabout_way { return $_[0]->{'apps-roundabout-way'} }
sub adb { return $_[0]->{'_private'}->{'Android::ADB'} }
sub log { return $_[0]->{'_private'}->{'log'}->{'logger-object'} }
# returns the current verbosity level optionally setting its value
# Value must be an integer >= 0
# 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'}
}
 
# return configfile or read+check+set a configfile,
# returns undef on failure or the configfile on success
sub configfile {

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

1621
1622
1623
1624
1625
1626
1627
1628
1629
1630
1631
1632
1633
1634
1635
1636
1637
1638
1639
1640
1641
1642
1643
#print STDOUT "${whoami} (via $parent), line ".__LINE__." : called ...\n";
 
# we are storing specified confighash but first check it for some fields
# required fields:
for ('adb', 'debug', 'logger'){
        if( ! exists($m->{$_}) || ! defined($m->{$_}) ){ print STDERR "${whoami} (via $parent), line ".__LINE__." : error, configuration does not have key '$_'.\n"; return undef }
}
 
my $x;
# adb params
$x = $m->{'adb'};
for ('path-to-executable'){
        if( ! exists($x->{$_}) || ! defined($x->{$_}) ){ print STDERR "${whoami} (via $parent), line ".__LINE__." : error, configuration does not have key '$_'.\n"; return undef }
}
 
# debug params
$x = $m->{'debug'};
if( exists($x->{'verbosity'}) && defined($x->{'verbosity'}) ){
        $self->verbosity($x->{'verbosity'});
}
if( exists($x->{'cleanup'}) && defined($x->{'cleanup'}) ){
        $self->cleanup($x->{'cleanup'});

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

1716
1717
1718
1719
1720
1721
1722
1723
1724
1725
1726
1727
1728
1729
1730
1731
1732
1733
1734
1735
#  2. check if exists in confighash
#  3. set default value
my $v;
if( exists($params->{'verbosity'}) && defined($params->{'verbosity'}) ){
        $v = $params->{'verbosity'};
} elsif( exists($confighash->{'debug'}) && exists($confighash->{'debug'}->{'verbosity'}) && defined($confighash->{'debug'}->{'verbosity'}) ){
        $v = $confighash->{'debug'}->{'verbosity'};
} else {
        $v = 0; # default
}
if( $self->verbosity($v) < 0 ){ $log->error("${whoami} (via $parent), line ".__LINE__." : error, call to 'verbosity()' has failed for value '$v'."); return 1 }
 
if( exists($params->{'cleanup'}) && defined($params->{'cleanup'}) ){
        $v = $params->{'cleanup'};
} elsif( exists($confighash->{'debug'}) && exists($confighash->{'debug'}->{'cleanup'}) && defined($confighash->{'debug'}->{'cleanup'}) ){
        $v = $confighash->{'debug'}->{'cleanup'};
} else {
        $v = 0; # default
}
if( $self->cleanup($v) < 0 ){ $log->error("${whoami} (via $parent), line ".__LINE__." : error, call to 'cleanup()' has failed for value '$v'."); return 1 }

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

1861
1862
1863
1864
1865
1866
1867
1868
1869
1870
1871
Current distribution is extremely alpha. API may change.
 
=head1 SYNOPSIS
 
The present package fascilitates the control
of a USB-debugging-enabled
Android device, e.g. a smartphone,
from a desktop computer using Perl.
It's basically a thickishly thin wrapper
to the omnipotent Android Debug Bridge (adb)
program.

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

1950
1951
1952
1953
1954
1955
1956
1957
1958
1959
1960
{
  "adb" : {
      "path-to-executable" : "/usr/local/android-sdk/platform-tools/adb"
  },
  "debug" : {
      "verbosity" : 0,
      </* cleanup temp files on exit */>
      "cleanup" : 1
  },
  "logger" : {

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

2160
2161
2162
2163
2164
2165
2166
2167
2168
2169
HASH_REF with keys C<width> and C<height>, in pixels. Default is "I<the
device's main display resolution>".
 
=item B<C<bugreport>>
 
optionally set this flag to 1 to have Android overlay debug information
on the recorded video, e.g. timestamp.
 
# Optionally specify 'display-id'.
=item B<C<display-id>>

 view all matches for this distribution


Anki-Import

 view release on metacpan or  search on metacpan

lib/Anki/Import.pm  view on Meta::CPAN

45
46
47
48
49
50
51
52
53
54
55
  comment => 'provide details on progress of Anki::Import'
);
opt vverbose => (
  isa => 'Bool',
  alias => 'V',
  comment => 'verbose information plus debug info'
);
 
# start here
sub anki_import {
  my $args = optargs( @_ );

lib/Anki/Import.pm  view on Meta::CPAN

64
65
66
67
68
69
70
71
72
73
# set log level as appropriate
if ($args->{verbose}) {
  set_log_level('info');
} elsif ($args->{vverbose}) {
  set_log_level('debug');
} else {
  set_log_level('error');
}
logi('Log level set');

 view all matches for this distribution


AnnoCPAN

 view release on metacpan or  search on metacpan

Changes  view on Meta::CPAN

42
43
44
45
46
47
48
49
50
51
52
    * Added author feed; Bug #13505
    * Changed link format to /~id/Dist/Path#note_id; Fixed bug #13507
- Site tools
    * Added an annocpan_undump script and a sample update.sh
- Various bug fixes:
    * Removed spurious debugging message on Create
    * Removed absolute uri on redirects and join form submission
    * Fixed object_param to work with multiple values (required by join)
    * Omitted hidden notes from front page (#13585)
    * Made undump actually load the note text and reference section
    * Make sure tests pass

 view all matches for this distribution


Ansible-Util

 view release on metacpan or  search on metacpan

lib/Ansible/Util/Vars.pm  view on Meta::CPAN

136
137
138
139
140
141
142
143
144
145
146
        default => 'localhost',
);
 
=head2 keepTempFiles
 
Keeps the generated tempfiles for debugging/troubleshooting.  The tempfiles
used are a playbook, template, and json output.
 
=over
 
=item type: Bool

 view all matches for this distribution


Ansible

 view release on metacpan or  search on metacpan

lib/Ansible.pm  view on Meta::CPAN

23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
    eval " use IO::String ";
    $iostrings = $@ ? 0 : 1;
}
 
 
my $debug_get = 0;
my $debug_mget = 0;
my $debug_set = 0;
my $debug_context = 0;
my $debug_text = 0;
my $ddata = $debug_get
            || $debug_mget
            || $debug_set
            || $debug_context
            || $debug_text
            || 0; # add debugging data to data structures
 
my $spec = qr{^ };
my $text = " text";
my $subs = " subs";
my $next = " next";

lib/Ansible.pm  view on Meta::CPAN

287
288
289
290
291
292
293
294
295
296
297
sub text {
    my ($self) = @_;
    return '' unless $self;
    if ( defined $self->{$text} ) {
        return $debug_text
               ? $self->{$word} . " " . $self->{$text}
               : $self->{$text};
    }
    my (@p) = $self->sortit(grep (! /$spec/o, keys %$self));
    if ( @p > 1 ) {

lib/Ansible.pm  view on Meta::CPAN

302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
        my %temp = map { $self->{$_}->sequenced_text(0) } @p;
        return join('', map { $temp{$_} } sort keys %temp);
    }
    elsif ( $self->{$dupl} ) {
        return join('', map { $_->{$word} . " " . $_->{$text} } @{ $self->{$dupl} })
            if $debug_text;
        return join('', map { $_->{$text} } @{ $self->{$dupl} });
    }
    confess unless @p;
    return $self->{$p[0]}->text;
}
 
sub sequenced_text {
    my ($self, $all) = @_;
    my @t = ();
    if ( defined $self->{$text} ) {
        push(@t, $debug_text
                 ? ($self->seqn => $self->{$word} . " " . $self->{$text})
                 : ($self->seqn => $self->{$text}));
    }
    if ( exists $self->{$dupl} ) {
        push(@t, $debug_text
                 ? map { $_->seqn => $_->{$word} . " " . $_->{$text} } @{ $self->{$dupl} }
                 : map { $_->seqn => $_->{$text} } @{ $self->{$dupl} });
    }
    my (@p) = $self->sortit(grep (! /$spec/o, keys %$self));
    if ( @p ) {

lib/Ansible.pm  view on Meta::CPAN

395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
#  ip address x y
#
 
sub setcontext {
    my ($self, @extras) = @_;
    print STDERR "\nSETCONTEXT\n" if $debug_context;
    unless ( $self->block ) {
        print STDERR "\nNOT_A_BLOCK $self->{$debg}\n" if $debug_context;
        $self = $self->context;
    }
    printf STDERR "\nSELF %sCONTEXT %sCCONTEXT %sEXTRAS$#extras @extras\n",
                  $self->{$debg}, $self->context->{$debg},
                  $self->context->context->{$debg}
        if $debug_context;
    my $x = $self->context;
    return(grep defined,
        $x->context->setcontext,
        trim($x->zoom->{$text}),
        @extras)

lib/Ansible.pm  view on Meta::CPAN

416
417
418
419
420
421
422
423
424
425
426
427
}
 
sub contextcount {
    my $self = shift;
    my (@a) = $self->setcontext(@_);
    printf STDERR "CONTEXTCOUNT = %d\n", scalar(@a) if $debug_context;
    print STDERR map { "CC: $_\n" } @a if $debug_context;
    return scalar(@a);
}
 
sub unsetcontext {
    my $self = shift;

lib/Ansible.pm  view on Meta::CPAN

445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
sub set {
    my $self = shift;
    my $new = pop;
    my (@designators) = @_;
    #my ($self, $designator, $new) = @_;
    print STDERR "\nSET\n" if $debug_set;
    return undef unless $self;
    my $old;
    #my @designators;
    print STDERR "\nSELF $self->{$debg}" if $debug_set;
    # move into the block if possible
    $self = $self->subs
        if $self->subs;
    print STDERR "\nSELF $self->{$debg}" if $debug_set;
    #if (ref $designator eq 'ARRAY') {
    #   @designators = @$designator;
    #   $old = $self->get(@designators);
    #   $designator = pop(@designators);
    #} elsif ($designator) {

lib/Ansible.pm  view on Meta::CPAN

471
472
473
474
475
476
477
478
479
480
481
    $designator = pop(@designators);
}
else {
    $old = $self;
}
print STDERR "\nOLD $old->{$debg}" if $debug_set;
my (@lines) = expand(grep (/./, split(/\n/, $new)));
if ( $lines[0] =~ /^(\s+)/ ) {
    my $ls = $1;
    my $m = 1;
    map { substr($_, 0, length($ls)) eq $ls or $m = 0 } @lines;

lib/Ansible.pm  view on Meta::CPAN

487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
    s/(\S)\s+/$1 /g;
    s/\s+$//;
    $_ = 'exit' if /^\s*!\s*$/;
    $_ = "$indent$_";
}
print STDERR "SET TO {\n@lines\n}\n" if $debug_set;
my $desig = shift(@lines);
my @o;
undef $old
    if ! $old;
if ( ! $old ) {
    print STDERR "NO OLD\n" if $debug_set;
    push(@o, openangle($self->setcontext(@designators)));
    push(@o, $desig);
}
elsif ( ! $designator && ! looks_like_a_block($desig, @lines) ) {
    if ( $self->block && $self->context ) {

lib/Ansible.pm  view on Meta::CPAN

505
506
507
508
509
510
511
512
513
514
515
    $old = $self->context;
    undef $desig;
}
else {
    unshift(@lines, $desig);
    print STDERR "IN NASTY BIT\n" if $debug_set;
    #
    # this is a messy situation: we've got a random
    # block of stuff to set inside a random block.
    # In theorey we could avoid the die, I'll leave
    # that as an exercise for the reader.

lib/Ansible.pm  view on Meta::CPAN

534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
        unshift(@o, $self->setcontext)
            if @o;
    }
}
elsif ( $old->teql($desig) ) {
    print STDERR "DESIGNATOR EQUAL\n" if $debug_set;
    # okay
}
else {
    print STDERR "DESIGNATOR DIFERENT\n" if $debug_set;
    push(@o, openangle($self->setcontext(@designators)));
    if ( defined $designator ) {
        push(@o, iinvert($indent, $designator));
    }
    else {

lib/Ansible.pm  view on Meta::CPAN

550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
    }
    push(@o, $desig);
}
if ( @lines ) {
    if ( $old && ! @o && $old->subs && $old->subs->next ) {
        print STDERR "OLD= $old->{$debg}" if $debug_set;
        my $ok = 1;
        my $f = $old->subs->next;
        print STDERR "F= $f->{$debg}" if $debug_set;
        for my $l ( @lines ) {
            next if $l =~ /^\s*exit\s*$/;
            next if $f->teql($l);
            print STDERR "LINE DIFF ON $l\n" if $debug_set;
            $ok = 0;
            last;
        }
        continue {
            $f = $f->next;
            print STDERR "F= $f->{$debg}" if $debug_set;
        }
        if ( ! $ok || $f ) {
            push(@o, openangle($self->setcontext(@designators)));
            push(@o, iinvert($indent, $designator));
            push(@o, $desig);

lib/Ansible.pm  view on Meta::CPAN

614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
sub get {
    my ($self, @designators) = @_;
    return $self->mget(@designators)
        if wantarray && @designators > 1;
 
    print STDERR "\nGET <@designators> $self->{$debg}" if $debug_get;
 
    return $self unless $self;
    my $zoom = $self->zoom->subs;
    $self = $zoom if $zoom;
 
    print STDERR "\nZOOMSUB $self->{$debg}" if $debug_get;
 
    while ( @designators ) {
        my $designator = shift(@designators);
        #               $self = $self->zoom;
        #       $self = $self->single || $self;
        print STDERR "\nDESIGNATOR: $designator.  ZOOMED: $self->{$debg}\n"
            if $debug_get;
        for my $d ( split(' ', $designator) ) {
            print STDERR "\nDO WE HAVE A: $d?\n" if $debug_get;
            return $undef unless $self->{$d};
            $self = $self->{$d};
            print STDERR "\nWE DO: $self->{$debg}\n" if $debug_get;
        }
        last unless @designators;
        if ( $self->single ) {
            $self = $self->subs;
            print STDERR "\nSINGLETON: $self->{$debg}\n" if $debug_get;
        }
        else {
            print STDERR "\nNOT SINGLE\n" if $debug_get;
            return $undef;
        }
    }
    print STDERR "\nDONE\n" if $debug_get;
    if ( wantarray ) {
        $self = $self->zoom;
        my (@k) = $self->kids;
        return @k if @k;
        return $self;

lib/Ansible.pm  view on Meta::CPAN

702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
    my $cl = callerlevels;
    my @newset;
    if ( @designators > 1 ) {
 
        print STDERR "\nGET$cl $designators[0]----------\n" if $debug_mget;
 
        my (@set) = $self->get(shift @designators);
        for my $item ( @set ) {
 
            print STDERR "\nMGET$cl $item ----------\n" if $debug_mget;
            print STDERR "\nMGET$cl $item->{$debg}\n" if $debug_mget;
 
            my (@got) = $item->mget(@designators);
 
            print STDERR map { "\nRESULTS$cl: $_->{$debg}\n" } @got
                if $debug_mget;
 
            push(@newset, @got);
        }
    }
    else {
 
        print STDERR "\nxGET$cl $designators[0] -------\n" if $debug_mget;
 
        (@newset) = $self->get(shift @designators);
 
        print STDERR map { "\nxRESULTS$cl: $_->{$debg}\n" } @newset
            if $debug_mget;
 
    }
    return @newset;
}

 view all matches for this distribution


AntTweakBar

 view release on metacpan or  search on metacpan

src/ppport.h  view on Meta::CPAN

1322
1323
1324
1325
1326
1327
1328
1329
1330
1331
1332
debop||5.005000|
debprofdump||5.005000|
debprof|||
debstackptrs||5.007003|
debstack||5.007003|
debug_start_match|||
deb||5.007003|v
defelem_target|||
del_sv|||
delete_eval_scope|||
delimcpy||5.004000|n

src/ppport.h  view on Meta::CPAN

1488
1489
1490
1491
1492
1493
1494
1495
1496
1497
1498
get_context||5.006000|n
get_cvn_flags|5.009005||p
get_cvs|5.011000||p
get_cv|5.006000||p
get_db_sub|||
get_debug_opts|||
get_hash_seed|||
get_hv|5.006000||p
get_invlist_iter_addr|||
get_invlist_offset_addr|||
get_invlist_previous_index_addr|||

src/ppport.h  view on Meta::CPAN

1640
1641
1642
1643
1644
1645
1646
1647
1648
1649
1650
incpush|||
ingroup|||
init_argv_symbols|||
init_constants|||
init_dbargs|||
init_debugger|||
init_global_struct|||
init_i18nl10n||5.006000|
init_i18nl14n||5.006000|
init_ids|||
init_interp|||

src/ppport.h  view on Meta::CPAN

2279
2280
2281
2282
2283
2284
2285
2286
2287
2288
2289
rsignal_save|||
rsignal_state||5.004000|
rsignal||5.004000|
run_body|||
run_user_filter|||
runops_debug||5.005000|
runops_standard||5.005000|
rv2cv_op_cv||5.013006|
rvpv_dup|||
rxres_free|||
rxres_restore|||

src/ppport.h  view on Meta::CPAN

2691
2692
2693
2694
2695
2696
2697
2698
2699
2700
2701
unreferenced_to_tmp_stack|||
unshare_hek_or_pvn|||
unshare_hek|||
unsharepvn||5.004000|
unwind_handler_stack|||
update_debugger_info|||
upg_version||5.009005|
usage|||
utf16_textfilter|||
utf16_to_utf8_reversed||5.006001|
utf16_to_utf8||5.006001|

 view all matches for this distribution


AnyEvent-APNS

 view release on metacpan or  search on metacpan

inc/Spiffy.pm  view on Meta::CPAN

50
51
52
53
54
55
56
57
58
59
60
no warnings;
my $self_package = shift;
 
# XXX Using parse_arguments here might cause confusion, because the
# subclass's boolean_arguments and paired_arguments can conflict, causing
# difficult debugging. Consider using something truly local.
my ($args, @export_list) = do {
    local *boolean_arguments = sub {
        qw(
            -base -Base -mixin -selfless
            -XXX -dumper -yaml

 view all matches for this distribution


AnyEvent-Atom-Stream

 view release on metacpan or  search on metacpan

inc/Spiffy.pm  view on Meta::CPAN

50
51
52
53
54
55
56
57
58
59
60
no warnings;
my $self_package = shift;
 
# XXX Using parse_arguments here might cause confusion, because the
# subclass's boolean_arguments and paired_arguments can conflict, causing
# difficult debugging. Consider using something truly local.
my ($args, @export_list) = do {
    local *boolean_arguments = sub {
        qw(
            -base -Base -mixin -selfless
            -XXX -dumper -yaml

 view all matches for this distribution


AnyEvent-Beanstalk-Worker

 view release on metacpan or  search on metacpan

lib/AnyEvent/Beanstalk/Worker.pm  view on Meta::CPAN

42
43
44
45
46
47
48
49
50
51
52
$self->{_log_ctx}->title(__PACKAGE__);
$self->{_log_ctx}->level($self->{_log_level});
 
$self->{_log}          = {};
$self->{_log}->{trace} = $self->{_log_ctx}->logger("trace");
$self->{_log}->{debug} = $self->{_log_ctx}->logger("debug");
$self->{_log}->{info}  = $self->{_log_ctx}->logger("info");
$self->{_log}->{note}  = $self->{_log_ctx}->logger("note");
 
$self->{_signal} = {};
$self->{_signal}->{TERM} = AnyEvent->signal(

lib/AnyEvent/Beanstalk/Worker.pm  view on Meta::CPAN

266
267
268
269
270
271
272
273
274
275
276
277
278
AnyEvent->condvar(
    cb => sub {
        if ( ref( $self->{_cb}->{$evt} ) eq 'CODE' ) {
            $self->{_log}->{trace}->("event: $evt");
            my @data = $_[0]->recv;
            $self->{_log}->{debug}->(
                "shift event ($evt): " . shift @{ $self->{_events} } );
            $self->{_log}->{debug}->(
                "EVENTS (s): " . join( ' ' => @{ $self->{_events} } ) );
            $self->{_cb}->{$evt}->(@data);
        }
 
        $self->{_event}->{$evt} = AnyEvent->condvar( cb => __SUB__ );

lib/AnyEvent/Beanstalk/Worker.pm  view on Meta::CPAN

283
284
285
286
287
288
289
290
291
292
293
294
295
}
 
sub emit {
    my $self  = shift;
    my $event = shift;
    $self->{_log}->{debug}->("push event ($event)");
    push @{ $self->{_events} }, $event;
    $self->{_log}->{debug}
      ->( "EVENTS (p): " . join( ' ' => @{ $self->{_events} } ) );
    $self->{_event}->{$event}->send( $self, @_ );
}
 
sub beanstalk {

 view all matches for this distribution


AnyEvent-Beanstalk

 view release on metacpan or  search on metacpan

lib/AnyEvent/Beanstalk.pm  view on Meta::CPAN

38
39
40
41
42
43
44
45
46
47
48
    ttr        => $arg{ttr}        || 120,
    priority   => $arg{priority}   || 10_000,
    encoder    => $arg{encoder}    || $YAML_DUMP,
    decoder    => $arg{decoder}    || $YAML_LOAD,
    server     => $arg{server}     || undef,
    debug      => $arg{debug}      || 0,
    on_error   => $arg{on_error}   || undef,
    on_connect => $arg{on_connect} || undef,
  },
  ref($proto) || $proto
);

lib/AnyEvent/Beanstalk.pm  view on Meta::CPAN

704
705
706
707
708
709
710
711
712
713
714
715
716
subroutine that will be called when data from the beanstalkd server needs to be
decoded. The subroutine will be passed the data fetched from the beanstalkd
server and should return the value the application can use. The default is
to decode using YAML.
 
=item B<debug ([$debug])>
 
Set/get debug value. If set to a true value then all communication with the server will be
output with C<warn>
 
=item B<on_error ([$callback])>
 
A code reference to call when there is an error communicating with the server, for example

 view all matches for this distribution


AnyEvent-BitTorrent

 view release on metacpan or  search on metacpan

lib/AnyEvent/BitTorrent.pm  view on Meta::CPAN

77
78
79
80
81
82
83
84
85
86
87
        my $h = shift;
        AE::log info => 'Socket EOF';
        $s->_del_peer($h);
    },
    on_read => sub {
        AE::log debug => 'Read Socket';
        $s->_on_read_incoming(@_);
    }
);
$s->_add_peer($handle);
}, sub {

lib/AnyEvent/BitTorrent.pm  view on Meta::CPAN

102
103
104
105
106
107
108
109
110
111
112
sub _build_reserved {
    my $reserved = "\0" x 8;
 
    #vec($reserved, 5, 8)  = 0x10;    # Ext Protocol
    vec($reserved, 7, 8) = 0x04;    # Fast Ext
    AE::log debug => '_build_reserved() => ' . $reserved;
    $reserved;
}
has peerid => (is       => 'ro',
               isa      => $PEERID,
               init_arg => undef,

lib/AnyEvent/BitTorrent.pm  view on Meta::CPAN

146
147
148
149
150
151
152
153
154
155
156
        my $prio = !!$s->files->[$findex]{priority};
        for my $index ($s->_file_to_range($findex)) {
            vec($wanted, $index, 1) = $prio && !vec($s->bitfield, $index, 1);
        }
    }
    AE::log debug => '->wanted() => ' . unpack 'b*', $wanted;
    $wanted;
}
 
sub complete {
    my $s = shift;

lib/AnyEvent/BitTorrent.pm  view on Meta::CPAN

192
193
194
195
196
197
198
199
200
201
202
    #return if ref $s ne __PACKAGE__;    # Applying roles makes deep rec
    open my $fh, '<', $s->path;
    sysread $fh, my $raw, -s $fh;
    my $metadata = bdecode $raw;
    AE::log debug => sub {
        require Data::Dump;
        '_build_metadata() => ' . Data::Dump::dump($metadata);
    };
    $metadata;
}

lib/AnyEvent/BitTorrent.pm  view on Meta::CPAN

266
267
268
269
270
271
272
273
274
275
276
sub _build_size {
    my $s   = shift;
    my $ret = 0;
    $ret += $_->{length} for @{$s->files};
    AE::log debug => '_build_size() => ' . $ret;
    $ret;
}
 
sub _open {
    my ($s, $i, $m) = @_;

lib/AnyEvent/BitTorrent.pm  view on Meta::CPAN

331
332
333
334
335
336
337
338
339
340
341
sub _write_cache {
    my ($s, $f, $o, $d) = @_;
    my $path = $s->_cache_path;
    AE::log
        debug =>
        'Attempting to store %d bytes to cache file (%s) [$f=%s, $o=%s]',
        length($d), $path, $f, $o;
    my @split = File::Spec->splitdir($path);
    pop @split;    # File name itself
    my $dir = File::Spec->catdir(@split);

lib/AnyEvent/BitTorrent.pm  view on Meta::CPAN

346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
    my $pos = sysseek $fh, 0, SEEK_CUR;
    my $w = syswrite $fh, $d;
    flock $fh, LOCK_UN;
    close $fh;
    $s->piece_cache->{$f}{$o} = $pos;
    AE::log debug => 'Wrote %d bytes to cache file', $w;
    return $w;
}
 
sub _read_cache {
    my ($s, $f, $o, $l) = @_;
    $s->piece_cache->{$f} // return;
    $s->piece_cache->{$f}{$o} // return;
    my $path = $s->_cache_path;
    AE::log
        debug =>
        'Attempting to read %d bytes from cache file (%s) [$f=%s, $o=%s]',
        $l, $path, $f, $o;
    sysopen(my ($fh), $path, O_RDONLY)
        || return;
    flock $fh, LOCK_SH;

lib/AnyEvent/BitTorrent.pm  view on Meta::CPAN

372
373
374
375
376
377
378
379
380
381
382
}
 
sub _read {
    my ($s, $index, $offset, $length) = @_;
    AE::log
        debug =>
        'Attempting to read %d bytes from piece %d starting at %d bytes',
        $length, $index, $offset;
    my $data         = '';
    my $file_index   = 0;
    my $total_offset = ($index * $s->piece_length) + $offset;

lib/AnyEvent/BitTorrent.pm  view on Meta::CPAN

435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
}
 
sub _write {
    my ($s, $index, $offset, $data) = @_;
    AE::log
        debug =>
        'Attempting to write %d bytes from piece %d starting at %d bytes',
        length($data), $index, $offset;
    my $file_index = 0;
    my $total_offset = int(($index * $s->piece_length) + ($offset || 0));
    AE::log
        debug => '...calculated offset == %d',
        $total_offset;
SEARCH:
    while ($total_offset > $s->files->[$file_index]->{length}) {
        $total_offset -= $s->files->[$file_index]->{length};
        $file_index++;

lib/AnyEvent/BitTorrent.pm  view on Meta::CPAN

659
660
661
662
663
664
665
666
667
668
669
    . ('&downloaded=' . $s->downloaded)
    . ('&left=' . $s->_left)
    . ('&port=' . $s->port)
    . '&compact=1'
    . ($e ? '&event=' . $e : '');
AE::log debug => 'Announce URL: ' . $_url;
http_get $_url, sub {
    my ($body, $hdr) = @_;
    AE::log trace => sub {
        require Data::Dump;
        'Announce response: ' . Data::Dump::dump($body, $hdr);

lib/AnyEvent/BitTorrent.pm  view on Meta::CPAN

901
902
903
904
905
906
907
908
909
910
911
sub _on_read {
    my ($s, $h) = @_;
    while (my $packet = parse_packet(\$h->rbuf)) {
        last if !$packet;
        AE::log debug => sub {
            require Data::Dump;
            'Incoming packet: ' . Data::Dump::dump($packet->{error});
        };
        if (defined $packet->{error}) {
            $s->_del_peer($h);

lib/AnyEvent/BitTorrent.pm  view on Meta::CPAN

1272
1273
1274
1275
1276
1277
1278
1279
1280
1281
1282
              default => sub {'active'}
);
 
sub stop {
    my $s = shift;
    AE::log debug => 'Stopping...';
    return if $s->state eq 'stopped';
    AE::log trace => 'Announcing "stopped" event to trackers...';
    $s->announce('stopped');
    AE::log trace => 'Disconnecting peers...';
    $s->_clear_peers;

lib/AnyEvent/BitTorrent.pm  view on Meta::CPAN

1288
1289
1290
1291
1292
1293
1294
1295
1296
1297
1298
1299
1300
1301
1302
1303
1304
1305
1306
1307
1308
1309
1310
1311
1312
1313
1314
1315
1316
1317
1318
1319
1320
1321
1322
    $s->_set_state('stopped');
}
 
sub start {
    my $s = shift;
    AE::log debug => 'Starting...';
    $s->announce('started') unless $s->state eq 'active';
    $s->peers;
    AE::log trace => 'Starting new peers ticker...';
    $s->_peer_timer;
    AE::log trace => 'Setting internal status...';
    $s->_set_state('active');
}
 
sub pause {
    my $s = shift;
    AE::log debug => 'Pausing...';
    $s->peers;
    AE::log trace => 'Starting new peers ticker...';
    $s->_peer_timer;
    AE::log trace => 'Setting internal status...';
    $s->_set_state('paused');
}
#
sub BUILD {
    my ($s, $a) = @_;
    AE::log debug => 'BUILD()';
    $s->start && AE::log debug => 'Calling ->start()'
        if $s->state eq 'active';
    $s->paused && AE::log debug => 'Calling ->paused() '
        if $s->state eq 'paused';
}
 
# Testing stuff goes here
sub _send_encrypted {

 view all matches for this distribution


AnyEvent-Chromi

 view release on metacpan or  search on metacpan

examples/server.pl  view on Meta::CPAN

73
74
75
76
77
78
79
80
81
82
83
    my ($id, $status, $reply) = ($1, $2, $3);
    if(defined $requests{$id}) {
        my $c = $requests{$id};
        if(defined $clients{$c}) {
            my $frame = Protocol::WebSocket::Frame->new($message);
            $log->debug("sending reply for $id");
            $c->push_write($frame->to_bytes);
        }
    }
    delete $requests{$id};
}

examples/server.pl  view on Meta::CPAN

120
121
122
123
124
125
126
127
128
129
130
sub main()
{
    my $ld_log = Log::Dispatch->new(
       outputs => [
            [ 'Syslog', min_level => 'info', ident  => 'chrome-siteshow' ],
            [ 'Screen', min_level => 'debug', newline => 1 ],
        ]
    );
    Log::Any::Adapter->set( 'Dispatch', dispatcher => $ld_log );
 
    $log->info("starting up");

 view all matches for this distribution


AnyEvent-Connection

 view release on metacpan or  search on metacpan

ex/example.pl  view on Meta::CPAN

9
10
11
12
13
14
15
16
17
18
19
my $cl = My::Client->new(
        host      => '127.0.0.1',
        port      => 7,
        reconnect => 1,
        debug     => 0,
        timeout   => 1,
);
my $cv = AnyEvent->condvar;
my $fails = 0;
$cl->reg_cb(

 view all matches for this distribution


AnyEvent-Connector

 view release on metacpan or  search on metacpan

lib/AnyEvent/Connector.pm  view on Meta::CPAN

271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
=back
 
=head1 REPOSITORY
 
 
=head1 BUGS AND FEATURE REQUESTS
 
Please report bugs and feature requests to my Github issues
 
Although I prefer Github, non-Github users can use CPAN RT
Please send email to C<bug-AnyEvent-Connector at rt.cpan.org> to report bugs
if you do not have CPAN RT account.

 view all matches for this distribution


AnyEvent-Cron

 view release on metacpan or  search on metacpan

lib/AnyEvent/Cron.pm  view on Meta::CPAN

24
25
26
27
28
29
30
31
32
33
34
    ( is => 'rw' , isa => 'Int' , default => sub { 1 } );
 
has verbose =>
    ( is => 'rw' , isa => 'Bool' , default => sub { 0 } );
 
has debug =>
    ( is => 'rw' , isa => 'Bool' , default => sub { 0 } );
 
# TODO:
has ignore_floating =>
    ( is => 'rw'isa => 'Bool' , default => sub { 0 } );

lib/AnyEvent/Cron.pm  view on Meta::CPAN

106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
AnyEvent->now_update();
my $now_epoch = AnyEvent->now;
my $next_epoch;
my $delay;
my $name = $job->{name};
my $debug = $job->{debug};
 
if( $job->{event} ) {
    my $event = $job->{event};
    $next_epoch = $event->next->epoch;  # set next schedule time
    $delay      = $next_epoch - $now_epoch;
    warn "delay:",$delay if $debug;
}
elsif( $job->{seconds} ) {
    $next_epoch = $now_epoch + $job->{seconds};
    $delay      = $next_epoch - $now_epoch;
    warn "delay:",$delay if $debug;
}
elsif( $job->{time} ) {
    my $time = $job->{time};
    my $now = DateTime->from_epoch( epoch => $now_epoch ); # depends on now
    my $next = $now->clone;

lib/AnyEvent/Cron.pm  view on Meta::CPAN

159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
            $self->_schedule($job) unless $job->{once};
 
            if ( $job->{single} && $job->{running}++ ) {
                print STDERR "Skipping job '$name' - still running\n"
                    if $debug;
            }
            else {
                eval { $job->{cb}->( $self->{_cv}, $job ); 1 }
                    or warn $@ || 'Unknown error';
                delete $job->{running};
                print STDERR "Finished job '$name'\n"
                    if $debug;
            }
            $self->{_cv}->end;
        }
    );
}

lib/AnyEvent/Cron.pm  view on Meta::CPAN

193
194
195
196
197
198
199
200
201
202
203
=head1 SYNOPSIS
 
    my $cron = AnyEvent::Cron->new(
            verbose => 1,
            debug => 1,
            ignore_floating => 1
    );
 
                # 00:00 (hour:minute)
    $cron->add("00:00" => sub { warn "zero"; })

 view all matches for this distribution


AnyEvent-Curl-Multi

 view release on metacpan or  search on metacpan

lib/AnyEvent/Curl/Multi.pm  view on Meta::CPAN

186
187
188
189
190
191
192
193
194
195
196
    queue => [],
    max_concurrency => 0,
    max_redirects => 0,
    timeout => undef,
    proxy => undef,
    debug => undef,
    ipresolve => undef,
    @_
);
 
if (! $MS_TIMEOUT_SUPPORTED

lib/AnyEvent/Curl/Multi.pm  view on Meta::CPAN

358
359
360
361
362
363
364
365
366
367
368
}
 
# Accept gzip or deflate-compressed responses
$easy_h->setopt(CURLOPT_ENCODING, "");
 
$easy_h->setopt(CURLOPT_VERBOSE, 1) if $self->{debug} || $opts{debug};
 
my $proxy = $self->{proxy} || $opts{proxy};
$easy_h->setopt(CURLOPT_PROXY, $proxy) if $proxy;
 
my $timeout = $self->{timeout} || $opts{timeout};

 view all matches for this distribution


AnyEvent-DBD-Pg

 view release on metacpan or  search on metacpan

ex/sample.pl  view on Meta::CPAN

7
8
9
10
11
12
13
14
15
16
17
18
19
20
my $adb = AnyEvent::DBD::Pg->new('dbi:Pg:dbname=test', user => 'pass', {
        pg_enable_utf8 => 1,
        pg_server_prepare => 0,
        quote_char => '"',
        name_sep => ".",
}, debug => 1);
 
$adb->queue_size( 4 );
$adb->debug( 1 );
 
$adb->connect;
 
$adb->selectcol_arrayref("select pg_sleep( 0.1 ), 1", { Columns => [ 1 ] }, sub {
        my $rc = shift or return warn;

 view all matches for this distribution


AnyEvent-DBI-Abstract-Limit

 view release on metacpan or  search on metacpan

inc/Spiffy.pm  view on Meta::CPAN

50
51
52
53
54
55
56
57
58
59
60
no warnings;
my $self_package = shift;
 
# XXX Using parse_arguments here might cause confusion, because the
# subclass's boolean_arguments and paired_arguments can conflict, causing
# difficult debugging. Consider using something truly local.
my ($args, @export_list) = do {
    local *boolean_arguments = sub {
        qw(
            -base -Base -mixin -selfless
            -XXX -dumper -yaml

 view all matches for this distribution


AnyEvent-DBI

 view release on metacpan or  search on metacpan

t/fake-mysql  view on Meta::CPAN

284
285
286
287
288
289
290
291
292
293
294
my $remote_dsn_user;
my $remote_dsn_password;
 
my $port = '23306';
my $interface = '127.0.0.1';
my $debug;
my @config_names;
my @rules;
my %storage;
 
my @args = @ARGV;

t/fake-mysql  view on Meta::CPAN

301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
        "remote_dsn_user=s"     => \$remote_dsn_user,
        "remote_dsn_password=s" => \$remote_dsn_password,
        "port=i"                => \$port,
        "config=s"              => \@config_names,
        "if|interface|ip=s"     => \$interface,
        "debug"                 => \$debug
) or die;
 
@ARGV = @args;
 
my $start_dbh;
if (defined $start_dsn) {
        print localtime()." [$$] Connecting to DSN $start_dsn.\n" if $debug;
        $start_dbh = DBI->connect($start_dsn, $start_dsn_user, $start_dsn_password);
}
 
$storage{dbh} = $start_dbh;
$storage{dsn} = $start_dsn;

t/fake-mysql  view on Meta::CPAN

329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
        read (CONFIG_FILE, my $config_text, -s $config_name);
        close (CONFIG_FILE);
        eval ('$config_sub = sub { '.$config_text.'}') or die $@;
        my @config_rules = &$config_sub();
        push @rules, @config_rules;
        print localtime()." [$$] Loaded ".($#config_rules + 1)." rules from $config_name.\n" if $debug;
}
 
socket(SERVER_SOCK, PF_INET, SOCK_STREAM, getprotobyname('tcp'));
setsockopt(SERVER_SOCK, SOL_SOCKET, SO_REUSEADDR, pack("l", 1));
bind(SERVER_SOCK, sockaddr_in($port, inet_aton($interface))) || die "bind: $!";
listen(SERVER_SOCK,1);
 
print localtime()." [$$] Note: port $port is now open on interface $interface.\n" if $debug;
while (1) {
        my $remote_paddr = accept(my $remote_socket, SERVER_SOCK);
 
        if (!defined(my $pid = fork)) {
                die "cannot fork: $!";

t/fake-mysql  view on Meta::CPAN

374
375
376
377
378
379
380
381
382
383
384
$myserver->sendOK();
 
while (1) {
        my ($command, $query) = $myserver->readCommand();
        print localtime()." [$$] command: $command; data = $query\n" if $debug;
        last if (not defined $command) || ($command == DBIx::MyServer::COM_QUIT);
 
        my $outgoing_query = $query;
 
        foreach my $i (0..$#rules) {

t/fake-mysql  view on Meta::CPAN

402
403
404
405
406
407
408
409
410
411
        if (ref($rule->{match_string}) eq 'Regexp') {
                $rule_matches = 1 if @placeholders = $query =~ $rule->{match};
        } else {
                $rule_matches = 1 if $query eq $rule->{match_string};
        }
        print localtime()." [$$] Executing 'match' from rule $i: $rule->{match_string}, result is $rule_matches.\n" if $debug;
} else {
        $rule_matches = 1;
}
$rule->{placeholders} = \@placeholders;

t/fake-mysql  view on Meta::CPAN

415
416
417
418
419
420
421
422
423
424
425
my ($definitions, $data);
 
undef $storage{data_sent};
 
if (defined $rule->{before}) {
        print localtime()." [$$] Executing 'before' from rule $i\n" if $debug;
        eval{
                $rule->{before}($query, @{$rule->{placeholders}});
        };
        error($@) if defined $@ && $@ ne '';
}

t/fake-mysql  view on Meta::CPAN

428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
        if (ref($rule->{rewrite}) eq 'CODE') {
                $outgoing_query = $rule->{rewrite}($query, @{$rule->{placeholders}});
        } else {
                $outgoing_query = $rule->{rewrite};
        }
        print localtime()." [$$] Executing 'rewrite' from rule $i, result is '$outgoing_query'\n" if $debug;
} elsif (defined $rule->{match}) {
        $outgoing_query = $rule->{match_string} eq 'Regexp' ? $rule->{placeholders}->[0] : $outgoing_query;
}
 
if (defined $rule->{error}) {
        my @error = ref ($rule->{error}) eq 'CODE' ? $rule->{error}($query, @{$rule->{placeholders}}) : $rule->{error};
        my @mid_error = ref($error[0]) eq 'ARRAY' ? @{$error[0]} : @error;
        if (defined $mid_error[0]) {
                print localtime()." [$$] Sending error: ".join(', ', @mid_error).".\n" if $debug;
                error(@mid_error);
        }
}
 
if (defined $rule->{ok}) {
        my @ok = ref ($rule->{ok}) eq 'CODE' ? $rule->{ok}($query, @{$rule->{placeholders}}) : $rule->{ok};
        my @mid_ok = ref($ok[0]) eq 'ARRAY' ? @{$ok[0]} : @ok;
        if (defined $mid_ok[0]) {
                print localtime()." [$$] Sending OK: ".join(', ', @mid_ok).").\n" if $debug;
                ok(@mid_ok);
        }
}
 
if (defined $rule->{columns}) {

t/fake-mysql  view on Meta::CPAN

461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
        } elsif (ref($column_names[0]) eq 'ARRAY') {
                $column_names = $column_names[0];
        } elsif (defined $column_names[0]) {
                $column_names = [ $column_names[0] ];
        }
        print localtime()." [$$] Converting column_names into definitions.\n" if $debug;
        $definitions = [ map { $myserver->newDefinition( name => $_ ) } @$column_names ];
}
 
if (defined $rule->{data}) {
        my @start_data = ref($rule->{data}) eq 'CODE' ? $rule->{data}($query, @{$rule->{placeholders}}) : $rule->{data};
        my $mid_data = defined $start_data[1] ? \@start_data : $start_data[0];
 
        if (ref($mid_data) eq 'HASH') {
                print localtime()." [$$] Converting data from hash.\n" if $debug;
                $data = [ map { [ $_, $mid_data->{$_} ] } sort keys %$mid_data ];
        } elsif ((ref($mid_data) eq 'ARRAY') && (ref($mid_data->[0]) ne 'ARRAY')) {
                print localtime()." [$$] Converting data from a flat array.\n" if $debug;
                $data = [ map { [ $_ ] } @$mid_data ];
        } elsif (ref($mid_data) eq '') {
                $data = [ [ $mid_data ] ];
        } else {
                $data = $mid_data;

t/fake-mysql  view on Meta::CPAN

490
491
492
493
494
495
496
497
498
499
500
501
502
503
) {
        if (defined $rule->{dbh}) {
                $myserver->setDbh($rule->{dbh});
        } elsif (defined $rule->{dsn}) {
                if (ref($rule->{dsn}) eq 'ARRAY') {
                        print localtime()." [$$] Connecting to DSN $rule->{dsn}->[0].\n" if $debug;
                        $myserver->setDbh(DBI->connect(@{$rule->{dsn}}));
                } else {
                        print localtime()." [$$] Connecting to DSN $rule->{dsn}.\n" if $debug;
                        $myserver->setDbh(DBI->connect($rule->{dsn}, get('dsn_user'), get('dsn_password')));
                }
        }
        if (not defined get('dbh')) {
                error("No --dbh specified. Can not forward query.",1235, 42000);

t/fake-mysql  view on Meta::CPAN

510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
                                }
                                $storage{data_sent} = 1;
                        }
 
                        if (defined $definitions) {
                                print localtime()." [$$] Sending definitions.\n" if $debug;
                                $myserver->sendDefinitions($definitions);
                                $storage{data_sent} = 1;
                        }
 
                        if (defined $data) {
                                print localtime()." [$$] Sending data.\n" if $debug;
                                $myserver->sendRows($data);
                                $storage{data_sent} = 1;
                        }
 
                        if (defined $rule->{after}) {
                                print localtime()." [$$] Executing 'after' for rule $i\n" if $debug;
                                $rule->{after}($query, @{$rule->{placeholders}})
                        }
 
                        last if defined $storage{data_sent};
                }
 
        }
 
        print localtime()." [$$] Exit.\n" if $debug;
        exit;
}
 
sub set {
        my ($name, $value) = @_;
        $storage{$name} = $value;
        if ($name eq 'dsn') {
                if (defined $value) {
                        my $dbh;
                        if (ref($value) eq 'ARRAY') {
                                print localtime()." [$$] Connecting to DSN $value->[0].\n" if $debug;
                                $dbh = DBI->connect(@{$value});
                        } else {
                                print localtime()." [$$] Connecting to DSN $value.\n" if $debug;
                                $dbh = DBI->connect($value, get('dsn_user'), get('dsn_password'));
                        }
                        $storage{myserver}->setDbh($dbh);
                        $storage{dbh} = $dbh;
                } else {

 view all matches for this distribution


AnyEvent-DateTime-Cron

 view release on metacpan or  search on metacpan

lib/AnyEvent/DateTime/Cron.pm  view on Meta::CPAN

22
23
24
25
26
27
28
29
30
31
32
$params{quartz} = 0 unless defined $params{quartz};
 
return bless {
    _jobs      => {},
    _debug     => 0,
    _id        => 0,
    _running   => 0,
    _time_zone => $params{time_zone},
    _quartz    => $params{quartz},
}, $class;

lib/AnyEvent/DateTime/Cron.pm  view on Meta::CPAN

83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
    my $self = shift;
    my @ids = ref $_[0] eq 'ARRAY' ? @{ $_[0] } : @_;
 
    for (@ids) {
        print STDERR "Deleting job '$_'\n"
            if $self->{_debug};
 
        if ( my $job = delete $self->{_jobs}{$_} ) {
            $job->{watchers} = {};
        }
        elsif ( $self->{_debug} ) {
            print STDERR "Job '$_' not found\n";
        }
    }
    return $self;
}

lib/AnyEvent/DateTime/Cron.pm  view on Meta::CPAN

106
107
108
109
110
111
112
113
114
115
116
$cv->begin( sub { $self->stop } );
 
$self->{_signal} = AnyEvent->signal(
    signal => 'TERM',
    cb     => sub {
        print STDERR "Shutting down\n" if $self->{_debug};
        $cv->end;
    }
);
$self->{_running} = 1;
$self->_schedule( values %{ $self->{_jobs} } );

lib/AnyEvent/DateTime/Cron.pm  view on Meta::CPAN

140
141
142
143
144
145
146
147
148
149
150
my $time_zone = $self->{_time_zone};
 
AnyEvent->now_update();
my $now_epoch = AnyEvent->now;
my $now       = DateTime->from_epoch( epoch => $now_epoch );
my $debug     = $self->{_debug};
 
$now->set_time_zone($time_zone) if $time_zone;
 
for my $job (@_) {
    my $name       = $job->{name};

lib/AnyEvent/DateTime/Cron.pm  view on Meta::CPAN

161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
my $next_epoch = $next_run->epoch;
my $delay      = $next_epoch - $now_epoch;
 
print STDERR "Scheduling job '$name' for: $next_run\n"
    if $debug;
 
my $run_event = sub {
    print STDERR "Starting job '$name'\n"
        if $debug;
 
    $self->{_cv}->begin;
    delete $job->{watchers}{$next_epoch};
 
    $self->_schedule($job);
 
    if ( $job->{single} && $job->{running}++ ) {
        print STDERR "Skipping job '$name' - still running\n"
            if $debug;
    }
    else {
        eval { $job->{cb}->( $self->{_cv}, $job ); 1 }
            or warn $@ || 'Unknown error';
        delete $job->{running};
        print STDERR "Finished job '$name'\n"
            if $debug;
    }
 
    $self->{_cv}->end;
};

lib/AnyEvent/DateTime/Cron.pm  view on Meta::CPAN

195
196
197
198
199
200
201
202
203
204
205
206
207
208
        );
    }
}
 
#===================================
sub debug {
#===================================
    my $self = shift;
    $self->{_debug} = shift if @_;
    return $self;
}
 
#===================================
sub jobs { shift->{_jobs} }

lib/AnyEvent/DateTime/Cron.pm  view on Meta::CPAN

231
232
233
234
235
236
237
238
239
240
241
      )
    ->start
    ->recv
 
$cron = AnyEvent::DateTime::Cron->new();
$cron->debug(1)->add(
    '* * * * *', name   => 'job_name', single => 1,  sub {'foo'},
    ...
);
 
$cron->delete($job_id,$job_id...)

lib/AnyEvent/DateTime/Cron.pm  view on Meta::CPAN

288
289
290
291
292
293
294
295
296
297
    );
 
Use C<add()> to add new cron jobs.  It accepts a list of crontab entries,
optional paremeters and callbacks.
 
The C<name> parameter is useful for debugging, otherwise the auto-assigned
C<ID> is used instead.
 
The C<single> parameter, if C<true>, will only allow a single instance of
a job to run at any one time.

lib/AnyEvent/DateTime/Cron.pm  view on Meta::CPAN

327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
    $job = $cron->jobs
 
Returns a hashref containing all the current cron jobs.
 
=head2 debug()
 
    $cron->debug(1|0)
 
Turn on debugging.
 
=head1 CALLBACKS
 
A callback is a coderef (eg an anonymous subroutine) which will be called
every time your job is triggered. Callbacks should use C<AnyEvent> themselves,

 view all matches for this distribution


AnyEvent-Discord-Client

 view release on metacpan or  search on metacpan

lib/AnyEvent/Discord/Client.pm  view on Meta::CPAN

11
12
13
14
15
16
17
18
19
20
21
use URI;
 
my $debug = 0;
 
sub new {
  my ($class, %args) = @_;
 
  my $self = {

lib/AnyEvent/Discord/Client.pm  view on Meta::CPAN

171
172
173
174
175
176
177
178
179
180
181
die "invalid message" unless ref $msg eq 'HASH' && defined $msg->{op};
 
$self->{last_seq} = 0+$msg->{s} if defined $msg->{s};
 
if ($msg->{op} == 0) { #dispatch
  print "\e[1;30mdispatch event $msg->{t}:".Dumper($msg->{d})."\e[0m\n" if $debug;
  $event_handler{$msg->{t}}($self, $msg->{d}) if $event_handler{$msg->{t}};
} elsif ($msg->{op} == 10) { #hello
  $self->{heartbeat_timer} = AnyEvent->timer(
    after => $msg->{d}{heartbeat_interval}/1e3,
    interval => $msg->{d}{heartbeat_interval}/1e3,

lib/AnyEvent/Discord/Client.pm  view on Meta::CPAN

184
185
186
187
188
189
190
191
192
193
194
      },
    );
  } elsif ($msg->{op} == 11) { #heartbeat ack
    # ignore for now; eventually, notice missing ack and reconnect
  } else {
    print "\e[1;30mnon-event message op=$msg->{op}:".Dumper($msg)."\e[0m\n" if $debug;
  }
});
 
$self->{conn}->on(parse_error => sub {
  my ($connection, $error) = @_;

 view all matches for this distribution


AnyEvent-Discord

 view release on metacpan or  search on metacpan

lib/AnyEvent/Discord.pm  view on Meta::CPAN

53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
  };
}
 
method on(Str $event_type, CodeRef $handler) {
  $event_type = lc($event_type);
  $self->_debug('Requesting attach of handler ' . $handler . ' to event ' . $event_type);
 
  $self->_events->{$event_type} //= [];
  return if (scalar(grep { $_ eq $handler } @{$self->_events->{$event_type}}) > 0);
 
  $self->_debug('Attaching handler ' . $handler . ' to event ' . $event_type);
  push( @{$self->_events->{$event_type}}, $handler );
}
 
method off(Str $event_type, CodeRef $handler?) {
  $event_type = lc($event_type);
  $self->_debug('Requesting detach of handler ' . ($handler or 'n/a') . ' from event ' . $event_type);
  if ($self->_events->{$event_type}) {
    if ($handler) {
      my $index = 0;
      while ($index < scalar(@{$self->_events->{$event_type}})) {
        if ($self->_events->{$event_type}->[$index] eq $handler) {
          $self->_debug('Detaching handler ' . $handler . ' from event ' . $event_type);
          splice( @{$self->_events->{$event_type}}, $index, 1 );
        }
        $index++;
      }
    } else {
      $self->_debug('Detaching ' . scalar(@{$self->_events->{$event_type}}) . ' handler(s) from event ' . $event_type);
      delete($self->_events->{$event_type});
    }
  }
}
 
method connect() {
  my $gateway = $self->_lookup_gateway();
 
  $self->_debug('Connecting to ' . $gateway);
 
  my $ws = AnyEvent::WebSocket::Client->new($self->socket_options);
  $ws->connect($gateway)->cb(sub {
    my $socket = eval { shift->recv };
    if ($@) {
      $self->_debug('Received error connecting: ' . $@);
      $self->_handle_internal_event('error', $@);
      return;
    }
    $self->_debug('Connected to ' . $gateway);
 
    $self->_socket($socket);
 
    # If we send malformed content, bail out
    $socket->on('parse_error', sub {
      my ($c, $error) = @_;
      $self->_debug(Data::Dumper::Dumper($error));
      die $error;
    });
 
    # Handle reconnection
    $socket->on('finish', sub {
      my ($c) = @_;
      $self->_debug('Received disconnect');
      $self->_handle_internal_event('disconnected');
      unless ($self->_force_disconnect()) {
        my $seconds = $self->_backoff->failure();
        $self->_debug('Reconnecting in ' . $seconds);
        my $reconnect;
        $reconnect = AnyEvent->timer(
          after => $seconds,
          cb    => sub {
            $self->connect();

lib/AnyEvent/Discord.pm  view on Meta::CPAN

134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
$self->_trace('ws in: ' . $message->{'body'});
my $payload;
try {
  $payload = AnyEvent::Discord::Payload->from_json($message->{'body'});
} catch {
  $self->_debug($_);
  return;
};
unless ($payload and defined $payload->op) {
  $self->_debug('Invalid payload received from Discord: ' . $message->{'body'});
  return;
}
$self->_sequence(0 + $payload->s) if ($payload->s and $payload->s > 0);
 
if ($payload->op == 10) {

lib/AnyEvent/Discord.pm  view on Meta::CPAN

155
156
157
158
159
160
161
162
163
164
        $self->_handle_event($payload);
      }
    });
 
    $self->_discord_identify();
    $self->_debug('Completed connection sequence');
    $self->_backoff->success();
    AnyEvent->condvar->send();
  });
}

lib/AnyEvent/Discord.pm  view on Meta::CPAN

211
212
213
214
215
216
217
218
219
220
221
  return;
}
 
# Send the 'identify' event to the Discord websocket
method _discord_identify() {
  $self->_debug('Sending identify');
  $self->_ws_send_payload(AnyEvent::Discord::Payload->from_hashref({
    op => 2,
    d  => {
      token           => $self->token,
      compress        => JSON::false,

lib/AnyEvent/Discord.pm  view on Meta::CPAN

231
232
233
234
235
236
237
238
239
240
241
}
 
# Send a payload to the Discord websocket
method _ws_send_payload(AnyEvent::Discord::Payload $payload) {
  unless ($self->_socket) {
    $self->_debug('Attempted to send payload to disconnected socket');
    return;
  }
  my $msg = $payload->as_json;
  $self->_trace('ws out: ' . $msg);
  $self->_socket->send($msg);

lib/AnyEvent/Discord.pm  view on Meta::CPAN

256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
# Dispatch an internal event type
method _handle_internal_event(Str $type) {
  foreach my $event_source (qw(_internal_events _events)) {
    if ($self->{$event_source}->{$type}) {
      map {
        $self->_debug('Sending ' . ( $event_source =~ /internal/ ? 'internal' : 'caller' ) . ' event ' . $type);
        $_->($self);
      } @{ $self->{$event_source}->{$type} };
    }
  }
}
 
# Dispatch a Discord event type
method _handle_event(AnyEvent::Discord::Payload $payload) {
  my $type = lc($payload->t);
  $self->_debug('Got event ' . $type);
  foreach my $event_source (qw(_internal_events _events)) {
    if ($self->{$event_source}->{$type}) {
      map {
        $self->_debug('Sending ' . ( $event_source =~ /internal/ ? 'internal' : 'caller' ) . ' event ' . $type);
        $_->($self, $payload->d, $payload->op);
      } @{ $self->{$event_source}->{$type} };
    }
  }
}
 
# Send debug messages to console if verbose is >=1
method _debug(Str $message) {
  say time . ' ' . $message if ($self->verbose);
}
 
# Send trace messages to console if verbose is 2
method _trace(Str $message) {
  say time . ' ' . $message if ($self->verbose and $self->verbose == 2);
}
 
# Called when Discord provides the 'hello' event
method _event_hello(AnyEvent::Discord::Payload $payload) {
  $self->_debug('Received hello event');
  my $interval = $payload->d->{'heartbeat_interval'};
  my $timer = AnyEvent->timer(
    after    => $interval * rand() / 1000,
    interval => $interval / 1000,
    cb       => sub {
      $self->_debug('Heartbeat');
      $self->_ws_send_payload(AnyEvent::Discord::Payload->from_hashref({
        op => 1,
        d  => $self->_sequence()
      }));
      AnyEvent->condvar->send();

lib/AnyEvent/Discord.pm  view on Meta::CPAN

400
401
402
403
404
405
406
407
408
409
410
Used to override options to sent to AnyEvent::WebSocket::Client, if needed.
 
=item verbose (Num) (defaults to 0)
 
Verbose output, writes internal debug information at 1, additionally writes
network conversation at 2.
 
=back
 
=head1 DATA ACCESSORS

 view all matches for this distribution


AnyEvent-EC2-Tiny

 view release on metacpan or  search on metacpan

lib/AnyEvent/EC2/Tiny.pm  view on Meta::CPAN

79
80
81
82
83
84
85
86
87
88
89
my $ec2 = AnyEvent::EC2::Tiny->new(
    AWSAccessKey => $ENV{'AWS_ACCESS_KEY'},
    AWSSecretKey => $ENV{'AWS_SECRET_KEY'},
    region       => $ENV{'AWS_REGION'},
    debug        => 1,
);
 
# We are essentially encoding 'raw' EC2 API calls with a v2
# signature and turning XML responses into Perl data structures
my $xml = $ec2->send(

 view all matches for this distribution


AnyEvent-Eris

 view release on metacpan or  search on metacpan

lib/AnyEvent/eris/Server.pm  view on Meta::CPAN

7
8
9
10
11
12
13
14
15
16
 
my @_STREAM_NAMES     = qw(subscription match debug full regex);
my %_STREAM_ASSISTERS = (
    subscription => 'programs',
    match        => 'words',
);

lib/AnyEvent/eris/Server.pm  view on Meta::CPAN

21
22
23
24
25
26
27
28
29
30
31
);
 
sub _server_error {
    my ( $self, $err_str, $fatal ) = @_;
    my $err_num = $!+0;
    AE::log debug => "SERVER ERROR: $err_num, $err_str";
 
    $fatal and $self->{'_cv'}->send;
}
 
my %client_commands = (

lib/AnyEvent/eris/Server.pm  view on Meta::CPAN

33
34
35
36
37
38
39
40
41
42
43
nofullfeed  => qr{^nofull(feed)?},
subscribe   => qr{^sub(?:scribe)?\s(.*)},
unsubscribe => qr{^unsub(?:scribe)?\s(.*)},
match       => qr{^match (.*)},
nomatch     => qr{^nomatch (.*)},
debug       => qr{^debug},
nobug       => qr{^no(de)?bug},
regex       => qr{^re(?:gex)?\s(.*)},
noregex     => qr{^nore(gex)?},
status      => qr{^status},
dump        => qr{^dump\s(\S+)},

lib/AnyEvent/eris/Server.pm  view on Meta::CPAN

142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
        join( ', ', @words )                       .
        "\n"
    );
}
 
sub handle_debug {
    my ( $self, $handle, $SID ) = @_;
 
    $self->remove_stream( $SID, 'full' );
 
    $self->clients->{$SID}{'debug'} = 1;
    $handle->push_write("Debugging enabled.\n");
}
 
sub handle_nobug {
    my ( $self, $handle, $SID ) = @_;
 
    $self->remove_stream( $SID, 'debug' );
    delete $self->clients->{$SID}{'debug'};
    $handle->push_write("Debugging disabled.\n");
}
 
sub handle_regex {
    my ( $self, $handle, $SID, $args ) = @_;

lib/AnyEvent/eris/Server.pm  view on Meta::CPAN

292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
}
 
sub hangup_client {
    my ( $self, $SID ) = @_;
    delete $self->clients->{$SID};
    AE::log debug => "Client Termination Posted: $SID";
}
 
sub remove_stream {
    my ( $self, $SID, $stream ) = @_;
    AE::log debug => "Removing '$stream' for $SID";
 
    my $client_streams = delete $self->clients->{$SID}{'streams'}{$stream};
 
    # FIXME:
    # I *think* what this is supposed to do is delete assists

lib/AnyEvent/eris/Server.pm  view on Meta::CPAN

361
362
363
364
365
366
367
368
369
370
371
on_eof => sub {
    my ($hdl) = @_;
    my $SID = $inner_self->_session_id($hdl);
    $inner_self->hangup_client($SID);
    $hdl->destroy;
    AE::log debug => "SERVER, client $SID disconnected.";
},
 
on_read => sub {
    my ($hdl) = @_;
    chomp( my $line = delete $hdl->{'rbuf'} );

lib/AnyEvent/eris/Server.pm  view on Meta::CPAN

430
431
432
433
434
435
436
437
438
439
440
        );
 
        1;
    } or do {
        my $error = $@ || 'Zombie error';
        AE::log debug => "Graphite server setup failed: $error";
    }
}
 
sub stats {
    my $self = shift;

lib/AnyEvent/eris/Server.pm  view on Meta::CPAN

460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
            eval {
                $self->{'_graphite'}->send($metric, $stats->{$stat}, $time);
                1;
            } or do {
                my $error = $@ || 'Zombie error';
                AE::log debug => 'Error sending statistics, reconnecting.';
                $self->graphite_connect;
                last;
            }
        }
    }
 
    AE::log debug => 'STATS: ' .
                     join ', ', map "$_:$stats->{$_}", keys %{$stats};
}
 
sub run {
    my $self       = shift;

 view all matches for this distribution


AnyEvent-FTP

 view release on metacpan or  search on metacpan

example/fget.pl  view on Meta::CPAN

10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
use Term::Prompt qw( prompt );
use Getopt::Long qw( GetOptions );
use Path::Class qw( file );
 
my $debug = 0;
my $progress = 0;
my $active = 0;
 
GetOptions(
  'd' => \$debug,
  'p' => \$progress,
  'a' => \$active,
);
 
my $remote = shift;

example/fget.pl  view on Meta::CPAN

69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
$ftp->on_send(sub {
  my($cmd, $arguments) = @_;
  $arguments //= '';
  $arguments = 'XXXX' if $cmd eq 'PASS';
  say "CLIENT: $cmd $arguments"
    if $debug;
});
 
$ftp->on_each_response(sub {
  my $res = shift;
  if($debug)
  {
    say sprintf "SERVER: [ %d ] %s", $res->code, $_ for @{ $res->message };
  }
});

 view all matches for this distribution


AnyEvent-FriendFeed-Realtime

 view release on metacpan or  search on metacpan

inc/Spiffy.pm  view on Meta::CPAN

50
51
52
53
54
55
56
57
58
59
60
no warnings;
my $self_package = shift;
 
# XXX Using parse_arguments here might cause confusion, because the
# subclass's boolean_arguments and paired_arguments can conflict, causing
# difficult debugging. Consider using something truly local.
my ($args, @export_list) = do {
    local *boolean_arguments = sub {
        qw(
            -base -Base -mixin -selfless
            -XXX -dumper -yaml

 view all matches for this distribution


AnyEvent-Gearman

 view release on metacpan or  search on metacpan

inc/Spiffy.pm  view on Meta::CPAN

57
58
59
60
61
62
63
64
65
66
67
no warnings;
my $self_package = shift;
 
# XXX Using parse_arguments here might cause confusion, because the
# subclass's boolean_arguments and paired_arguments can conflict, causing
# difficult debugging. Consider using something truly local.
my ($args, @export_list) = do {
    local *boolean_arguments = sub {
        qw(
            -base -Base -mixin -selfless
            -XXX -dumper -yaml

 view all matches for this distribution


AnyEvent-Gmail-Feed

 view release on metacpan or  search on metacpan

inc/Spiffy.pm  view on Meta::CPAN

50
51
52
53
54
55
56
57
58
59
60
no warnings;
my $self_package = shift;
 
# XXX Using parse_arguments here might cause confusion, because the
# subclass's boolean_arguments and paired_arguments can conflict, causing
# difficult debugging. Consider using something truly local.
my ($args, @export_list) = do {
    local *boolean_arguments = sub {
        qw(
            -base -Base -mixin -selfless
            -XXX -dumper -yaml

 view all matches for this distribution


AnyEvent-GnuPG

 view release on metacpan or  search on metacpan

lib/AnyEvent/GnuPG.pm  view on Meta::CPAN

113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
my $commands;
$self->{status_fd}->readlines_cb(
    sub {
        my $line = shift;
        unless ( defined $line ) {
            AE::log debug => "end of status parsing";
            $cv->send($commands);
        }
        if ( my ( $cmd, $arg ) =
            $line =~ m{^\[gnupg:\]\s+(\w+)\s*(.+)?\s*$}i )
        {
            $arg ||= '';
            my @args = $arg ? ( split /\s+/, $arg ) : ();
            AE::log debug => "got command: $cmd ($arg)";
            try {
                for ( lc $cmd ) {
                    _eq('newsig')  && do { last };
                    _eq('goodsig') && do { last };
                    _eq('expsig')

lib/AnyEvent/GnuPG.pm  view on Meta::CPAN

319
320
321
322
323
324
325
326
327
328
329
    catch {
        s{\s+$}{};
        $self->_abort_gnupg( $_, $cv );
    }
    finally {
        AE::log debug => "arguments parsed as: ["
          . ( join ', ', map { "'$_'" } @args ) . "]";
    }
}
else {
    return $self->_abort_gnupg(

lib/AnyEvent/GnuPG.pm  view on Meta::CPAN

341
342
343
344
345
346
347
348
349
350
351
352
353
354
AE::log error => $msg if $msg;
if ( $self->{gnupg_proc} ) {
    $self->{gnupg_proc}->fire_and_kill(
        10,
        sub {
            AE::log debug => "fired and killed";
            $self->_end_gnupg(
                sub {
                    AE::log debug => "gnupg aborted";
                    $cv->croak($msg);
                }
            );
        }
    );

lib/AnyEvent/GnuPG.pm  view on Meta::CPAN

385
386
387
388
389
390
391
392
393
394
395
              )
            {
                delete $self->{$_};
            }
 
            AE::log debug => "gnupg exited";
            $cv->send;
        }
    );
 
}

lib/AnyEvent/GnuPG.pm  view on Meta::CPAN

426
427
428
429
430
431
432
433
434
435
436
unshift @$cmdline, '--status-fd'  => $status;
unshift @$cmdline, '--command-fd' => $command;
 
my $err;
 
AE::log debug => "running $gpg " . join( ' ' => @$cmdline );
my $proc = AnyEvent::Proc->new(
    bin           => $gpg,
    args          => $cmdline,
    extras        => [ $status, $command ],
    ttl           => 600,

lib/AnyEvent/GnuPG.pm  view on Meta::CPAN

448
449
450
451
452
453
454
455
456
457
458
    $self->{command_fd} = $command;
    $self->{status_fd}  = $status;
    $self->{gnupg_proc} = $proc;
 
    AE::log debug => "gnupg ready";
 
    $proc;
}
 
sub _send_command {

 view all matches for this distribution


( run in 0.742 second using v1.01-cache-2.11-cpan-87723dcf8b7 )