Beagle
view release on metacpan - search on metacpan
view release on metacpan or search on metacpan
lib/Beagle/Cmd.pm view on Meta::CPAN
package Beagle::Cmd;
use Any::Moose;
use Beagle::Util;
extends any_moose('X::App::Cmd');
before 'run' => sub {
@ARGV = map { defined $_ ? decode( locale => $_ ) : $_ } @ARGV;
if ( !@ARGV ) {
my $command =
$ENV{BEAGLE_DEFAULT_COMMAND}
? decode( locale => $ENV{BEAGLE_DEFAULT_COMMAND} )
: core_config->{default_command};
if ($command) {
require Text::ParseWords;
@ARGV = Text::ParseWords::shellwords($command);
lib/Beagle/Web/Router.pm view on Meta::CPAN
eval { $data = from_json( request()->content, { utf8 => 1 } ) };
if ( $@ ) {
return to_json( { error => { message => decode( locale => $@ ) } } );
}
else {
my $params = $data->{params} || [];
local $ENV{BEAGLE_WEB_TERM} = 1;
local @ARGV = ( $data->{method}, @$params );
my $out;
open my $out_fh, '>', \$out or die $!;
local *STDOUT = $out_fh;
local *STDERR = $out_fh;
eval { Beagle::Cmd->run };
my $ret = { id => $data->{id} };
if ($@) {
$ret->{error}{message} = decode( locale => $@ );
}
view all matches for this distributionview release on metacpan - search on metacpan
( run in 1.799 second using v1.00-cache-2.02-grep-82fe00e-cpan-da92000dfeb )