libxml-raku / LibXML-raku

Raku bindings to the libxml2 native library
Artistic License 2.0
11 stars 4 forks source link

Adds ability to accept pre-existing xmlXPathContext to LibXML::XPath::Context #105

Closed Xliff closed 1 year ago

dwarring commented 1 year ago

@Xliff Thanks. Like the ideas, but not passing the test suite yet. How about just making the raw attribute public, ie:

--- a/lib/LibXML/XPath/Context.rakumod
+++ b/lib/LibXML/XPath/Context.rakumod
@@ -132,8 +132,7 @@ use Method::Also;

 has $.sax-handler is rw;
 has $.query-handler is rw = self.config.query-handler;
-has xmlXPathContext $!raw handles<SetStructuredErrorFunc> .= new;
-method raw { $!raw }
+has xmlXPathContext $.raw handles<SetStructuredErrorFunc> .= new;

Shouldn't then be any need for the TWEAK proto.

dwarring commented 1 year ago

Thanks.