[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