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


Perl6-Pugs documentation  | view source Contained in the Perl6-Pugs distribution.

Index


NAME

Top

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

SYNOPSIS

Top

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

DESCRIPTION

Top

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

Top

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. :-)

COPYRIGHT

Top


Perl6-Pugs documentation  | view source Contained in the Perl6-Pugs distribution.