Skip to content

Commit

Permalink
Add stubs for the OP types
Browse files Browse the repository at this point in the history
  • Loading branch information
kentfredric committed Mar 21, 2015
1 parent 0af02bd commit da8cf37
Show file tree
Hide file tree
Showing 13 changed files with 200 additions and 2 deletions.
17 changes: 17 additions & 0 deletions lib/Acme/Flat/BINOP.pm
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
use 5.006;
use strict;
use warnings;

package Acme::Flat::BINOP;

# ABSTRACT: A Binary Operation

our $VERSION = '0.001000';

# AUTHORITY

use parent qw( Acme::Flat::UNOP );
use Class::Tiny;

1;

16 changes: 16 additions & 0 deletions lib/Acme/Flat/COP.pm
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
use 5.006;
use strict;
use warnings;

package Acme::Flat::COP;

# ABSTRACT: A State Operation (Control OP).

our $VERSION = '0.001000';

# AUTHORITY

use parent qw( Acme::Flat::OP );
use Class::Tiny;

1;
17 changes: 17 additions & 0 deletions lib/Acme/Flat/LISTOP.pm
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
use 5.006;
use strict;
use warnings;

package Acme::Flat::LISTOP;

# ABSTRACT: A List Operation

our $VERSION = '0.001000';

# AUTHORITY

use parent qw( Acme::Flat::BINOP );
use Class::Tiny;

1;

17 changes: 17 additions & 0 deletions lib/Acme/Flat/LOOP.pm
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
use 5.006;
use strict;
use warnings;

package Acme::Flat::LOOP;

# ABSTRACT: A Loop Operation

our $VERSION = '0.001000';

# AUTHORITY

use parent qw( Acme::Flat::LISTOP );
use Class::Tiny;

1;

16 changes: 16 additions & 0 deletions lib/Acme/Flat/METHOP.pm
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
use 5.006;
use strict;
use warnings;

package Acme::Flat::METHOP;

# ABSTRACT: A Method Call Operation

our $VERSION = '0.001000';

# AUTHORITY

use parent qw( Acme::Flat::OP );
use Class::Tiny;

1;
16 changes: 16 additions & 0 deletions lib/Acme/Flat/OP.pm
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
use 5.006;
use strict;
use warnings;

package Acme::Flat::OP;

# ABSTRACT: An Operation

our $VERSION = '0.001000';

# AUTHORITY

use Class::Tiny;

1;

20 changes: 20 additions & 0 deletions lib/Acme/Flat/PADOP.pm
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
use 5.006;
use strict;
use warnings;

package Acme::Flat::PADOP;

# ABSTRACT: An Operation with a reference to a PAD element.

our $VERSION = '0.001000';

# AUTHORITY

use parent qw( Acme::Flat::OP );
use Class::Tiny;

1;

=head1 DESCRIPTION
This OP is only available in Perls compiled with ithreads.
17 changes: 17 additions & 0 deletions lib/Acme/Flat/PMOP.pm
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
use 5.006;
use strict;
use warnings;

package Acme::Flat::PMOP;

# ABSTRACT: A Regexp (Pattern Matching) Operation

our $VERSION = '0.001000';

# AUTHORITY

use parent qw( Acme::Flat::LISTOP );
use Class::Tiny;

1;

16 changes: 16 additions & 0 deletions lib/Acme/Flat/PVOP.pm
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
use 5.006;
use strict;
use warnings;

package Acme::Flat::PVOP;

# ABSTRACT: An Operator with an embedded C Pointer

our $VERSION = '0.001000';

# AUTHORITY

use parent qw( Acme::Flat::OP );
use Class::Tiny;

1;
29 changes: 29 additions & 0 deletions lib/Acme/Flat/SVOP.pm
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
use 5.006;
use strict;
use warnings;

package Acme::Flat::SVOP;

# ABSTRACT: An Operation with a static embedded SV.

our $VERSION = '0.001000';

# AUTHORITY

use parent qw( Acme::Flat::OP );
use Class::Tiny;

1;

=head1 EXAMPLES
print "Hello World"
# <$> const(PV "Hello World") s # SVOP, op = OP_CONST, embedded SV = "Hello World"
# <@> print vK # LISTOP, op = OP_PRINT
sub { 42 }->()
# <$> anoncode[CV ] sRM # SVOP, op = OP_ANONCODE, embedded SV is CV = Your code block
17 changes: 17 additions & 0 deletions lib/Acme/Flat/UNOP.pm
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
use 5.006;
use strict;
use warnings;

package Acme::Flat::UNOP;

# ABSTRACT: A Unary Operation

our $VERSION = '0.001000';

# AUTHORITY

use parent qw( Acme::Flat::OP );
use Class::Tiny;

1;

2 changes: 1 addition & 1 deletion maint/perlcritic.rc.gen.pl
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
my $bundle = create_bundle('Example::Author::KENTNL');
$bundle->configure;

my @stopwords = (qw(perl reimplementation Metadata LValue ));
my @stopwords = (qw(perl reimplementation Metadata LValue ithreads Unary SV ));
for my $wordlist (@stopwords) {
$bundle->add_or_append_policy_field( 'Documentation::PodSpelling' => ( 'stop_words' => $wordlist ) );
}
Expand Down
2 changes: 1 addition & 1 deletion perlcritic.rc
Original file line number Diff line number Diff line change
Expand Up @@ -126,7 +126,7 @@ allow_includes = 1

[Documentation::PodSpelling]
spell_command = aspell list --lang en_US
stop_words = perl reimplementation Metadata LValue
stop_words = perl reimplementation Metadata LValue ithreads Unary SV

[Documentation::ProhibitAdjacentLinks]

Expand Down

0 comments on commit da8cf37

Please sign in to comment.