-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 =pod I pushed Angerwhale 0.04 to the CPAN last night. There are tons of new features this time, and the internals have gotten a I cleaner. =head1 Features First, some key new features: =over =item * Expose JSON feeds in the UI. We had JSON feeds before, but now it's obvious that they exist. (There's also a C URL that's not in the UI that lists all feeds. Enjoy. :) =item * Add resource file for easier hacking. All internal configuration is in C now, so it's easy to change internal settings and provide sensible configuration defaults. The user config file is much smaller as a result, and nothing in it is required. =item * Make links clickable in plaintext formatter. Search for C links in PlainText and make them clickable. =item * Add config option for date format (C). Now you can configure the date format to be appropriate for your locale. =item * Cleanup caching code, and add ability to gzip cached responses. The caching code has been factored out into a generic Catalyst plugin, and is now faster and cleaner. Additionally, responses will be gzipped (once), and the gzipped version will be served to clients that can handle it. Fast, and it saves bandwidth! =item * Fix 404s when clicking date links (i.e. http://blog/2007/01/01). This was a stupid bug, and I promise it won't be back :) =item * Make styles configurable. You can switch CSS themes by specifying a configuration option. Current themes are C and C. See the C file for information on how to add new themes. =back =head1 Internals This release also massively refactored the internals. There used to be a big ugly object that did everything related to posts, but that's been cleaned up. Now, there's a well defined sequence of events that each "post" goes though to be loaded (so you have a lot of control over each step). First, the C model consults the configuration file to see which C to use to load posts. Then, via the ContentProvider, Cs are loaded. These objects are really basic, they provide only C, C, and C; the raw elements of a post or comment. To make these raw objects into something that the rest of the app can use, they are "filtered". Each object is passed to a series of filters (C). Each filter can mutate the current object, or create a new one. The filters are chained and the ordering is controlled in the resource file. Currently, there are 9 filters. The first, C, decodes the data and metadata from UTF-8 (or whatever the post specifies its encoding to be) into perl characters. Then, a C is computed and added to the metadata hash. Next, the C is computed (from metadata information, usually), and then C<Author> is derivied similarly. The next filter, C<PGP>, decodes the PGP information in the message, and adds metadata about the signature status to the Item's metadata hash (and changes the data section to be text instead of PGP MESSAGE armour). With that out of the way, we run the formatter (C<Angerwhale::Format::*>), and store the formatted text as metadata. Next, we use the formatted plaintext to compute a C<Summary>, and add that to the metadata. We also derive the post's C<URI> and stash that. Lastly, we C<Finalize> the post by copying all the data into a new C<FinalizedItem> object. This FinalizedItem is read-only (so we don't mess up the post in the app), and is API-compatible with the old Filesystem C<Item>. As you may have noticed, it's easy to add new features just by adding a new filter. I plan to write a filter that will fetch hierarchies of comments via JSON or YAML from a remote Angerwhale, inflate them into normal C<Item>s, and then format them as normal. This will let you copy entire threads from antoher blog, like Trackback but much better. Expect to see that in 0.05! Also, you'll notice that there's no more dependency on the Filesystem. Right now, the Filesytem is the only ContentProvider, but it would be super simple to write a ContentProvider that pulls posts out of a database. Once you've written the minimal code to create the raw data string and metadata hash, the Filters will handle the rest. Having a DBIC model is a goal for the next release (and is why I did all this refactoring to begin with). =head1 Summary Anyway, I hope you enjoy 0.04. There are tons of new features, and it should be the easiest to hack on version yet. As a result, I'm looking forward to your contributions. C<;)> (And a big thanks to the current contributers; C<plu++>, C<zamolxes++>, and C<rafl++>!) -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.6 (GNU/Linux) iQCVAwUBRh7bONAZeFPdJeQvAQJdUAQAw9e3vcBGu8ACtYOH8uojVyxLFqqP8iix mUfNcfeZMs2ZWX4PBPXMbP6/YxrgwBz9VOklk1449APIDbXj8B9RYGwX1R8WezHh Mv/zvsWKARWAebp5AaZEwOIUwgGmZPwDFkOjS1gee5A48TM/RDWdi/8g9o7uqGEQ c0MiCA1f5pk= =F0FI -----END PGP SIGNATURE-----