Skip Menu |

This queue is for tickets about the Astro-FITS-Header CPAN distribution.

Report information
The Basics
Id: 4816
Status: resolved
Priority: 0/
Queue: Astro-FITS-Header

People
Owner: Nobody in particular
Requestors: djerius [...] cpan.org
Cc:
AdminCc:

Bug Information
Severity: Critical
Broken in: (no value)
Fixed in: (no value)



Subject: CFITSIO breakage when using fitsID
Astro::FITS::Header::CFITSIO::configure uses $args{File} in a call to fits_parse_extnum(), even if $args{File} was not specified. This of course causes things to break.
[DJERIUS - Fri Jan 2 14:49:11 2004]: Show quoted text
> Astro::FITS::Header::CFITSIO::configure uses $args{File} in a call to > fits_parse_extnum(), even if $args{File} was not specified. This of > course > causes things to break.
Here's a patch to fix it.
*** CFITSIO/CFITSIO.pm 2003-10-21 09:00:47.000000000 -0400 --- /proj/axaf/pkgs/perl-5.8.2/lib/site_perl/5.8.2/Astro/FITS/Header/CFITSIO.pm 2005-03-02 15:00:51.000000000 -0500 *************** *** 158,176 **** # read. If there isn't one specified, then we should read each of the # extensions that exist in the file, if in fact there are any. ! my $ext; ! fits_parse_extnum($args{File},$ext,$status); ! my @subfrms = (); ! if ($ext == -99) { my $nhdus; $ifits->get_num_hdus($nhdus,$status); foreach my $ihdu (1 .. $nhdus-1) { ! my $subfr = sprintf("%s[%d]",$args{File},$ihdu); ! my $sself = $self->new(File=>$subfr); ! push @subfrms,$sself; } } - $self->subhdrs(@subfrms); } # clean up --- 158,179 ---- # read. If there isn't one specified, then we should read each of the # extensions that exist in the file, if in fact there are any. ! if ( exists $args{File} ) ! { ! my $ext; ! fits_parse_extnum($args{File},$ext,$status); ! my @subfrms = (); ! if ($ext == -99) { my $nhdus; $ifits->get_num_hdus($nhdus,$status); foreach my $ihdu (1 .. $nhdus-1) { ! my $subfr = sprintf("%s[%d]",$args{File},$ihdu); ! my $sself = $self->new(File=>$subfr); ! push @subfrms,$sself; } + } + $self->subhdrs(@subfrms); } } # clean up
On Mon Aug 22 11:47:14 2005, DJERIUS wrote: Show quoted text
> [DJERIUS - Fri Jan 2 14:49:11 2004]: >
> > Astro::FITS::Header::CFITSIO::configure uses $args{File} in a call to > > fits_parse_extnum(), even if $args{File} was not specified. This of > > course > > causes things to break.
> > Here's a patch to fix it.
Thanks for the patch. Updated in CVS. Hope to get a release out soon.
Fixed in v3.0