eal> if available, will fall back to JSON via L<JSON::MaybeXS>. Set
C< MIRAI_SERIALISATION > in the environment to override:
=over 4
=item * Sereal
=item * JSON
=back
=cut
use constant SERIALISA
TION => $ENV{MIRAI_SERIALISATION} || (eval { require Sereal } ? 'Sereal' : 'JSON');
use Socket qw(AF_UNIX SOCK_STREAM PF_UNSPEC);
use IO::Handle;
# Everything after this point should happen at
# run
y $line = <$child_read>;
# $child_read->close or die $!;
my $encoder = SERIALISATION eq 'JSON' ? JSON::MaybeXS->new(utf8 => 1) : Sereal::Encoder->new;
App::mirai::Subprocess->setup(sub {
eva
Tickit::TabRibbon;
use App::mirai::Tickit::Widget::Logo;
use Future;
use POSIX qw(strftime);
use JSON::MaybeXS;
use File::Spec;
my %widget;
sub user_path { File::Spec->catpath($_[0]->{user_path}, $
left lines cols)
]
};
}
open my $fh, '>', $sp or die $!;
$fh->print(encode_json($session));
};
menuitem 'Save session as...' => sub { warn 'save as' };
menuspacer;
m
open my $fh, '<', $path or die "Unable to open last session $path - $!";
my $session = decode_json(do { local $/; <$fh> });
tickit->later(sub {
my @win = @{$widget{desktop}->{widgets}};
fo