WelcomeWelcome | FAQFAQ | DownloadsDownloads | WikiWiki

Author Topic: Perl migrated from 5.8.8 to 5.10.0  (Read 4210 times)

Offline bmarkus

  • Administrator
  • Hero Member
  • *****
  • Posts: 7183
    • My Community Forum
Perl migrated from 5.8.8 to 5.10.0
« on: September 30, 2009, 05:03:59 AM »
perl5.tczl is migrated to 5.10.0 from 5.8.8 hiddenly. Date in .info shows 2009.05.18 but for sure it happened much later as the compilation date of 5.8.8 used here is later than that.

Now it is not only newer but moved to /usr/local instead of /usr which is great. However old 5.8.8 Perl modules in the repo must be updated also for 5.10.0
« Last Edit: September 30, 2009, 05:05:48 AM by bmarkus »
Béla
Ham Radio callsign: HA5DI

"Amateur Radio: The First Technology-Based Social Network."

Offline Jason W

  • Administrator
  • Hero Member
  • *****
  • Posts: 9730
Re: Perl migrated from 5.8.8 to 5.10.0
« Reply #1 on: September 30, 2009, 05:19:25 AM »
I am sure Perl_URI depends on perl_xml (5.8.8 ) , it is not noted in it's dep file. I don't see any others right off that have perl modules.  That is by grepping the dep files for a perl5 dependency and viewing their file lists..



« Last Edit: September 30, 2009, 05:22:30 AM by Jason W »

Offline bmarkus

  • Administrator
  • Hero Member
  • *****
  • Posts: 7183
    • My Community Forum
Re: Perl migrated from 5.8.8 to 5.10.0
« Reply #2 on: September 30, 2009, 05:24:43 AM »
perl_xml.tcz ? In the TCE repo there is also perl_archive_zip.tce which is missing in TCZ
Béla
Ham Radio callsign: HA5DI

"Amateur Radio: The First Technology-Based Social Network."

Offline Juanito

  • Administrator
  • Hero Member
  • *****
  • Posts: 14535
Re: Perl migrated from 5.8.8 to 5.10.0
« Reply #3 on: September 30, 2009, 05:28:18 AM »
perl_xml (compiled to /usr and intended for compiling purposes) and perl5 (compiled to /usr/local) are two entirely separate extensions.

..and yes, there is also perl_archive_zip, which as the info file says, is intended for use with perl_xml.

perl_xml and friends were only intended to be tce extensions - I don't recall adding a tcz...

Offline bmarkus

  • Administrator
  • Hero Member
  • *****
  • Posts: 7183
    • My Community Forum
