Inline::Pugs.3pm

Langue: en

Version: 2006-10-17 (mandriva - 01/05/08)

Section: 3 (Bibliothèques de fonctions)

NAME

Inline::Pugs - Inline Perl 6 code in Perl 5

SYNOPSIS

     use Inline Pugs => '
         sub postfix:<!> { [*] 1..$_ }
         sub sum_factorial { [+] 0..$_! }
     ';
     print sum_factorial(3); # 21
 
 

DESCRIPTION

Is it Perl 5? Is it Perl 6? It's neither, it's both. It's Inline::Pugs!

The Inline::Pugs module allows you to insert Perl 6 source code directly inline in a Perl 5 script or module.

CAVEATS

Currently, only the Perl 5 side can invoke subroutines defined from the Perl 6 side, but not vise versa. This whole thing is just a proof of concept --- use it at your own risk. :-) Pugs is Copyright 2005-2006, The Pugs Contributors.

Pugs is a joint work of authorship by the Pugs Contributors.

Pugs is free software; you can redistribute it and/or modify it under the terms of either:

     a) the GNU General Public License, version 2, or
     b) the Artistic License, version 2.0beta5.