[Petal] [PATCH] refactored Petal::Hash::Var + todo tests

Steve Purkis spurkis at quiup.com
Wed May 28 12:54:04 BST 2003


Hi,

I've done a major refactoring of Petal::Hash::Var with the following 
goals in mind:

     *	extensibility
     *	readability
     *	improved error reporting

The patch introduces a parser object to Petal::Hash::Var.  IMHO, this 
would do better off as something like Petal::Expression::Parser - then 
other objects would be able to use it (which is what I was originally 
planning on doing to auto-vivify things in Petal::Hash).

Note that performance may drop slightly as a result of this patch: what 
used to be one static method has now become many different instance 
methods.  I doubt this will be a big issue though.

Other things this patch addresses:

     *	Fixes a bug: $current->$next methods always called with @args
     *	regexs are now pre-compiled (though I think I've missed a couple)
     *	TODO tests for auto-vivifying hashes (should these be errors 
instead?)

Regards,
-Steve

-------------- next part --------------
A non-text attachment was scrubbed...
Name: Petal-0.92-refactor-var.patch
Type: application/octet-stream
Size: 27724 bytes
Desc: not available
Url : http://www.email-lists.org/pipermail/petal/attachments/20030528/532ea69f/Petal-0.92-refactor-var.obj


More information about the Petal mailing list