| 1 | package Devel::ebug::Backend::Plugin::Ping; | ||||||||||
| 2 | |||||||||||
| 3 | 6 | ▶ | use strict; | ||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||
| 4 | 6 | ▶ | use warnings; | ||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||
| 5 | |||||||||||
| 6 | 6 | our $VERSION = '0.69'; # VERSION | |||||||||
| 7 | |||||||||||
| 8 | 6 | ▶ | sub register_commands { | ||||||||
|
Subroutine
register_commands: called CC=1 SCAR=0.0
Pod
undocumented
| |||||||||||
| 9 | 6 | return ( ping => { sub => \&ping } ); | |||||||||
| 10 | |||||||||||
| 11 | } | ||||||||||
| 12 | |||||||||||
| 13 | 6 | ▶ | sub ping { | ||||||||
|
Subroutine
ping: called CC=2 SCAR=7.0
Pod
undocumented
| |||||||||||
| 14 | 6 | my($req, $context) = @_; | |||||||||
| 15 | 6 | my $secret = $ENV{SECRET}; | |||||||||
| 16 | 6 | ▶ | die "Did not pass secret" unless $req->{secret} eq $secret; | ||||||||
|
Branch: 1 branch
| |||||||||||
| 17 | 6 | $ENV{SECRET} = ""; | |||||||||
| 18 | return { | ||||||||||
| 19 | 6 | version => $DB::VERSION, | |||||||||
| 20 | pid => $$, # the debuggee itself, which is what interrupt() signals | ||||||||||
| 21 | } | ||||||||||
| 22 | } | ||||||||||
| 23 | |||||||||||
| 24 | 6 | 1; | |||||||||
| 25 | |||||||||||
| 26 | __END__ | ||||||||||