First Perl 6 experiences part 2
When I first looked at this Sunday night I promised myself I'd spend no more than an hour or two on it. Well that went right out of the window :/
My initial aim was to get it working on Vista and run as CGI on IIS. This didn't work. I've spent the last 3 days playing about with it and testing out a load of things to find out why. Eventually with the help of the good people on IRC #perl6 and #parrot we found the problem and came up with a fix. Here are some of the details...
Following on from my last post, the people of the perl6-compiler@perl.org mailing list pointed me to a Rakudo build fix so I was able to build perl.exe by running mingw32-make. This has now been patched into Rakudo on github so if you are following this you shouldn't have the issue I had.
Playing with Rakudo on the command prompt I made my first hello world script 'saved as hello.p6':-
#!c:/temp/rakudo/perl6.exe
say( 'hello' );
And ran it with 'perl6 hello.p6'.
Following that I prepared a version for CGI that included the content-type header:-
#!c:/temp/rakudo/perl6.exe
say( "Content-Type: text/html\r\n\r" ); # say adds the last \n
say( 'hello' );
I checked this on the command prompt to make sure it was outputting properly and it was. Now to setup with IIS.
When I first looked at this Sunday night I promised myself I'd spend no more than an hour or two on it. Well that went right out of the window :/
My initial aim was to get it working on Vista and run as CGI on IIS. This didn't work. I've spent the last 3 days playing about with it and testing out a load of things to find out why. Eventually with the help of the good people on IRC #perl6 and #parrot we found the problem and came up with a fix. Here are some of the details...
Following on from my last post, the people of the perl6-compiler@perl.org mailing list pointed me to a Rakudo build fix so I was able to build perl.exe by running mingw32-make. This has now been patched into Rakudo on github so if you are following this you shouldn't have the issue I had.
Playing with Rakudo on the command prompt I made my first hello world script 'saved as hello.p6':-
#!c:/temp/rakudo/perl6.exe
say( 'hello' );
And ran it with 'perl6 hello.p6'.
Following that I prepared a version for CGI that included the content-type header:-
#!c:/temp/rakudo/perl6.exe
say( "Content-Type: text/html\r\n\r" ); # say adds the last \n
say( 'hello' );
I checked this on the command prompt to make sure it was outputting properly and it was. Now to setup with IIS.
Continue reading First Perl 6 experiences part 2.