Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
v5.pm for rakudo
Perl6 Perl
tree: 67b474dfcd

Fetching latest commit…

Cannot retrieve the latest commit at this time

Failed to load latest commit information.
build
lib
t
.gitignore
Configure.p6
META.info
README.md
STATUS-m.md
STATUS.md
TODO_compound_statements.md
TODO_core_modules.md
p5
rakudo.patch

README.md

v5 - Perl5 for rakudo

v5 will let you run Perl 5 code beside Perl 6 code, like:

use v6;
grammar Foo {
    method bar { ... }
}

{
    use v5;
    if( $^O eq 'MSWin32' ) {
        say $0 # Perl 5's special variable for program name
    }

    {
        use 6.0.0;
        multi sub foo(*@args) {
            ...
        }
}

say "Back to Perl 6 on a $*OS box." # $*OS is Perl 6's special variable

The goal is to be able to run all pure-Perl 5 code besides Perl 6. One benefit of this approach (reimplementing Perl 5 with Perl 6's object system) is to be able to pass data/objects easily between both languages. XS will not be supported, since it depends of Perl 5's internal structure.

INSTALLATION

git clone git://github.com/rakudo-p5/v5.git
cd rakudo                        # I assume you already have rakudo installed
patch -i ../v5/rakudo.patch      # this is needed atm and will hopefully go away pretty soon
make install                     # install the patched rakudo
cd ../v5
perl6 Configure.p6
make install                     # install the Perl5 module

TESTING

make install                     # build and install everything
make spectest                    # run all tests form roast5 we pass
make fulltest                    # run all tests form roast5, even those we do not pass yet
make test test_file=t/v5/basic.t # run a single test file (using fudge)

USAGE

perl6 t/v5/basic.t               # run a file that has a `use v5` at the top
perl6 -MPerl5 t/v5/basic.t       # run a file that hasn't
Something went wrong with that request. Please try again.