package MyClass; use strict; use ObsceneEnabler; our @properties = ( "Name", "RegExp", ); #################################### # Register properties for this class #################################### ObsceneEnabler::RegisterProperties (@properties); ######################## # Class definition below ######################## sub get_RegExp { my $this = shift; unless ($this->regExp) { return "(?:" . $this->Name . ")"; } return $this->regExp; } sub set_RegExp { my $this = shift; my $regexp = shift; $this->regExp = "(?:$regexp)"; } sub SetMultiRegExp { my $this = shift; my $regexp = join ("|", @_); $this->RegExp = $regexp; } 1;