[KinoSearch] Subclassable Highlighter
Father Chrysostomos
sprout at cpan.org
Sat Feb 2 11:40:14 PST 2008
On Jan 30, 2008, at 3:48 PM, Marvin Humphrey wrote:
> How about we remove them from the constructor and use defaulting
> accessors instead?
>
> sub set_encoder {
> my ($self, $encoder) = @_;
> confess("Not a KinoSearch::Highlight::Encoder")
> unless a_isa_b( $encoder, 'KinoSearch::Highlight::Encoder' );
> $encoder{$$self} = $encoder;
> }
>
Is there any reason why a custom encoder should have to inherit from
KS:H:E? And, considering that there is only one method, can we not
also allow a code ref? (This would be similar to HTML::DOM’s treatment
of EventListener objects.) And likewise for formatters.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://rectangular.com/pipermail/kinosearch/attachments/20080202/a9d67a63/attachment-0004.htm
-------------- next part --------------
_______________________________________________
KinoSearch mailing list
KinoSearch at rectangular.com
http://www.rectangular.com/mailman/listinfo/kinosearch
More information about the kinosearch
mailing list