subroutine declaration breaks format/write using local variables

Bug #230528 reported by Malcolm Parsons
2
Affects Status Importance Assigned to Milestone
perl (Ubuntu)
Expired
Undecided
Unassigned

Bug Description

Binary package hint: perl

I expect these two programs to give the same output.

$ cat test.pl
sub foo($);
sub foo($) {
    my $i = shift;
    format STDOUT =
@>>>
$i
.
    write;
}
foo(1);
foo(2);

$ perl test.pl
   1
   1

$ cat test2.pl
sub foo($) {
    my $i = shift;
    format STDOUT =
@>>>
$i
.
    write;
}
foo(1);
foo(2);

$ perl test2.pl
   1
   2

$ perl -v

This is perl, v5.8.8 built for x86_64-linux-gnu-thread-multi
$ lsb_release -rd
Description: Ubuntu 8.04
Release: 8.04
$ apt-cache policy perl
perl:
  Installed: 5.8.8-12
  Candidate: 5.8.8-12
  Version table:
 *** 5.8.8-12 0
        500 http://gb.archive.ubuntu.com hardy/main Packages
        100 /var/lib/dpkg/status

Revision history for this message
Daniel Karlsson (dannioni) wrote :

Thank you for reporting this bug to Ubuntu. Hardy Heron reached EOL on May 12, 2011.
See this document for currently supported Ubuntu releases: https://wiki.ubuntu.com/Releases

I've tried recreating this bug with Raring Ringtail and was unable to, given the information you've provided. Please upgrade to the latest version and re-test. If the bug is still reproducible, increase the verbosity of the steps to recreate it so we can try again.

Do feel free to report any other bugs you may find.

Changed in perl (Ubuntu):
status: New → Incomplete
Revision history for this message
Launchpad Janitor (janitor) wrote :

[Expired for perl (Ubuntu) because there has been no activity for 60 days.]

Changed in perl (Ubuntu):
status: Incomplete → Expired
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.