Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* Convert RxOp, Sig and Unit to MooseX::Declare. That's all of them. :-)
- Loading branch information
Audrey Tang
committed
Jul 20, 2010
1 parent
4dc75bb
commit f4ddde8
Showing
3 changed files
with
20 additions
and
82 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,52 +1,24 @@ | ||
use strict; | ||
use warnings; | ||
use 5.010; | ||
use MooseX::Declare; | ||
|
||
use CgOp; | ||
|
||
{ | ||
package RxOp; | ||
use Moose; | ||
|
||
class RxOp { | ||
has zyg => (isa => 'ArrayRef[RxOp]', is => 'ro'); | ||
|
||
__PACKAGE__->meta->make_immutable; | ||
no Moose; | ||
} | ||
|
||
{ | ||
package RxOp::String; | ||
use Moose; | ||
extends 'RxOp'; | ||
|
||
class RxOp::String extends RxOp { | ||
has text => (isa => 'Str', is => 'ro', required => 1); | ||
|
||
__PACKAGE__->meta->make_immutable; | ||
no Moose; | ||
} | ||
|
||
{ | ||
package RxOp::Quantifier; | ||
use Moose; | ||
extends 'RxOp'; | ||
|
||
class RxOp::Quantifier extends RxOp { | ||
has type => (isa => 'Str', is => 'ro', required => 1); | ||
# ? + * only | ||
# zyg * 1 | ||
|
||
__PACKAGE__->meta->make_immutable; | ||
no Moose; | ||
} | ||
|
||
{ | ||
package RxOp::Sequence; | ||
use Moose; | ||
extends 'RxOp'; | ||
|
||
class RxOp::Sequence extends RxOp { | ||
# zyg * N | ||
|
||
__PACKAGE__->meta->make_immutable; | ||
no Moose; | ||
} | ||
|
||
1; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters