[Catalyst] Patch: display plugin versions
Ovid
publiustemp-catalyst at yahoo.com
Tue Dec 13 21:41:00 CET 2005
Hi all,
I wasn't sure what format patches should be submitted in so I'm doing
this both inline and as an attachment.
The following patch displays version numbers, if found, for loaded
plugins when Catalyst::setup is called.
--- lib/Catalyst.pm.orig Tue Dec 13 12:30:26 2005
+++ lib/Catalyst.pm Tue Dec 13 12:31:48 2005
@@ -591,7 +591,9 @@
{
no strict 'refs';
- @plugins = grep { /^Catalyst::Plugin/ } @{"$class\::ISA"};
+ @plugins =
+ map { $_ . ' ' . ($_->VERSION || '') }
+ grep { /^Catalyst::Plugin/ } @{"$class\::ISA"};
}
if (@plugins) {
I've found this useful when trying to debug a Catalyst app one someone
else's machine and I'm trying to figure out if he has different plugin
versions.
Cheers,
Ovid
--
If this message is a response to a question on a mailing list, please send
follow up questions to the list.
Web Programming with Perl -- http://users.easystreet.com/ovid/cgi_course/
-------------- next part --------------
A non-text attachment was scrubbed...
Name: version.patch
Type: application/octet-stream
Size: 412 bytes
Desc: 2714731867-version.patch
Url : http://lists.rawmode.org/pipermail/catalyst/attachments/20051213/b61ce9f2/version.obj
More information about the Catalyst
mailing list