File: Edge.pm

package info (click to toggle)
libgraph-grammar-perl 0.2.0-1
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid, trixie
  • size: 104 kB
  • sloc: perl: 159; makefile: 2
file content (21 lines) | stat: -rw-r--r-- 310 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
package Graph::Grammar::Rule::Edge;

# ABSTRACT: Rule to be evaluated on graph edges
our $VERSION = '0.2.0'; # VERSION

use strict;
use warnings;

sub new
{
    my( $class, $code ) = @_;
    return bless { code => $code }, $class;
}

sub matches
{
    my $self = shift;
    return $self->{code}->( @_ );
}

1;