Dist-Zilla-Shell

 view release on metacpan or  search on metacpan

lib/Dist/Zilla/App/Command/shell.pm  view on Meta::CPAN


    require Term::ReadLine;
    require Text::ParseWords;

    my $term = Term::ReadLine->new('Dist::Zilla shell');
    my $prompt = 'DZ> ';

    while (1) {
	my $line = $term->readline($prompt);

	local @ARGV = Text::ParseWords::shellwords($line);
	next unless @ARGV;
	last if $ARGV[0] =~ /\A(?:exit|x|quit|q)\z/;

	if (exists $builtins{$ARGV[0]}) {
	    local $@;
	    eval { $app_class->run(@ARGV) };
	    print STDERR $@ if $@;
	} else {
	    # Pass the line as-is to the shell
	    system $line;

 view all matches for this distribution
 view release on metacpan -  search on metacpan

( run in 1.021 second using v1.00-cache-2.02-grep-82fe00e-cpan-da92000dfeb )