On 27/12/2010 21:24, Abigail wrote: > On Mon, Dec 27, 2010 at 08:44:35PM +0000, Ed Avis wrote: >> Abigail <abigail <at> abigail.be> writes: >> >>>> One option is to do without syntax altogether, and expose the new regexp >>>> functionality via a special module, e.g. >>>> my $re_a_or_b = Regexp::NewStuff::union($re_a, $re_b); >>> That would make $re_a_or_b an opaque object that I cannot just copy-and-paste, >>> or even print out and debug. >> Yes, Data::Dumper would need to be extended so you could print it out. > But if you can print it out, you must have syntax (what else would you print?). > If you have syntax, you aren't doing it "without syntax altogether". > >> But your objections equally well apply to code references. A regexp is a >> little program, and so is an anonymous subroutine. Nobody suggests >> limiting anonymous subs to be a flat string so that they can be >> cut-and-pasted or printed out. You can still do those things anyway. > But a coderef still points to code that started as Perl code. It's not > side-stepping Perl code and having a magical way of creating a coderef. > > > > Abigail There is on CPAN Unicode::Regex::Set which already does this to some extent See http://search.cpan.org/~sadahiro/Unicode-Regex-Set-0.02/Set.pm However I would like specific re syntax for this. John PS Happy new year to you all.Thread Previous | Thread Next