Chinaunix首页 | 论坛 | 博客
  • 博客访问: 589651
  • 博文数量: 207
  • 博客积分: 10128
  • 博客等级: 上将
  • 技术积分: 2440
  • 用 户 组: 普通用户
  • 注册时间: 2004-10-10 21:40
文章分类

全部博文(207)

文章存档

2009年(200)

2008年(7)

我的朋友

分类:

2009-04-29 14:17:56

For my work on the I wanted to check out how one can go and start using Perl 6 ? I have to admit that it was not clear to me so let me write down one of the approaches currently available.

You need an editor and one of the Perl 6 implementations.

Editor

The editor can be vim, emacs or any other text editor good for programming. I think both vim and emacs already have Perl 6 mode, I don't know about the others but I am not planning to write about any of these. I obviously will recommend and its

Perl 6 implementation

Perl 6 is planned to have multiple implementation like most of the other languages have but unlike Perl 5 which only has a single implementation. I am going to use running on as it is the one that currently shows the biggest potential.

Padre

Installing Padre can be easy or difficult depending on various things, most notably luck. Generally it should be enough to type install Padre in your CPAN shell but there might be some extra steps you need to make in order to get that work. The provides further details. and already have Padre packaged and while those are old version, it might be the best to use their package management and then upgrade. They might even provide backported versions of the latest Padre.

Padre, Parrot and Rakudo on Windows

If you are running Windows we distribute a version of Portable Strawberry Perl (beta 1) with all the necessary pieces already installed. It can be downloaded from

It is currently 60 Mb zipped and 300 MB unzipped, which is a lot, but it is worth a try.

Once you have downloaded and unzipped the file you should move it to c:\portable or some similar path (currently no spaces are allowed in the path). Assuming you put it in C:\portable you can then go to c:\portable\perl\bin\ and run the portablepadre.bat file. That should start Padre with an emty file. Type in

  use v6;

  say "Hello World";
  42.say;

and press F5. When offered to save the file chose a name with .p6 extension. It should run your code and provide the output in the lower output pane of Padre.

The Syntax highlighting is relatively slow, so it is tuned off by default but you can run in manually with the F6 key or in the Plugins/Perl6 menu.

Enjoy!

Update

Apparently the parrot and rakudo I distributed does not work as it has some hard code path requirements.

Tomorrow I'll try to build a new version which will include the missing files and will require you to install it in a specific location but will hopefully work then.

阅读(746) | 评论(0) | 转发(0) |
给主人留下些什么吧!~~