Skip Menu |

This queue is for tickets about the Text-PSP CPAN distribution.

Report information
The Basics
Id: 12492
Status: resolved
Priority: 0/
Queue: Text-PSP

People
Owner: jdiepen [...] cpan.org
Requestors: ch [...] ngmedia.com
Cc:
AdminCc:

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



Subject: Reloading packages in a persistent enviroment
Hello I expired some problems regarding reloading of packages in a persistent environment. I managed to find the problem, Symbol::delete_package($classname) seems not to remove the package from $INC. Replacing Symbol::delete_package with delete $INC{ $pmfile }; solves the problem. I hope you will apply the patch. Best Regards Christian Hansen
--- Text-PSP-1.012/lib/Text/PSP.pm Mon Mar 14 17:49:33 2005 +++ Text-PSP-1.012-local/lib/Text/PSP.pm Mon May 2 02:31:59 2005 @@ -140,7 +140,7 @@ my ($self,$filename,%options) = @_; my ($pmfile,$classname) = $self->translate_filename($filename); if ( $options{force_rebuild} or ( !-f $pmfile ) or -M _ > -M "$self->{template_root}/$filename" ) { - Symbol::delete_package($classname); + delete $INC{ $pmfile }; $self->write_pmfile($filename,$pmfile,$classname); } require $pmfile; @@ -176,7 +176,7 @@ croak "Cannot find $filename from directory $directory" unless $found; my ($pmfile,$classname) = $self->translate_filename("$directory/$filename"); if ( $options{force_rebuild} or ( !-f $pmfile ) or -M _ > -M "$self->{template_root}/$path/$filename" ) { - Symbol::delete_package($classname); + delete $INC{ $pmfile }; $self->write_pmfile($filename,$pmfile,$classname,$directory); } require $pmfile;
Thank you for your report. I've applied the patch, and released v1.013. This should fix the problem. Best regards, Joost Diepenmaat.