Closed
Bug 662070
Opened 14 years ago
Closed 14 years ago
Use say() instead of print() where appropriate
Categories
(Bugzilla :: Bugzilla-General, enhancement)
Tracking
()
RESOLVED
FIXED
Bugzilla 4.4
People
(Reporter: LpSolit, Assigned: LpSolit)
References
Details
Attachments
(1 file)
|
19.97 KB,
patch
|
glob
:
review+
|
Details | Diff | Splinter Review |
Till we require Perl 5.10.1 in Bugzilla 5.0, we can already start converting print "$foo\n" into say $foo by implementing say() ourselves in Bugzilla::Util:
sub say {
print @_;
print "\n";
}
When writing to a filehandle, we should still use print for now, though, as the function above is a very simple implementation of say(). Once we require 5.10.1, we can remove this function and automatically use the builtin one. Meanwhile, this will let everybody work on it without breaking Bugzilla for those who still use Perl 5.8.x, and if it appears that the next Bugzilla version will be 4.4 instead of 5.0, then we won't have to backout anything (as we said we won't require Perl 5.10.1 if we release 4.4).
Comment 1•14 years ago
|
||
Sure, sounds like a reasonable idea. Note:
Should be:
sub say (@)
| Assignee | ||
Comment 2•14 years ago
|
||
My regexp didn't catch multiline print() statements, so there are probably some other strings to catch. But this can be done in subsequent bugs (or while writing new code or cleaning up old one).
Comment on attachment 551320 [details] [diff] [review]
patch, v1
r=glob
Attachment #551320 -
Flags: review?(glob) → review+
| Assignee | ||
Updated•14 years ago
|
Flags: approval? → approval+
Whiteboard: [Good Intro Bug]
| Assignee | ||
Comment 4•14 years ago
|
||
Committing to: bzr+ssh://lpsolit%40gmail.com@bzr.mozilla.org/bugzilla/trunk/
modified report.cgi
modified sanitycheck.cgi
modified testserver.pl
modified whineatnews.pl
modified Bugzilla/Chart.pm
modified Bugzilla/DB.pm
modified Bugzilla/Field.pm
modified Bugzilla/Install.pm
modified Bugzilla/Migrate.pm
modified Bugzilla/Util.pm
Committed revision 7936.
Status: ASSIGNED → RESOLVED
Closed: 14 years ago
Resolution: --- → FIXED
You need to log in
before you can comment on or make changes to this bug.
Description
•