Created
May 29, 2010 07:49
-
-
Save gardejo/418115 to your computer and use it in GitHub Desktop.
Force them to run your script with the intentional interpreter!
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
@rem= ' | |
@echo off | |
setlocal EnableExtensions EnableDelayedExpansion | |
if "%strawberry%" equ "" ( | |
set strawberry=\\{OUR_SHARED_DIRECTORY}\env\perl\5.12.0.1\ | |
) | |
set path=%path%;%strawberry%\c\bin;%strawberry%\perl\bin;%strawberry%\perl\site\bin | |
set perl=%strawberry%\perl\bin\perl.exe | |
%perl% "%~dpnx0" %* | |
if %errorlevel% gtr 0 ( | |
color ce | |
echo. | |
echo 異常終了しました。 | |
echo エラー内容を確認して、任意のキーを押下して実行を終了してください。 | |
pause > nul | |
color | |
) | |
exit /b | |
@rem '; | |
# **************************************************************** | |
# Perl section goes here! | |
# **************************************************************** | |
use 5.012_000; | |
use strict; | |
use warnings; | |
{ | |
package Foo; | |
use namespace::autoclean; | |
use Moose; | |
... | |
__PACKAGE__->meta->make_immutable; | |
1; | |
} | |
main() | |
unless caller(); | |
sub main { | |
... | |
} | |
__END__ |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment