$VERSION = '0.4.7';
1;
package main;
use Carp;
use Config::General;
use YAML qw{LoadFile};
use JSON;
use Cwd;
use strict;
use Data::Dumper;
use File::Temp qw/ tempfile /;
use Outthentic::Story;
us
>> 8,$stdout.$stderr);
}
sub config {
$config_data
}
sub dump_config {
my $json = JSON->new->pretty;
print $json->encode(config());
}
sub nocolor {
get_prop('nocolor')
}
sub populate_confi
('json_file_path') and -f get_prop('json_file_path') ){
my $path = get_prop('json_file_path');
open DATA, $path or confess "can't open file $path to read: $!";
my $json_s
::Perl;
1;
package main;
use glue;
use strict;
use JSON;
our $VARIABLES;
our $CAPTURES;
sub config {
my $path = cache_dir()."/config.json";
open CONF, $path or die "can't open file $path t
NF>;
close CONF;
my $json = JSON->new;
return $json->decode($data);
}
sub captures {
return $CAPTURES if $CAPTURES;
my $path = cache_dir()."/captures.json";
open CAPT, $path or di
open file $path to read: $!";
my $data = join '', <CAPT>;
close CAPT;
my $json = JSON->new;
$CAPTURES = $json->decode($data);
return $CAPTURES;
}
sub capture {
captures()->[0]
}
s
package Outthentic::Glue::Bash;
use base 'Exporter';
use JSON;
use strict;
our @EXPORT = qw{
json_var
};
sub json_var {
my $path = $ARGV[0];
my $name = $ARGV[1];
open CONF, $path or die "
pen file $path to read: $!";
my $data = join "", <CONF>;
close CONF;
my $json = JSON->new;
my $conf = $json->decode($data);
for my $n (split /\./, $name){
$conf = $conf->{$n};
t;
use base 'Exporter';
use Outthentic::DSL;
use Outthentic::Story::Stat;
use File::ShareDir;
use JSON;
use Carp;
use Time::localtime;
use File::Path::Tiny;
use Term::ANSIColor;
our @EXPORT = qw{
out_file to read!";
my @out = <RUBY_HOOK_OUT>;
close RUBY_HOOK_OUT;
my $story_vars_json;
for my $l (@out) {
next if $l=~/#/;
quit($1) if $l=~/quit:(.*)/;
outth
l=~/ignore_story_err:\s+(\d)/;
if ($l=~s/story_var_json_begin.*// .. $l=~s/story_var_json_end.*//){
$story_vars_json.=$l;
next;
}
if ($l=~/story:\s+(\S+)