Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Tree: b2512a4129
Fetching contributors…

Cannot retrieve contributors at this time

executable file 40 lines (33 sloc) 0.782 kB
use v6;
# See also: parrot/compilers/pge/PGE/Match.pir
# XXX - class name - fix Perlito6::Emitter::Token to emit 'Perlito6::Runtime::Match' instead
class Perlito6::Perl5::Match {
has $.str;
has $.array;
has $.hash;
has $.result_object;
has $.from;
has $.to;
has $.bool;
method scalar {
if $.bool {
return undef;
};
if defined( $.result_object ) {
return $.result_object;
};
return substr( $.str, $.from, ( $.to - $.from ) + 1 );
};
method __get_bool {
return $.bool;
};
method __get_int {
return 0 + self.scalar;
};
method __get_number {
return 0 + self.scalar;
};
method __get_string {
return self.scalar;
};
}
Jump to Line
Something went wrong with that request. Please try again.