V6 (Perl)
From Wikipedia, the free encyclopedia
- The correct title of this article is v6 (Perl). The initial letter is shown capitalized due to technical restrictions.
- This article is about the Perl module. For other uses, see V6 (disambiguation).
v6 is a Perl module which runs under Perl version 5, and transforms Perl 6 code into Perl 5 code on the fly. To quote the release notes:
- In summary: Perl 5 is now a first-class virtual machine for Pugs, and in this journey toward self-hosting, we will share as much common structure as possible between the Perl 5, Haskell, and the Parrot runtimes. [1]
Contents |
[edit] Components
v6 is comprised of many parts, divided into a stack of services which can be used to write Perl 6 code directly, or to implement Perl 6 features in Perl 5 programs.
[edit] Moose
Moose and other modules such as Class::MOP
provide a low-level emulation of Perl 6's object model and meta-object protocol. This object model can be used directly or through v6.
[edit] Pugs::Grammar::Rule
Pugs::Grammar::Rule
provides access to Perl 6's "rules", which are a superset of classic regex functionality which allow the development of entire grammars.
[edit] Data::Bind
Data::Bind
provides the parameter binding features of Perl 6, including named parameters.
[edit] Module::Compile
Module::Compile
is like a source-filter, but is safer for real-world code development. It is this module which allows v6 to parse Perl 6 code and directly translate it into Perl 5 code which is then executed.
[edit] Notes
- ^ audreyt. Pugs 6.2.12 and v6.pm released!. use Perl.