();
use File::Spec ();
use Scalar::Util ();
use Params::Util ();
use JSON::XS ();
use LWP::UserAgent ();
use HTTP::Cookies ();
use HTTP::Reques
rver found.';
my $response = $self->POST(
"$server/register",
'Content-Type' => 'application/json',
'Content' => $self->encode( \%params ),
);
if ( $response->code == 201 ) {
return 'A
server found.';
my $response = $self->PUT(
"$server/config",
'Content-Type' => 'application/json',
'Content' => $self->encode( \%copy ),
);
if ( $response->code == 204 ) {
return 'Con
e preprocessed
java => 'text/x-java-source',
js => 'application/javascript',
json => 'application/json',
lsp => 'application/x-lisp',
lua => 'text/x-lua',
mak => 'text/x-makefil
=> 'JavaScript',
lexer => Wx::wxSTC_LEX_ESCRIPT, # CONFIRMED
},
'application/json' => {
name => 'JSON',
lexer => Wx::wxSTC_LEX_ESCRIPT, # CONFIRMED
},
'application/x-latex' => {
nts {
'application/javascript' => 'Padre::Plugin::JavaScript::Document',
'application/json' => 'Padre::Plugin::JavaScript::Document',
}
The C<registered_documents> method can be u
# Non-preprocessed C
java => 'text/x-java',
js => 'application/javascript',
json => 'application/json',
lsp => 'application/x-lisp',
lua => 'text/x-lua',
m => 'text/x-matlab',
ipt',
supertype => 'text/x-csrc',
);
Padre::MIME->create(
type => 'application/json',
name => 'JSON',
supertype => 'application/javascript',
);
Padre::MIME->create(
type => 'appl
application/javascript' => Wx::Scintilla::Constant::SCLEX_ESCRIPT, # CONFIRMED
'application/json' => Wx::Scintilla::Constant::SCLEX_ESCRIPT, # CONFIRMED
'application/x-latex' =
$server, $VERSION, $report->{instance_id};
# my $query = {
# instance_id =>
# data => JSON::encode_json($report),
# };
# TO DO: Enable as soon as the server is functional:
# $self->task_requ
x-perl',
'application/x-php' => 'application/perl', # Temporary solution
'application/json' => 'application/javascript',
'application/javascript' => 'text/x-csrc',
'text/x-java'
n',
htm => 'text/html',
html => 'text/html',
js => 'application/javascript',
json => 'application/json',
latex => 'application/x-latex',
lsp => 'application/x-lisp',
lua => 'text/x-l
using MetaCPAN JSON API
$self->{model} = $self->metacpan_autocomplete($query);
} elsif ( $command eq 'pod' ) {
# Find the POD's HTML and SYNOPSIS section
# using MetaCPAN JSON API
$self->{m
,
);
# Convert ElasticSearch Perl query to a JSON request
require JSON::XS;
my $json_request = JSON::XS::encode_json( \%payload );
# POST the json request to api.metacpan.org
require LWP::User
Content => $json_request,
);
unless ( $response->is_success ) {
TRACE( sprintf( "Got '%s' from metacpan.org", $response->status_line ) )
if DEBUG;
return [];
}
# Decode json response the
ngs
return 0 if $_->{name} =~ /^(?:blib|_build|inc|Makefile(?:\.old)?|pm_to_blib|MYMETA\.(?:yml|json))\z/;
# It is fairly common to get bogged down in NYTProf output
return 0 if $_->{name} =~ /
ild files
push @$rule, '(?:^|\\/)(?:blib|_build|inc|Makefile(?:\.old)?|pm_to_blib|MYMETA\.(?:yml|json))\z';
# Ignore the enormous NYTProf output
push @$rule, '(?:^|\\/)nytprof(?:\.out)?\z';
retu
b config {
$_[0]->{ide}->config;
}
sub encode {
require JSON::XS;
JSON::XS->new->encode( $_[1] );
}
sub decode {
require JSON::XS;
JSON::XS->new->decode( $_[1] );
}
1;
# Copyright 2008-2012 T