Petal::Utils (was Re: [Petal] Looping through a hash)
Steve Purkis
spurkis at mkdoc.com
Fri Sep 5 20:27:44 BST 2003
On Friday, September 5, 2003, at 08:58 am, William McKee wrote:
>> I've got a few little plugins like this that might be good candidates
>> for a Petal::Utils package at some stage.
>
> Building a utils package has been on my to do list for several months
> now, so I used this opportunity to actually build it and combine
> several
> of my modifiers. Since you had the idea first, would you like to create
> it and put it onto CPAN?
I can do, but if you'd like to take it on you're more than welcome.
> I have attached a tarfile of my initial version since it's less than
> 4K.
> Comments appreciated. The broken tests have been commented out in the
> 01.t file.
Thanks for getting the ball rolling... I've spent some time today
adding my 2¢. It's a bit more than 4K now, so I've put it up here:
http://staging.quiup.com/perl/Petal-Utils-0.02.tar.gz
A lot of things have changed, mostly with the idea of expanding the
module. This design won't force plugins on a user that doesn't need
them. Things are loaded as needed now, which means the user isn't
forced to load plugins they won't need - this should avoid NS pollution
& decrease load time.
Here's a summary of the work done:
* Renamed to Petal::Utils so Petal doesn't think the Utils package
is a Petal Hash modifier. [Steve Purkis]
* Moved to Module::Build. [Steve Purkis]
+ Added modifiers: Date Dump Equal(eq) And Like Sort [Steve Purkis]
+ Added import() functionality to specify modifier sets. [Steve
Purkis]
* Split up modifiers into individual Petal::Utils::<modifier> modules
that are loaded as needed. [Steve Purkis]
* Restructured test directory, using File::Spec and more verbose file
names. [Steve Purkis]
* Added error handling code to existing modifiers. [Steve Purkis]
Jean-Michel: you might like to move Petal::Utils::Base into Petal
itself (Petal::Plugin?). This could result in more people writing
plugins in a standard way for Petal (which would be a good thing,
IMHO). Moreover, parsing tools for $args could go in here. At the
moment, you've got to know a lot about Petal to parse $args properly
(which incidently, Petal::Utils does *not* do).
-Steve
More information about the Petal
mailing list