Re: Perl migrated from 5.8.8 to 5.10.0
« Reply #4 on: September 30, 2009, 06:06:15 AM »
Right, I did not recognize nor expect that perl_xml contains the complete perl 5.8.8 binaries not only the xml module :(
Béla
Ham Radio callsign: HA5DI

"Amateur Radio: The First Technology-Based Social Network."

Offline Juanito

  • Administrator
  • Hero Member
  • *****
  • Posts: 14535
Re: Perl migrated from 5.8.8 to 5.10.0
« Reply #5 on: September 30, 2009, 11:20:51 PM »
I had a look at building the xml::parser module against perl5 - one thing I noticed was that this produces:
Code: [Select]
$ cat /usr/local/lib/perl5/5.10.0/i686-linux-thread-multi/perllocal.pod

=head2 Thu Oct  1 09:08:38 2009: C<Module> L<XML::Parser|XML::Parser>

=over 4

=item *

C<installed into: /usr/local/lib/perl5/site_perl/5.10.0>

=item *

C<LINKTYPE: static>

=item *

C<VERSION: 2.34>

=item *

C<EXE_FILES: >

=back

..for each perl module, which means that, strictly speaking, the extension should check for the presence of perllocal.pod and add this to the end of the existing file if one is already present.

Does anybody know if this is actually required or if it is a kind of "optional" perl book-keeping?

Offline Jason W

  • Administrator
  • Hero Member
  • *****
  • Posts: 9730
Re: Perl migrated from 5.8.8 to 5.10.0
« Reply #6 on: October 01, 2009, 08:13:03 AM »
Arch linux simply deletes this file in it's packages it appears.  Same with Slackware packages.  I don't have time at the moment to see how Debian handles it. 


But since some distros simply delete the file it may not be important.  The pod stands for plain old documentation, so being a doc likely means it has no system imoportance.

Offline Juanito

  • Administrator
  • Hero Member
  • *****
  • Posts: 14535
Re: Perl migrated from 5.8.8 to 5.10.0
« Reply #7 on: October 01, 2009, 08:32:21 AM »
Thanks - I seem to have bigger problems than that at the moment.

Using perl5, xml::parser compiles and installs without errors, but applications do not see it as present. It looks like it doesn't like the fact that perl5 has libperl.so rather than the libperl.a in perl_xml - [sigh]

Offline Jason W

  • Administrator
  • Hero Member
  • *****
  • Posts: 9730
Re: Perl migrated from 5.8.8 to 5.10.0
« Reply #8 on: October 01, 2009, 08:42:56 AM »
Of course, on second thought I could just see after having about 15 or 20 perl modules added to the repo there is discovered a need for the perllocal.pod info and having to go back and recompile/regenerate it.  Since it would be trivial to include a blank writable perllocal.pod in the perl5 extension and have extensions echo their pod contents to it we may want to go ahead and do that.  Keeping the perllocal.pod from each module extension in say /usr/local/share/extensionname and echoing it to perllocal.pod via the startup script would be the simplest.  Say like:

Code: [Select]
if [ -f  /usr/local/lib/perl5/5.10.0/i686-linux-thread-multi/perllocal.pod ]; then
   cat /usr/local/share/xml_parser/perllocal.pod >>  /usr/local/lib/perl5/5.10.0/i686-linux-thread-multi/perllocal.pod
fi


Offline Juanito

  • Administrator
  • Hero Member
  • *****
  • Posts: 14535
Re: Perl migrated from 5.8.8 to 5.10.0
« Reply #9 on: October 01, 2009, 08:55:23 AM »
I'd gone about it a slightly different way, basically:

Code: [Select]
if [ ! -d /usr/local/lib/perl5/5.10.0/i686-linux-thread-multi ]; then
  mkdir -p /usr/local/lib/perl5/5.10.0/i686-linux-thread-multi
  rsync -aqzL /usr/local/share/perl_xml_parser/files/perllocal.pod /usr/local/lib/perl5/5.10.0/i686-linux-thread-multi/
  else
  cat /usr/local/share/perl_xml_parser/files/perllocal.pod >> /usr/local/lib/perl5/5.10.0/i686-linux-thread-multi/perllocal.pod
fi

..but it amounts to much the same thing.

Offline Jason W

  • Administrator
  • Hero Member
  • *****
  • Posts: 9730
Re: Perl migrated from 5.8.8 to 5.10.0
« Reply #10 on: October 01, 2009, 09:12:19 AM »
Your approach would be good for a standard for perl modules.  One small detail - the if tests for the existence of the dir while the else deals with the file.  A small issue though:

Code: [Select]
if [ -f /usr/local/lib/perl5/5.10.0/i686-linux-thread-multi/perllocal.pod ]; then
 cat /usr/local/share/perl_xml_parser/files/perllocal.pod >> \
/usr/local/lib/perl5/5.10.0/i686-linux-thread-multi/perllocal.pod
else
  [ -d /usr/local/lib/perl5/5.10.0/i686-linux-thread-multi/perllocal.pod ] || \
mkdir /usr/local/lib/perl5/5.10.0/i686-linux-thread-multi/perllocal.pod
  cp -p /usr/local/share/perl_xml_parser/files/perllocal.pod \
/usr/local/lib/perl5/5.10.0/i686-linux-thread-multi/perllocal.pod
fi
« Last Edit: October 01, 2009, 09:14:14 AM by Jason W »

Offline Juanito

  • Administrator
  • Hero Member
  • *****
  • Posts: 14535
Re: Perl migrated from 5.8.8 to 5.10.0
« Reply #11 on: October 01, 2009, 09:51:44 AM »
One small detail - the if tests for the existence of the dir while the else deals with the file.

I did it like that because rsync will not copy the file if more than one level of directory is missing - basically I was thinking about what might happen if perl5 is not loaded.

But you're right - it would make more sense to first append the file if it is already present and then create the directory/copy the file if not.

Offline Jason W

  • Administrator
  • Hero Member
  • *****
  • Posts: 9730
Re: Perl migrated from 5.8.8 to 5.10.0
« Reply #12 on: October 01, 2009, 09:56:17 AM »
I see, I didn't know rsync would not create more than one directory deep.  Also I omitted the -p from mkdir. 

Offline Juanito

  • Administrator
  • Hero Member
  • *****
  • Posts: 14535
Re: Perl migrated from 5.8.8 to 5.10.0
« Reply #13 on: October 02, 2009, 03:36:50 AM »
new perl5 and perl_xml_parser extensions posted