Regexp-Melody
view release on metacpan or search on metacpan
lib/Regexp/Melody.pm view on Meta::CPAN
} );
use Hash::Util::FieldHash qw( fieldhash );
fieldhash( my %melody );
sub new {
my ( $class, $input ) = @_;
my $output = compiler( $input );
my $regexp = qr/$output/;
my $self = bless( $regexp => $class );
$melody{$self} = $input;
return $self;
}
sub to_melody {
my ( $self ) = @_;
return $melody{$self};
}
( run in 0.293 second using v1.01-cache-2.11-cpan-65fba6d93b7 )