You are viewing a plain text version of this content. The canonical link for it is here.
Posted to docs-dev@perl.apache.org by Per Einar Ellefsen <pe...@skynet.be> on 2002/06/15 15:36:46 UTC
[DocSet] Linking to docs::1.0::os::index doesn't work
Ok, here's the deal:
download/binaries.pod links to docs::1.0::os::index. However, that link
turns up as broken.
I have tracked the problem down the the creation of %src_docs. If you look
at the dump, you'll see that docs/1.0/os/win32/index.html is in there, but
docs/1.0/os/index.html isn't. This is a bug, because win32/ isn't a
docset, but os/ is.
It seems like the problem lies here: (DocSet::RunTime, line 110):
map { m{(.*?/?)[^/]+$} # add autogenerated index.html
? ("$1index.html" => 1, $_ => 1)
: ($_ => 1); # shouldn't happen, but just
in case
}
From this, the problem is that it just takes the longest path and appends
index.html, without checking if it's a DocSet or not... I'm not sure how to
fix this, as I suppose it would require checking up with the other DocSet
classes to see the status of that directory...
I can fix this quickly by making win32 a docset and linking to that (which
I will probably do anyway); however, that isn't a long-term solution.
--
Per Einar Ellefsen
per.einar@skynet.be
---------------------------------------------------------------------
To unsubscribe, e-mail: docs-dev-unsubscribe@perl.apache.org
For additional commands, e-mail: docs-dev-help@perl.apache.org
Re: [DocSet] Linking to docs::1.0::os::index doesn't work
Posted by Stas Bekman <st...@stason.org>.
Per Einar Ellefsen wrote:
> At 18:17 16.06.2002, Stas Bekman wrote:
>
>> Per Einar Ellefsen wrote:
>>
>>> Ok, thanks a lot Stas, but that broke all links on Win32 :)
>>
>>
>> well, not that, but extra fixing on top of the index.html fix :) the
>> s|$base/|| was obviously not crossplatform (notice the trailing /), so
>> I thought abs2rel is the only way to do that well. I guess I could use
>> substr() on the first char, but who knows what separators are out there.
>>
>>> I tracked it down to a bug in File::Spec::Win32::abs2rel , which is
>>> fixed by the attached patch. I'm not sure if I understood the abs2rel
>>> code well enough to submit a patch to p5p though... I'm afraid of
>>> breaking other things :(
>>
>>
>> Doh! Too bad :( I don't like the idea of compensating for bugs in the
>> code, especially when the bug fix is applied globally (without
>> checking $^O eq 'MSWin32'). How about putting an abs2rel in Util.pm
>> and do all the bug fixing there? Though we should use the fqdn call
>> then, so later it won't be confused with File::Spec's abs2rel.
>
>
> Yes, that would probably be better. My fix doesn't break other platforms
> though (uhm, don't know about MacOS), because it only removed \w with a
> colon after it, at the beginning of string. Anyway, I'll do this in
> Util.pm.
The main reason for moving that into Util.pm is that this fix may be
needed in other places.
>> But before we do that, which Perl version has thing bug? Is it in
>> 5.8.0-RC1? If so please submit the test case and the patch to p5p asap
>> (use the perlbug script in the source distribution), since 5.8.0 will
>> be released rsn.
>
>
> I checked around a little and it seems like this has been fixed:
Great!
> http://archive.develooper.com/perl5-porters@perl.org/msg66542.html and
> http://archive.develooper.com/perl5-porters@perl.org/msg67171.html
> So 5.8.0 is fine. Unfortunately I don't have a compiler for Windows, and
> before 5.8.0 is stable I figure ActiveState won't provide any either.
> And I can't get the new File::Spec from CPAN :( Ah, well, I'll hold.
I don't think you can. It's now distributed only with perl.
__________________________________________________________________
Stas Bekman JAm_pH ------> Just Another mod_perl Hacker
http://stason.org/ mod_perl Guide ---> http://perl.apache.org
mailto:stas@stason.org http://use.perl.org http://apacheweek.com
http://modperlbook.org http://apache.org http://ticketmaster.com
---------------------------------------------------------------------
To unsubscribe, e-mail: docs-dev-unsubscribe@perl.apache.org
For additional commands, e-mail: docs-dev-help@perl.apache.org
Re: [DocSet] Linking to docs::1.0::os::index doesn't work
Posted by Stas Bekman <st...@stason.org>.
Per Einar Ellefsen wrote:
> At 18:36 16.06.2002, Per Einar Ellefsen wrote:
>
>> At 18:17 16.06.2002, Stas Bekman wrote:
>>
>>> Per Einar Ellefsen wrote:
>>>
>>>> Ok, thanks a lot Stas, but that broke all links on Win32 :)
>>>
>>>
>>> well, not that, but extra fixing on top of the index.html fix :) the
>>> s|$base/|| was obviously not crossplatform (notice the trailing /),
>>> so I thought abs2rel is the only way to do that well. I guess I could
>>> use substr() on the first char, but who knows what separators are out
>>> there.
>>>
>>>> I tracked it down to a bug in File::Spec::Win32::abs2rel , which is
>>>> fixed by the attached patch. I'm not sure if I understood the
>>>> abs2rel code well enough to submit a patch to p5p though... I'm
>>>> afraid of breaking other things :(
>>>
>>>
>>> Doh! Too bad :( I don't like the idea of compensating for bugs in the
>>> code, especially when the bug fix is applied globally (without
>>> checking $^O eq 'MSWin32'). How about putting an abs2rel in Util.pm
>>> and do all the bug fixing there? Though we should use the fqdn call
>>> then, so later it won't be confused with File::Spec's abs2rel.
>>
>>
>> Yes, that would probably be better. My fix doesn't break other
>> platforms though (uhm, don't know about MacOS), because it only
>> removed \w with a colon after it, at the beginning of string. Anyway,
>> I'll do this in Util.pm.
>
>
> Here's the patch.
Thanks a lot! committed with a few tweaks.
__________________________________________________________________
Stas Bekman JAm_pH ------> Just Another mod_perl Hacker
http://stason.org/ mod_perl Guide ---> http://perl.apache.org
mailto:stas@stason.org http://use.perl.org http://apacheweek.com
http://modperlbook.org http://apache.org http://ticketmaster.com
---------------------------------------------------------------------
To unsubscribe, e-mail: docs-dev-unsubscribe@perl.apache.org
For additional commands, e-mail: docs-dev-help@perl.apache.org
Re: [DocSet] Linking to docs::1.0::os::index doesn't work
Posted by Per Einar Ellefsen <pe...@skynet.be>.
At 18:36 16.06.2002, Per Einar Ellefsen wrote:
>At 18:17 16.06.2002, Stas Bekman wrote:
>>Per Einar Ellefsen wrote:
>>>Ok, thanks a lot Stas, but that broke all links on Win32 :)
>>
>>well, not that, but extra fixing on top of the index.html fix :) the
>>s|$base/|| was obviously not crossplatform (notice the trailing /), so I
>>thought abs2rel is the only way to do that well. I guess I could use
>>substr() on the first char, but who knows what separators are out there.
>>
>>>I tracked it down to a bug in File::Spec::Win32::abs2rel , which is
>>>fixed by the attached patch. I'm not sure if I understood the abs2rel
>>>code well enough to submit a patch to p5p though... I'm afraid of
>>>breaking other things :(
>>
>>Doh! Too bad :( I don't like the idea of compensating for bugs in the
>>code, especially when the bug fix is applied globally (without checking
>>$^O eq 'MSWin32'). How about putting an abs2rel in Util.pm and do all the
>>bug fixing there? Though we should use the fqdn call then, so later it
>>won't be confused with File::Spec's abs2rel.
>
>Yes, that would probably be better. My fix doesn't break other platforms
>though (uhm, don't know about MacOS), because it only removed \w with a
>colon after it, at the beginning of string. Anyway, I'll do this in Util.pm.
Here's the patch.
--
Per Einar Ellefsen
per.einar@skynet.be
Re: [DocSet] Linking to docs::1.0::os::index doesn't work
Posted by Per Einar Ellefsen <pe...@skynet.be>.
At 18:17 16.06.2002, Stas Bekman wrote:
>Per Einar Ellefsen wrote:
>>Ok, thanks a lot Stas, but that broke all links on Win32 :)
>
>well, not that, but extra fixing on top of the index.html fix :) the
>s|$base/|| was obviously not crossplatform (notice the trailing /), so I
>thought abs2rel is the only way to do that well. I guess I could use
>substr() on the first char, but who knows what separators are out there.
>
>>I tracked it down to a bug in File::Spec::Win32::abs2rel , which is fixed
>>by the attached patch. I'm not sure if I understood the abs2rel code well
>>enough to submit a patch to p5p though... I'm afraid of breaking other
>>things :(
>
>Doh! Too bad :( I don't like the idea of compensating for bugs in the
>code, especially when the bug fix is applied globally (without checking
>$^O eq 'MSWin32'). How about putting an abs2rel in Util.pm and do all the
>bug fixing there? Though we should use the fqdn call then, so later it
>won't be confused with File::Spec's abs2rel.
Yes, that would probably be better. My fix doesn't break other platforms
though (uhm, don't know about MacOS), because it only removed \w with a
colon after it, at the beginning of string. Anyway, I'll do this in Util.pm.
>But before we do that, which Perl version has thing bug? Is it in
>5.8.0-RC1? If so please submit the test case and the patch to p5p asap
>(use the perlbug script in the source distribution), since 5.8.0 will be
>released rsn.
I checked around a little and it seems like this has been fixed:
http://archive.develooper.com/perl5-porters@perl.org/msg66542.html
and http://archive.develooper.com/perl5-porters@perl.org/msg67171.html
So 5.8.0 is fine. Unfortunately I don't have a compiler for Windows, and
before 5.8.0 is stable I figure ActiveState won't provide any either. And I
can't get the new File::Spec from CPAN :( Ah, well, I'll hold.
--
Per Einar Ellefsen
per.einar@skynet.be
---------------------------------------------------------------------
To unsubscribe, e-mail: docs-dev-unsubscribe@perl.apache.org
For additional commands, e-mail: docs-dev-help@perl.apache.org
Re: [DocSet] Linking to docs::1.0::os::index doesn't work
Posted by Stas Bekman <st...@stason.org>.
Per Einar Ellefsen wrote:
> At 20:31 15.06.2002, Stas Bekman wrote:
>
>> Per Einar Ellefsen wrote:
>>
>>> Ok, here's the deal:
>>> download/binaries.pod links to docs::1.0::os::index. However, that
>>> link turns up as broken.
>>> I have tracked the problem down the the creation of %src_docs. If you
>>> look at the dump, you'll see that docs/1.0/os/win32/index.html is in
>>> there, but docs/1.0/os/index.html isn't. This is a bug, because
>>> win32/ isn't a docset, but os/ is.
>>> It seems like the problem lies here: (DocSet::RunTime, line 110):
>>> map { m{(.*?/?)[^/]+$} # add autogenerated
>>> index.html
>>> ? ("$1index.html" => 1, $_ => 1)
>>> : ($_ => 1); # shouldn't happen, but
>>> just in case
>>> }
>>> From this, the problem is that it just takes the longest path and
>>> appends index.html, without checking if it's a DocSet or not... I'm
>>> not sure how to fix this, as I suppose it would require checking up
>>> with the other DocSet classes to see the status of that directory...
>>> I can fix this quickly by making win32 a docset and linking to that
>>> (which I will probably do anyway); however, that isn't a long-term
>>> solution.
>>
>>
>> See if I've fixed it. Actually while fixing I've greatly simplified
>> the code and found at least one bug (now fixed) :)
>>
>> I've simply mapped all config.cfg to index.html, that should be the
>> right thing. Obviously the previous solution was just a spaghetti :)
>
>
> Ok, thanks a lot Stas, but that broke all links on Win32 :)
well, not that, but extra fixing on top of the index.html fix :) the
s|$base/|| was obviously not crossplatform (notice the trailing /), so I
thought abs2rel is the only way to do that well. I guess I could use
substr() on the first char, but who knows what separators are out there.
> I tracked it
> down to a bug in File::Spec::Win32::abs2rel , which is fixed by the
> attached patch. I'm not sure if I understood the abs2rel code well
> enough to submit a patch to p5p though... I'm afraid of breaking other
> things :(
Doh! Too bad :( I don't like the idea of compensating for bugs in the
code, especially when the bug fix is applied globally (without checking
$^O eq 'MSWin32'). How about putting an abs2rel in Util.pm and do all
the bug fixing there? Though we should use the fqdn call then, so later
it won't be confused with File::Spec's abs2rel.
But before we do that, which Perl version has thing bug? Is it in
5.8.0-RC1? If so please submit the test case and the patch to p5p asap
(use the perlbug script in the source distribution), since 5.8.0 will be
released rsn.
> Index: lib/DocSet/RunTime.pm
> ===================================================================
> RCS file: /home/cvs/modperl-docs/lib/DocSet/RunTime.pm,v
> retrieving revision 1.8
> diff -u -r1.8 RunTime.pm
> --- lib/DocSet/RunTime.pm 15 Jun 2002 18:20:33 -0000 1.8
> +++ lib/DocSet/RunTime.pm 16 Jun 2002 10:40:38 -0000
> @@ -102,7 +102,7 @@
> my $rel_uri = path2uri($rel_path);
> $src_docs{$rel_uri} = {
> map { s/config\.cfg$/index.html/; ($_ => 1) } # autogenerated index.html
> - map path2uri( abs2rel($_, $full_base_path) ), # full path=>relative uri
> + map path2uri( abs2rel($_, $full_base_path) =~ /^(?:\w:)?(.*)/ ),# full path=>relative uri (regex is bugfix for File::Spec::Win32)
> grep $rsub_keep_ext->($_), # get files with wanted exts
> grep !$rsub_skip_seen->($_), # skip seen base dirs
> @{ expand_dir($full_base_path) }
--
__________________________________________________________________
Stas Bekman JAm_pH ------> Just Another mod_perl Hacker
http://stason.org/ mod_perl Guide ---> http://perl.apache.org
mailto:stas@stason.org http://use.perl.org http://apacheweek.com
http://modperlbook.org http://apache.org http://ticketmaster.com
---------------------------------------------------------------------
To unsubscribe, e-mail: docs-dev-unsubscribe@perl.apache.org
For additional commands, e-mail: docs-dev-help@perl.apache.org
Re: [DocSet] Linking to docs::1.0::os::index doesn't work
Posted by Per Einar Ellefsen <pe...@skynet.be>.
At 20:31 15.06.2002, Stas Bekman wrote:
>Per Einar Ellefsen wrote:
>>Ok, here's the deal:
>>download/binaries.pod links to docs::1.0::os::index. However, that link
>>turns up as broken.
>>I have tracked the problem down the the creation of %src_docs. If you
>>look at the dump, you'll see that docs/1.0/os/win32/index.html is in
>>there, but docs/1.0/os/index.html isn't. This is a bug, because win32/
>>isn't a docset, but os/ is.
>>It seems like the problem lies here: (DocSet::RunTime, line 110):
>> map { m{(.*?/?)[^/]+$} # add autogenerated index.html
>> ? ("$1index.html" => 1, $_ => 1)
>> : ($_ => 1); # shouldn't happen, but just
>> in case
>> }
>> From this, the problem is that it just takes the longest path and
>> appends index.html, without checking if it's a DocSet or not... I'm not
>> sure how to fix this, as I suppose it would require checking up with the
>> other DocSet classes to see the status of that directory...
>>I can fix this quickly by making win32 a docset and linking to that
>>(which I will probably do anyway); however, that isn't a long-term solution.
>
>See if I've fixed it. Actually while fixing I've greatly simplified the
>code and found at least one bug (now fixed) :)
>
>I've simply mapped all config.cfg to index.html, that should be the right
>thing. Obviously the previous solution was just a spaghetti :)
Ok, thanks a lot Stas, but that broke all links on Win32 :) I tracked it
down to a bug in File::Spec::Win32::abs2rel , which is fixed by the
attached patch. I'm not sure if I understood the abs2rel code well enough
to submit a patch to p5p though... I'm afraid of breaking other things :(
--
Per Einar Ellefsen
per.einar@skynet.be
Re: [DocSet] Linking to docs::1.0::os::index doesn't work
Posted by Stas Bekman <st...@stason.org>.
Per Einar Ellefsen wrote:
> Ok, here's the deal:
>
> download/binaries.pod links to docs::1.0::os::index. However, that link
> turns up as broken.
>
> I have tracked the problem down the the creation of %src_docs. If you
> look at the dump, you'll see that docs/1.0/os/win32/index.html is in
> there, but docs/1.0/os/index.html isn't. This is a bug, because win32/
> isn't a docset, but os/ is.
>
> It seems like the problem lies here: (DocSet::RunTime, line 110):
> map { m{(.*?/?)[^/]+$} # add autogenerated index.html
> ? ("$1index.html" => 1, $_ => 1)
> : ($_ => 1); # shouldn't happen, but just
> in case
> }
> From this, the problem is that it just takes the longest path and
> appends index.html, without checking if it's a DocSet or not... I'm not
> sure how to fix this, as I suppose it would require checking up with the
> other DocSet classes to see the status of that directory...
>
> I can fix this quickly by making win32 a docset and linking to that
> (which I will probably do anyway); however, that isn't a long-term
> solution.
See if I've fixed it. Actually while fixing I've greatly simplified the
code and found at least one bug (now fixed) :)
I've simply mapped all config.cfg to index.html, that should be the
right thing. Obviously the previous solution was just a spaghetti :)
__________________________________________________________________
Stas Bekman JAm_pH ------> Just Another mod_perl Hacker
http://stason.org/ mod_perl Guide ---> http://perl.apache.org
mailto:stas@stason.org http://use.perl.org http://apacheweek.com
http://modperlbook.org http://apache.org http://ticketmaster.com
---------------------------------------------------------------------
To unsubscribe, e-mail: docs-dev-unsubscribe@perl.apache.org
For additional commands, e-mail: docs-dev-help@perl.apache.org