@ECHO OFF rem ark * We have to get perl into our path so this tries to make sure rem * that it will be. Tested *only* on Windows XP. Most users might rem * just as well remove this if they are sure Perl is always in PATH. @PATH | findstr /R /I /O "perl[^\\]*\\bin" >NUL @if ERRORLEVEL 1 ( REM EMBER TO adjust this for the path to perl.EXE on your system. set PATH=c:\ADDITI~1\win32perl\bin;%PATH% ) rem desc * a better dir command that outputs what we expect such a command rem * to do, w/o the leading and trailing junk. doskey udir=perl -le "$ad=pop(@ARGV);$ad=q[.] unless $ad;@zult=(grep{$_ and not /\A\s/}grep[chomp],`cmd /c dir $ad /N/Q/TW`);for((grep substr($_,24,5) eq q[],@zult),(grep substr($_,24,5) ne q[],@zult)){s{\s\s[[:upper:]]+\\}{};print}" $* doskey uloc=perl -MFile::Find=find -MEnv=@PATH -wle "$ARGV[0]=qw[ $* ];die q[An argument is required! Aborting.] unless $ARGV[0];print qq/Looking for $ARGV[0]/;@lf=$ARGV[0];push @lf,qq|$ARGV[0].exe| unless $ARGV[0]=~/\.exe$/i; find(sub{$ef=$_;return unless grep{$ef eq $_ or /\A\Q$ef\E\z/i}@lf;$ff=$File::Find::name;$ff=~y:/:\\:;print $ff and exit 0},@PATH); print q[None found.]" doskey pmquery=perl -le "do{$modn=$_;s!::!/!g;$_.=q[.pm];print qq[$modn is not installed.\n] and next if !(eval{require \"$_\";1} and !$@);$modv=defined(${$modn.q[::VERSION]}) ?${$modn.q[::VERSION]}:q{[version undefined]};$numtyp=(2>$modv=~tr/.//) ?'%%s':'%% 6d';printf qq[ %%-*s $numtyp in %%s\n],(length>30 ? 5+length:15+length),$modn,$modv,$INC{$_}}for @ARGV;" $* doskey perlv=perl -le "printf qq[%%vd$/]=> $^V" doskey checkpath=perl -MEnv=@PATH -le "print for map {-d $_ ? lcfirst($_):qq[$_ ** DOES NOT EXIST **]}@PATH" doskey checkperlinc=perl -le "print for map {-d $_ ? lcfirst($_):qq[$_ ** DOES NOT EXIST **]}@INC" doskey checktempdirs=perl -e "print for map {sprintf(q[%%-6s is %%s].qq[\n], $_, ($ENV{$_} || 'not defined in env'))}qw(TEMP TMP TMPDIR)"