Discussion:
[Mason-devel] [PATCH] - Stop mason from triggering a deprecation warning on 5.12
Jesse Vincent
2010-04-02 14:54:51 UTC
Permalink
While testing Best Practical's apps against 5.12, I noticed that Mason
spews...rather a lot of warnings about using a feature deprecated in
Perl 5.6.0. The following patch against Mason 1.44 passes all tests
for me and quiets the warning.

We're currently set to release 5.12.0 next Wednesday. It'd be great to
see mason installing clean on 5.12.0 on release day, if that's plausible.

-Jesse


--- lib/HTML/Mason/Request.pm.144 2010-04-02 10:50:25.894807900 -0400
+++ lib/HTML/Mason/Request.pm 2010-04-02 10:50:45.515807986 -0400
@@ -311,7 +311,7 @@
#
{
no strict 'refs';
- unless (defined(%{$plugin . "::"})) {
+ unless (%{$plugin . "::"}) {
eval "use $plugin;";
die $@ if $@;
}
--
Jonathan Swartz
2010-04-02 17:26:09 UTC
Permalink
Hi Jesse --

Thanks for the heads up. We'll do a release this weekend.

Jon
Post by Jesse Vincent
While testing Best Practical's apps against 5.12, I noticed that Mason
spews...rather a lot of warnings about using a feature deprecated in
Perl 5.6.0. The following patch against Mason 1.44 passes all tests
for me and quiets the warning.
We're currently set to release 5.12.0 next Wednesday. It'd be great to
see mason installing clean on 5.12.0 on release day, if that's
plausible.
-Jesse
--- lib/HTML/Mason/Request.pm.144 2010-04-02 10:50:25.894807900 -0400
+++ lib/HTML/Mason/Request.pm 2010-04-02 10:50:45.515807986 -0400
@@ -311,7 +311,7 @@
#
{
no strict 'refs';
- unless (defined(%{$plugin . "::"})) {
+ unless (%{$plugin . "::"}) {
eval "use $plugin;";
}
--
------------------------------------------------------------------------------
Download Intel® Parallel Studio Eval
Try the new software tools for yourself. Speed compiling, find bugs
proactively, and fine-tune applications for parallel performance.
See why Intel Parallel Studio got high marks during beta.
http://p.sf.net/sfu/intel-sw-dev
_______________________________________________
Mason-devel mailing list
https://lists.sourceforge.net/lists/listinfo/mason-devel
Jesse Vincent
2010-04-02 17:36:22 UTC
Permalink
Post by Jonathan Swartz
Hi Jesse --
Thanks for the heads up. We'll do a release this weekend.
Not a problem. I'm sorry I didn't get this out sooner. I've been so
wrapped up in the release that I missed issues in my own apps :/

There's actually a similar need for a 'no warnings once' in set_global
in Interp.pm. Line 652 has a "no strict 'refs';" - You also need a
"no warnings 'once'" there.

I'm seeing a lot of:

'Name "HTML::Mason::Commands::r" used only once: possible typo at /usr/local/lib/perl5/site_perl/5.12.0/HTML/Mason/Interp.pm line 653.'

Thanks!

Jesse
Post by Jonathan Swartz
Jon
Loading...