{require JSON}) {
my $_file = File::Temp->new(SUFFIX => '.json');
my $str = JSON::objToJson($conf, {pretty => 1, indent => 2});
open(my $fh, ">$_file");
print $fh $str;
$TESTS{json} = sub {
);
};
$TESTS{json2} = sub {
open(my $fh, "<$_file") || die "Couldn't open file: $!";
read($fh, my $str, -s $_file);
my $hash = JSON::jsonToObj($str);
};
$files{json} = $_file;
}
e tests that we support
if (eval {require JSON}) {
my $_file = $tmpnam. '.json';
$TESTS{json} = sub {
$cob->write_ref($file, $str);
};
$files{json} = $_file;
}
if (eval {require Storable}
eceipt for the data back to the sender.
=back
=cut
use Carp;
use File::Path qw(mkpath);
use JSON::XS qw();
use POSIX qw(strftime);
use Plack::Request;
use Net::AS2;
use Net::AS2::PS
the C<CertificateDirectory>
L<Net::AS2> hash key.
=item partnership_dir
This directory contains JSON files that each define a partnership
between two AS2 Protocol Servers.
Subdirectories may be use
nership
The subdirectory structure is created and named after the partnership
file (without the .json extension). For security, this directory
structure is created with owner read/write only.
The fi
cludes the file
e.g. due to file size too large), C<nometa> means file does not contain
META.{yml,json}, C<unsupported> means file archive format is not supported (e.g.
rar), C<err> means some other e
ool>
(No description)
=item * B<has_makefilepl> => I<bool>
(No description)
=item * B<has_metajson> => I<bool>
(No description)
=item * B<has_metayml> => I<bool>
(No description)
=item * B<ind
(so if
your sample argument is a hash like C<{}> (in JSON), you have to specify it as
C<< {"value":{}, "summary":"Optional summary..."} >> (in JSON).
Note that a Sah schema can also have an L<example
etadata in: it might be put alongside the code, separated in another source
code, encoded in YAML/JSON, put in database, or whatever. It is up to the
tools/implementations to provide the mechanism. If
looks for C<_riap()> function in packages
to request metadata. One can also store the metadata as JSON in database or in
files.
=head1 HOMEPAGE
Please visit the project's homepage at L<https://metac
in its journal:
BEGIN;
INSERT INTO action (tx_id,ctime,f,args) VALUES
($tx_id,$now,$fname,JSON($args)); -- $act_id
UPDATE tx SET last_action_id=$act_id WHERE id=$tx_id;
COMMIT;
3) TM reques
ok (meta has been extracted and
-- parsed), err (META.json/META.yml has some error), nometa (no
-- META.json/META.yml found).
meta_status TEXT,
met
tus: ok (sub names have been parsed/indexed)
sub_status TEXT,
has_metajson INTEGER,
has_metayml INTEGER,
has_makefilepl INTEGER,
has_
dist BOOLEAN,
pod_status TEXT,
sub_status TEXT,
has_metajson INTEGER,
has_metayml INTEGER,
has_makefilepl INTEGER,
has_
se the C<--phase> and C<--rel> options.
Note that dependencies information are taken from C<META.json> or C<META.yml>
files. Not all releases (especially older ones) contain them. L<lcpan> (like
Meta
se the C<--phase> and C<--rel> options.
Note that dependencies information are taken from C<META.json> or C<META.yml>
files. Not all releases (especially older ones) contain them. L<lcpan> (like
Meta
cludes the file
e.g. due to file size too large), C<nometa> means file does not contain
META.{yml,json}, C<unsupported> means file archive format is not supported (e.g.
rar), C<err> means some other e
ool>
(No description)
=item * B<has_makefilepl> => I<bool>
(No description)
=item * B<has_metajson> => I<bool>
(No description)
=item * B<has_metayml> => I<bool>
(No description)
=item * B<ind
package Perl::LanguageServer::Methods ;
use Moose::Role ;
use JSON ;
use Data::Dump qw{pp} ;
no warnings 'uninitialized' ;
# ----------------------------------------------------------------
#print STDERR "Call initialize\n" ;
$self -> logger ("initialize ", $Perl::LanguageServer::jsonpretty -> encode ($req -> params), "\n")
if ($Perl::LanguageServer::debug1) ;
$Per
s goto definition support.
#definitionProvider?: boolean;
definitionProvider => JSON::true,
# The server provides Goto Type Definition support.
# Since 3.6.0
ent-perl libclass-refresh-perl libcompiler-lexer-perl \
libdata-dump-perl libio-aio-perl libjson-perl libmoose-perl libpadwalker-perl \
libscalar-list-utils-perl libcoro-perl
o start or container to exec inside or pod to use
=back
=head2 Debugger Settings for launch.json
=over
=item * C<type>: needs to be C<perl>
=item * C<request>: only C<launch> is support
ainerCmd> and C<conatinerName>.
There are more container options, see above.
.vscode/settings.json
{
"perl": {
"enable": true,
"containerCmd": "docker",
gram,
systemProcessId => $pid,
isLocalProcess => JSON::true(),
startMethod => 'launch',
}) ;
r
);
use Coro ;
use Coro::AIO ;
use Coro::Handle ;
use AnyEvent;
use AnyEvent::Socket ;
use JSON ;
use Data::Dump qw{dump pp} ;
use IO::Select ;
use Perl::LanguageServer::Req ;
use Perl::L
on "perl"
Any comments and patches are welcome.
=cut
our $json = JSON -> new -> utf8(1) -> ascii(1) ;
our $jsonpretty = JSON -> new -> utf8(1) -> ascii(1) -> pretty (1) ;
our %running_req
c, $txt) = @_ ;
$txt ||= "<--- Notification: " ;
$notification -> {jsonrpc} = '2.0' ;
my $outdata = $json -> encode ($notification) ;
my $guard = $self -> out_semaphore -> guard
Default debug configuration is now automatically provided without
the need to create a C<launch.json> first (#103)
=item * Add Option C<cacheDir> to specify location of cache dir (#113)
=item
t send at once from VSCode to LanguageServer
=item * Fix: cwd parameter for debugger in launch.json had no effect (#99)
=item * Fix: Correctly handle paths with drive letters on windows
=item
anguageServer usable with readonly directories.
=item * updated dependencies package.json & package-lock.json
=item * Fix deep recursion in SymbolView/Parser which was caused by function prototy
plate;
use JSON::MaybeXS;
use Path::Tiny;
use List::Util qw(uniq);
my ($base) = @ARGV;
die "need a base" unless $base;
my $json = JSON::MaybeXS->new;
my $in = $json->decode(path('api.json')->slurp_u
package Perl::LanguageServer::Parser ;
use Moose::Role ;
use Coro ;
use Coro::AIO ;
use JSON ;
use File::Basename ;
use v5.16;
no warnings 'uninitialized' ;
use Compiler::Lexer;
use Data::Dump qw
aio_load ($cachepath, $cache) ;
my $cache_data = eval { $Perl::LanguageServer::json -> decode ($cache) ; } ;
if ($@)
{
$self
die "open $cachepath failed ($!)" ;
aio_write ($ifh, undef, undef, $Perl::LanguageServer::json -> encode ({ version => CacheVersion, vars => $vars}), 0) ;
aio_close ($ifh) ;
}
r::Self;
use Path::Tiny;
use File::ShareDir;
use URI;
use URI::QueryParam;
use URI::Template;
use JSON::MaybeXS;
use Time::Moment;
use Syntax::Keyword::Try;
use Cache::LRU;
use Ryu::Async;
use Ryu::
ync::Github::Repository;
use Net::Async::Github::RateLimit;
use Net::Async::Github::Comment;
use JSON::MaybeUTF8 qw(:v2);
=head1 METHODS
=head2 current_user
Returns information about the current u
),
data => {
sha => $args{sha},
force => ($args{force} ? JSON->true : JSON->false)
},
)
}
=head2 create_pr
Creates a new pull request.
Takes the follo
endpoint
Expands the selected URI via L<URI::Template>. Each item is defined in our C< endpoints.json >
file.
Returns a L<URI> instance.
=head2 http
Accessor for the HTTP client object. Will load
tly defined by github in
L<https://developer.github.com/v3/media/> as C<application/vnd.github.v3+json>.
=head2 base_uri
The L<URI> for requests. Defaults to L<https://api.github.com>.
=head2 http_