Skip Menu |

This queue is for tickets about the Petal CPAN distribution.

Report information
The Basics
Id: 14750
Status: resolved
Priority: 0/
Queue: Petal

People
Owner: Nobody in particular
Requestors: francois.perrad [...] gadz.org
Cc:
AdminCc:

Bug Information
Severity: Important
Broken in: 2.17
Fixed in: (no value)



Subject: Petal 2.17 problem with MSWin32 filename
The subroutine _file_path concat $base_dir and $file, but on MSWin32, both could be absolute pathname (starting by a disk letter) on different disk. In the following trace, "D:\Documents\DEV\parrot\svn\branches\leo-ctx5" "c:/PXPerl/site/lib/Test/TAP/HTMLMatrix.pm" This is perl, v5.8.7 built for MSWin32-x86-multi-thread Error: Cannot find C:\PXPerl\site\lib\Test\TAP\HTMLMatrix\template.html in D:\Documents\DEV\parrot\svn\branches\leo-ctx5. (typo? permission problem?) at c:/PXPerl/site/lib/Petal.pm line 564 Petal::_file_path('Petal=HASH(0x230e068)') called at c:/PXPerl/site/lib/Petal.pm line 536 Petal::_file_path_with_macro('Petal=HASH(0x230e068)') called at c:/PXPerl/site/lib/Petal.pm line 633 Petal::_code_memory_cached('Petal=HASH(0x230e068)') called at c:/PXPerl/site/lib/Petal.pm line 367 eval {...} called at c:/PXPerl/site/lib/Petal.pm line 361 Petal::process('Petal=HASH(0x230e068)', 'page', 'Test::TAP::HTMLMatrix=ARRAY(0x1d998e4)') called at c:/PXPerl/site/lib/Test/TAP/HTMLMatrix.pm line 70 Test::TAP::HTMLMatrix::html('Test::TAP::HTMLMatrix=ARRAY(0x1d998e4)') called at t\harness line 177 Petal object dump: ================== $VAR1 = bless( { 'decode_charset' => 'utf8', 'input' => 'XHTML', 'file' => 'C:\\PXPerl\\site\\lib\\Test\\TAP\\HTMLMatrix\\template.html', 'encode_charset' => 'utf8', 'output' => 'XHTML' }, 'Petal' ); Stack trace: ============ at c:/PXPerl/site/lib/Petal.pm line 373 Petal::process('Petal=HASH(0x230e068)', 'page', 'Test::TAP::HTMLMatrix=ARRAY(0x1d998e4)') called at c:/PXPerl/site/lib/Test/TAP/HTMLMatrix.pm line 70 Test::TAP::HTMLMatrix::html('Test::TAP::HTMLMatrix=ARRAY(0x1d998e4)') called at t\harness line 177 Template perl code dump: ======================== (no dump available) François Perrad (PAUSE ID : PERRAD)
Date: Fri, 30 Sep 2005 16:32:33 +0100
From: Bruno Postle <bruno [...] mkdoc.com>
To: via RT <bug-Petal [...] rt.cpan.org>
Subject: Re: [cpan #14750] Petal 2.17 problem with MSWin32 filename
RT-Send-Cc:
On Mon 26-Sep-2005 at 02:19 -0400, <PERRAD@cpan.org> via RT wrote: Show quoted text
> > The subroutine _file_path concat $base_dir and $file, > but on MSWin32, both could be absolute pathname (starting by a > disk letter) on different disk.
Maybe I misunderstand the problem, how does the file attribute become an absolute path? It is normally relative, so if your template is here: C:\PXPerl\site\lib\Test\TAP\HTMLMatrix\template.html ...you initialise Petal like so: my $template = new Petal ( file => 'template.html', base_dir => 'C:\PXPerl\site\lib\Test\TAP\HTMLMatrix' ); Does this fail on Windows? -- Bruno