X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=blobdiff_plain;f=lib%2FDX%2FShellFrontend.pm;h=29eac40166649bcc2159c48234ab25aa4bda04fe;hb=80d78e1b96b3db270c57269ab0bb41db584e1170;hp=1b8c66e37181e49ab6947e951c9b082e247f46bf;hpb=a97779a16ec8afef233e00d91d541d4972fa0fd0;p=scpubgit%2FDX.git diff --git a/lib/DX/ShellFrontend.pm b/lib/DX/ShellFrontend.pm index 1b8c66e..29eac40 100644 --- a/lib/DX/ShellFrontend.pm +++ b/lib/DX/ShellFrontend.pm @@ -1,15 +1,16 @@ package DX::ShellFrontend; +use Types::Standard qw(Enum); use IO::Handle; use Caroline; use DX::Class; has session => ( - is => 'ro', required => 1, + is => 'ro', isa => ShellSession, required => 1, handles => [ qw(is_complete_command_string eval_command_string) ] ); -has session_mode => (is => 'rwp', required => 1); +has session_mode => (is => 'rwp', isa => Enum['shell','query'], required => 1); has readline => (is => 'lazy', builder => sub { Caroline->new });