Perl / perl5

🐪 The Perl programming language
https://dev.perl.org/perl5/
Other
1.85k stars 527 forks source link

[doc] Fix HTTP and Books links #22186

Closed rwp0 closed 9 hours ago

rwp0 commented 2 weeks ago

Update some obsolete Perl book URL's

Convert some HTTP links to HTTPS

rwp0 commented 2 weeks ago

Fixed some more Oreilly book URL's converting from catalog (which doesn't function anymore) to a shorter version of library/view.

rwp0 commented 2 weeks ago

That's the only one remaining (untouched by the PR):

Because the replacement for it is (looks like moved from Oreilly proper):

whose URL is too long (crossing the 78 character limit) for POD checking tests.

rwp0 commented 2 weeks ago

Since about minor doc changes, can this be merged before the 5.40 release?

rwp0 commented 5 days ago

@jkeenan can you please review this again? I corrected all book references to their new and working URL's.

rwp0 commented 4 days ago

@jkeenan I wrapped all URL's in L<>. Please approve if all good now.

jkeenan commented 1 day ago

Unfortunately, those newly added L<> links didn't have the effect I was hoping for. Many of them are already in indented blocks, which means that perldoc treats them as code (C<>) and presents them like this:

    *Programming Perl* (the "Camel Book"):
         by Tom Christiansen, brian d foy, Larry Wall with Jon Orwant
         ISBN 978-0-596-00492-7 [4th edition February 2012]
         ISBN 978-1-4493-9890-3 [ebook]
         L<https://www.oreilly.com/library/view/-/9781449321451/>

So there are about 30 instances of L<> in indented blocks which need to be removed. This regex should clean up most of them:

$ perl -pi -e 's/^(\s+)L<(.*)>/$1$2/' pod/perlbook.pod

There will be one in the entry for Higher-Order Perl that you'll have to manually clean up. When you're done, you can get a rough idea of how this will look in HTML by calling:

$ pod2html --infile=pod/perlbook.pod --outfile=/tmp/perlbook.html --no-index

I'm sorry that my suggestion didn't work out.

rwp0 commented 1 day ago

Unfortunately, those newly added L<> links didn't have the effect I was hoping for. Many of them are already in indented blocks, which means that perldoc treats them as code (C<>) and presents them like this:

    *Programming Perl* (the "Camel Book"):
         by Tom Christiansen, brian d foy, Larry Wall with Jon Orwant
         ISBN 978-0-596-00492-7 [4th edition February 2012]
         ISBN 978-1-4493-9890-3 [ebook]
         L<https://www.oreilly.com/library/view/-/9781449321451/>

So there are about 30 instances of L<> in indented blocks which need to be removed. This regex should clean up most of them:

$ perl -pi -e 's/^(\s+)L<(.*)>/$1$2/' pod/perlbook.pod

There will be one in the entry for Higher-Order Perl that you'll have to manually clean up. When you're done, you can get a rough idea of how this will look in HTML by calling:

$ pod2html --infile=pod/perlbook.pod --outfile=/tmp/perlbook.html --no-index

I'm sorry that my suggestion didn't work out.

Thanks, I will.

At least we realize now why those URL's weren't "linkified" originally 🙂

rwp0 commented 1 day ago

@jkeenan I removed all L<>'s from book references. Hope everything is okay now and we can merge this PR already 🙂

jkeenan commented 1 day ago

@rwp0, pod/perllocale.pod had evolved since you worked on it, so there were merge conflicts. I fetched your pull request, rebased on blead, resolved merge conflicts, merged the result into blead and pushed to origin in e3f226d5c6ed. Please check that I got all your changes correct. @khwilliamson, please check that I resolved merge conflicts in perllocale satisfactorily. Taking this ticket for the purpose of closing it once we know those conflicts were correctly resolved. Request that any further documentation issues be discussed in a new ticket/pull request. Thanks.