The Perl Toolchain Summit needs more sponsors. If your company depends on Perl, please support this very important event.

NAME

Perl::ToPerl6::Transformer::ModuleSpecific::Moose - Add Perl6-style class attributes

AFFILIATION

This Transformer is part of the core Perl::ToPerl6 distribution.

DESCRIPTION

Perl6 uses a similar syntax to Moose's 'has' declaration style. This module attempts to convert basic Moose has x => ( isa => 'Int', is => 'ro' ) declarations to has Int $.x; .

  has x => ( is => 'rw', isa => 'Int', default => 42 );
  --> has Int $.x is rw = 42;

Eventually will do:

  $self->x(3); --> $.x = 3;

Currently doesn't comment out the old declarations, as they could be multiline. And I'm lazy :)

Transforms 'has' statements outside of comments, heredocs, strings and POD.

CONFIGURATION

This Transformer is not configurable except for the standard options.

AUTHOR

Jeffrey Goff <drforr@pobox.com>

COPYRIGHT

Copyright (c) 2015 Jeffrey Goff

This program is free software; you can redistribute it and/or modify it under the same terms as Perl itself.