Re: perl-after-upgrade mistakenly thinks nothing needs to be done
Thanks for the replies; I really appreciate it. Alexandre wrote: Have you followed steps described in perl-after-upgrade man page? $ man perl-after-upgrade Yes, except for the last step (deleting old CONTENTS backups), since the previous steps didn't seem to do what they should. As I said, perl-after-upgrade thinks there's nothing to do. It doesn't report any packages it can't handle. It handles them, but for some reason determines that they are OK, despite the fact that the modules are all still sitting in the old installation. Anton Shterenlikht wrote: Have you done portmaster 5-? If not, do it. I hadn't done that. (portmaster 5- doesn't work, but portmaster p5- does.) UPDATING makes mention of this, but I didn't understand that it was saying it was a required step. Specifically, this is what it says: - 20120630: AFFECTS: users of lang/perl* AUTHOR: s...@freebsd.org lang/perl5.16 is out. If you want to switch to it from, for example lang/perl5.12, that is: Portupgrade users: 0) Fix pkgdb.db (for safety): pkgdb -Ff 1) Reinstall new version of Perl (5.16): env DISABLE_CONFLICTS=1 portupgrade -o lang/perl5.16 -f perl-5.12.\* 2) Reinstall everything that depends on Perl: portupgrade -fr perl Portmaster users: portmaster -o lang/perl5.16 lang/perl5.12 Conservative: portmaster p5- Comprehensive (but perhaps overkill): portmaster -r perl- Note: If the perl- glob matches more than one port you will need to specify the name of the Perl directory in /var/db/pkg explicitly. The default version for Perl has also been changed from 5.12 to 5.14. - Because of the way the portupgrade section is numbered, I thought the portmaster section was giving me 3 options: regular, conservative, comprehensive -- not two steps (1. portmaster -o, then 2. choose either the conservative or comprehensive option). ...partly my reading comprehension failure, I guess. It makes no mention of perl-after-upgrade, though. My understanding is that perl-after-upgrade looks at what perl-dependent packages are installed. As I can see by its output, this includes not just the application packages like SpamAssassin and mrtg, but their requisite Perl module packages as well, like HTML::Parser. Then, as these packages are found, perl-after-upgrade moves things from the old Perl installation over to the new, and does some other cleanup. Maybe that's a flawed assumption, because it seems rather weird to me that before running perl-after-upgrade, I'm expected to *first* to do a *full upgrade or reinstall* of the modules. Isn't that exactly what we're trying to avoid by running perl-after-upgrade? Nothing in the perl-after-upgrade man page suggests this is necessary; in fact, the intro implies the opposite. After this is done, how much have you got left under 5.12.4? Not much of anything, just a man page, a few mrtg .pm files... Naturally, running perl-after-upgrade at this point yields the same results as before (0 moved, 0 modified, 0 adjusted for everything). But this time, that's the expected output, I believe, given that I just reinstalled everything. I guess I'm just completely confused about what perl-after-upgrade was actually supposed to do, so it's difficult to suggest documentation updates. At the very least, though, maybe change UPDATING to clarify that the portmaster steps are a sequence, and mention perl-after-upgrade. ___ freebsd-questions@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-questions To unsubscribe, send any mail to freebsd-questions-unsubscr...@freebsd.org
Re: PERL problem installing SQLgrey
On 20/02/2013 21:22, lcon...@go2france.com wrote: === p5-Date-Calc-6.3 depends on package: p5-Bit-Vector=7.1 - not found ===Verifying install for p5-Bit-Vector=7.1 in /usr/ports/math/p5-Bit-Vector === Extracting for p5-Bit-Vector-7.2_2 = SHA256 Checksum mismatch for Bit-Vector-7.2.tar.gz. and it can't find it anywhere else. bombs out with: fetch: ftp://ftp.FreeBSD.org/pub/FreeBSD/ports/distfiles/Bit-Vector-7.2.tar.gz: size mismatch: expected 135586, actual 137817 = Couldn't fetch it - please try to retrieve this = port manually into /usr/ports/distfiles/ and try again. *** Error code 1 Did you try updating your ports to the latest and: cd /usr/ports/math/p5-Bit-Vector make distclean and then try and install sqlgrey again? If you get the same error repeatably, then it's possibly a bug in the p5-Bit-Vector port -- perhaps the distfile was changed, in which case the port maintainer would have to update the distinfo to match. In any case, if you're still having problems, please ask again on freebsd-po...@freebsd.org Cheers, Matthew ___ freebsd-questions@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-questions To unsubscribe, send any mail to freebsd-questions-unsubscr...@freebsd.org
Re: perl, rrdtool issue
Actually I did portupgrade -rf, and still have the issue with that bsdpan-RRDp-0.99.0. And because of that my munin isn't working, I'm getting email like: Can't locate Munin/Common/Defaults.pm in @INC (@INC contains: It seems that you need to reinstall Munin, not RRDtool. And from the error message, it still uses Perl 5.12 Olivier /usr/local/lib/perl5/5.12.4/BSDPAN /usr/local/lib/perl5/site_perl/5.12.4/mach /usr/local/lib/perl5/site_perl/5.12.4 /usr/local/lib/perl5/5.12.4/mach /usr/local/lib/perl5/5.12.4 .) at /usr/local/lib/perl5/site_perl/5.12.4/Munin/Master/Update.pm line 14. On 2012 November 15 Thursday at 8:37 AM, Olivier Nicole wrote: Laszlo, Yesterday I issued the following command which I regretted: portupgrade -CPy, and this little tool installed perl 5.12 while perl 5.10 was already on the system. Since then everything is messed up. Now I deleted perl 5.10 and reinstalled perl 5.10 and everything which depends on it and still have the following error: What I usually do is upgrading every Perl packages after I upgraded Perl. Something like portupgrade -R perl should do. Or do it manually, one port at a time if you are afraid to break something else. For having done it recently, from perl to rrdtool it's less than 10 ports to get it back working. best regards, olivier # portversion -v [Updating the pkgdb format:bdb_btree in /var/db/pkg ... - 626 packages found (-1 +0) (...) done] Stale dependency: bsdpan-RRDp-0.99.0 -- perl-5.10.1_7 -- manually run 'pkgdb -F' to fix, or specify -O to force. I tried pkgdb -F but it can't fix, also tried to delete rrdtool and reinstall, but still the same issue. I'm running 8.3-RELEASE-p3. Do you have any idea how to solve this issue? Thx! Laszlo ___ freebsd-questions@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-questions To unsubscribe, send any mail to freebsd-questions-unsubscr...@freebsd.org ___ freebsd-questions@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-questions To unsubscribe, send any mail to freebsd-questions-unsubscr...@freebsd.org ___ freebsd-questions@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-questions To unsubscribe, send any mail to freebsd-questions-unsubscr...@freebsd.org
Re: perl, rrdtool issue
Laszlo, Yesterday I issued the following command which I regretted: portupgrade -CPy, and this little tool installed perl 5.12 while perl 5.10 was already on the system. Since then everything is messed up. Now I deleted perl 5.10 and reinstalled perl 5.10 and everything which depends on it and still have the following error: What I usually do is upgrading every Perl packages after I upgraded Perl. Something like portupgrade -R perl should do. Or do it manually, one port at a time if you are afraid to break something else. For having done it recently, from perl to rrdtool it's less than 10 ports to get it back working. best regards, olivier # portversion -v [Updating the pkgdb format:bdb_btree in /var/db/pkg ... - 626 packages found (-1 +0) (...) done] Stale dependency: bsdpan-RRDp-0.99.0 -- perl-5.10.1_7 -- manually run 'pkgdb -F' to fix, or specify -O to force. I tried pkgdb -F but it can't fix, also tried to delete rrdtool and reinstall, but still the same issue. I'm running 8.3-RELEASE-p3. Do you have any idea how to solve this issue? Thx! Laszlo ___ freebsd-questions@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-questions To unsubscribe, send any mail to freebsd-questions-unsubscr...@freebsd.org ___ freebsd-questions@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-questions To unsubscribe, send any mail to freebsd-questions-unsubscr...@freebsd.org
Re: perl, rrdtool issue
Actually I did portupgrade -rf, and still have the issue with that bsdpan-RRDp-0.99.0. And because of that my munin isn't working, I'm getting email like: Can't locate Munin/Common/Defaults.pm in @INC (@INC contains: /usr/local/lib/perl5/5.12.4/BSDPAN /usr/local/lib/perl5/site_perl/5.12.4/mach /usr/local/lib/perl5/site_perl/5.12.4 /usr/local/lib/perl5/5.12.4/mach /usr/local/lib/perl5/5.12.4 .) at /usr/local/lib/perl5/site_perl/5.12.4/Munin/Master/Update.pm line 14. On 2012 November 15 Thursday at 8:37 AM, Olivier Nicole wrote: Laszlo, Yesterday I issued the following command which I regretted: portupgrade -CPy, and this little tool installed perl 5.12 while perl 5.10 was already on the system. Since then everything is messed up. Now I deleted perl 5.10 and reinstalled perl 5.10 and everything which depends on it and still have the following error: What I usually do is upgrading every Perl packages after I upgraded Perl. Something like portupgrade -R perl should do. Or do it manually, one port at a time if you are afraid to break something else. For having done it recently, from perl to rrdtool it's less than 10 ports to get it back working. best regards, olivier # portversion -v [Updating the pkgdb format:bdb_btree in /var/db/pkg ... - 626 packages found (-1 +0) (...) done] Stale dependency: bsdpan-RRDp-0.99.0 -- perl-5.10.1_7 -- manually run 'pkgdb -F' to fix, or specify -O to force. I tried pkgdb -F but it can't fix, also tried to delete rrdtool and reinstall, but still the same issue. I'm running 8.3-RELEASE-p3. Do you have any idea how to solve this issue? Thx! Laszlo ___ freebsd-questions@freebsd.org (mailto:freebsd-questions@freebsd.org) mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-questions To unsubscribe, send any mail to freebsd-questions-unsubscr...@freebsd.org (mailto:freebsd-questions-unsubscr...@freebsd.org) ___ freebsd-questions@freebsd.org (mailto:freebsd-questions@freebsd.org) mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-questions To unsubscribe, send any mail to freebsd-questions-unsubscr...@freebsd.org (mailto:freebsd-questions-unsubscr...@freebsd.org) ___ freebsd-questions@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-questions To unsubscribe, send any mail to freebsd-questions-unsubscr...@freebsd.org
Re: Perl Upgrade And Mailscanner Woes
On 12/21/2011 03:59 PM, Tim Daneliuk wrote: Almost every time there is a perl upgrade, it manages to break Mailscanner even after running perl-after-upgrade. The solution ends up being a reinstall of Mailscanner, but this is a real pain, because you have to delete and reinstall every dependent perl package used by Mailscanner. Does anyone have a better way? Hi After a major perl upgrade? portmaster -r perl- portmaster p5- portupgrade -fr perl Disclaimer: http://www.ose.nl/email ___ freebsd-questions@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-questions To unsubscribe, send any mail to freebsd-questions-unsubscr...@freebsd.org
Re: Perl Upgrade And Mailscanner Woes
On 21/12/2011 14:59, Tim Daneliuk wrote: Almost every time there is a perl upgrade, it manages to break Mailscanner even after running perl-after-upgrade. The solution ends up being a reinstall of Mailscanner, but this is a real pain, because you have to delete and reinstall every dependent perl package used by Mailscanner. Something is going wrong with your upgrade process. If you're doing a minor version upgrade of perl (eg. from 5.x.y to 5.x.y+1), then almost all perl modules (including XS) only need to be moved into the new ${LOCALBASE}/lib/perl5/site-perl/5.x.y+1 directory tree, which is basically what perl-after-upgrade does. A few packages which embed a perl interpreter would need recompiling, but you could count those on the fingers of one hand. Are you sure you are using perl-after-upgrade correctly? You do understand that just running: # perl-after-upgrade doesn't actually modify anything on disk: instead it shows you what needs to be done. To actually effect the change you need to run: # perl-after-upgrade -f Then rebuild and reinstall any packages it says need rebuilding. If it has worked properly then almost all of the contents of ${LOCALBASE}/lib/perl5/site-perl/5.x.y will be gone, and that whole directory tree should be able to be deleted without consequence. Of course if your update is from perl 5.x.y to 5.x+1.z then you really do need to recompile and reinstall all perl modules and anything else that depends on perl. perl-after-upgrade is not effective in this case. Cheers, Matthew -- Dr Matthew J Seaman MA, D.Phil. 7 Priory Courtyard Flat 3 PGP: http://www.infracaninophile.co.uk/pgpkey Ramsgate JID: matt...@infracaninophile.co.uk Kent, CT11 9PW signature.asc Description: OpenPGP digital signature
Re: Perl Upgrade And Mailscanner Woes
On 12/21/2011 09:28 AM, Matthew Seaman wrote: On 21/12/2011 14:59, Tim Daneliuk wrote: Almost every time there is a perl upgrade, it manages to break Mailscanner even after running perl-after-upgrade. The solution ends up being a reinstall of Mailscanner, but this is a real pain, because you have to delete and reinstall every dependent perl package used by Mailscanner. Something is going wrong with your upgrade process. If you're doing a minor version upgrade of perl (eg. from 5.x.y to 5.x.y+1), then almost all perl modules (including XS) only need to be moved into the new ${LOCALBASE}/lib/perl5/site-perl/5.x.y+1 directory tree, which is basically what perl-after-upgrade does. A few packages which embed a perl interpreter would need recompiling, but you could count those on the fingers of one hand. Are you sure you are using perl-after-upgrade correctly? You do understand that just running: # perl-after-upgrade doesn't actually modify anything on disk: instead it shows you what needs to be done. To actually effect the change you need to run: # perl-after-upgrade -f Aha! And the lights go on ... Nevermind. Slinks away in shame ... ___ freebsd-questions@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-questions To unsubscribe, send any mail to freebsd-questions-unsubscr...@freebsd.org
Re: Perl Upgrade And Mailscanner Woes
Tim Daneliuk writes: Are you sure you are using perl-after-upgrade correctly? You do understand that just running: # perl-after-upgrade doesn't actually modify anything on disk: instead it shows you what needs to be done. To actually effect the change you need to run: # perl-after-upgrade -f Aha! And the lights go on ... Nevermind. No, not nevermind. While this seems like upgrading for dummies, there are enough of them out there waves this _really_ needs to go in the upgrade message. Robert Huff ___ freebsd-questions@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-questions To unsubscribe, send any mail to freebsd-questions-unsubscr...@freebsd.org
Re: Perl Problem After Upgrade to 5.12.4
On Wed, 06 Jul 2011 10:01:21 -0500, Tim Daneliuk wrote: Ideas anyone? I am trying to rebuild SpamAssassin after a perl upgrade to 5.12.4 and get this (I DID run perl-after-upgrade prior to this): === p5-Encode-Detect-1.01 depends on file: /usr/local/lib/perl5/site_perl/5.12.4/Module/Build.pm - not found ===Verifying install for /usr/local/lib/perl5/site_perl/5.12.4/Module/Build.pm in /usr/ports/devel/p5-Module-Build === License check disabled, port has not defined LICENSE === Extracting for p5-Module-Build-0.3800_1 = SHA256 Checksum OK for Module-Build-0.3800.tar.gz. === p5-Module-Build-0.3800_1 depends on file: /usr/local/bin/perl5.12.4 - found === Patching for p5-Module-Build-0.3800_1 === p5-Module-Build-0.3800_1 depends on file: /usr/local/bin/perl5.12.4 - found === p5-Module-Build-0.3800_1 depends on package: p5-CPAN-Meta=2.110420 - found === p5-Module-Build-0.3800_1 depends on package: p5-Module-Metadata=1.02 - found === p5-Module-Build-0.3800_1 depends on package: p5-Parse-CPAN-Meta=1.44.01 - found === p5-Module-Build-0.3800_1 depends on package: p5-Perl-OSType=1.000 - found === p5-Module-Build-0.3800_1 depends on package: p5-version=0.87 - found === p5-Module-Build-0.3800_1 depends on file: /usr/local/bin/perl5.12.4 - found === Configuring for p5-Module-Build-0.3800_1 *** BOOTSTRAPPING Perl::OSType *** *** BOOTSTRAPPING version *** *** BOOTSTRAPPING Module::Metadata *** Checking prerequisites... requires: ! CPAN::Meta is not installed build_requires: ! Parse::CPAN::Meta (1.40) is installed, but we need version = 1.4401 ERRORS/WARNINGS FOUND IN PREREQUISITES. You may wish to install the versions of the modules indicated above before proceeding with this installation Could not create MYMETA files Creating new 'Build' script for 'Module-Build' version '0.3800' Copied META.yml to MYMETA.yml for bootstrapping These additional prerequisites must be installed: requires: ! Perl::OSType (we need version 1.00) ! version (we need version 0.87) ! Module::Metadata (we need version 1.02) === Building for p5-Module-Build-0.3800_1 Can't locate Perl/OSType.pm in @INC (@INC contains: t/lib t/bundled lib /usr/local/lib/perl5/5.12.4/BSDPAN /usr/local/lib/perl5/site_perl/5.12.4/mach /usr/local/lib/perl5/site_perl/5.12.4 /usr/local/lib/perl5/5.12.4/mach /usr/local/lib/perl5/5.12.4 .) at lib/Module/Build.pm line 13. BEGIN failed--compilation aborted at lib/Module/Build.pm line 13. Compilation failed in require at Build line 42. BEGIN failed--compilation aborted at Build line 42. *** Error code 2 Stop in /usr1/ports/devel/p5-Module-Build. *** Error code 1 Stop in /usr1/ports/converters/p5-Encode-Detect. *** Error code 1 Stop in /usr1/ports/mail/p5-Mail-SpamAssassin. *** Error code 1 Stop in /usr1/ports/mail/p5-Mail-SpamAssassi Hello Tim, list, I have the same problem on one of my boxes. Cannot upgrade p5-Module-Build-0.3800 port because of this. Cheers, Lars. ___ freebsd-questions@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-questions To unsubscribe, send any mail to freebsd-questions-unsubscr...@freebsd.org
Re: Perl Problem After Upgrade to 5.12.4
On Fri, 08 Jul 2011 13:00:24 +0200 SoCruel.NU FreeBSD Questions Mailbox articulated: On Wed, 06 Jul 2011 10:01:21 -0500, Tim Daneliuk wrote: Ideas anyone? I am trying to rebuild SpamAssassin after a perl upgrade to 5.12.4 and get this (I DID run perl-after-upgrade prior to this): === p5-Encode-Detect-1.01 depends on file: /usr/local/lib/perl5/site_perl/5.12.4/Module/Build.pm - not found ===Verifying install for /usr/local/lib/perl5/site_perl/5.12.4/Module/Build.pm in /usr/ports/devel/p5-Module-Build === License check disabled, port has not defined LICENSE === Extracting for p5-Module-Build-0.3800_1 = SHA256 Checksum OK for Module-Build-0.3800.tar.gz. === p5-Module-Build-0.3800_1 depends on file: /usr/local/bin/perl5.12.4 - found === Patching for p5-Module-Build-0.3800_1 === p5-Module-Build-0.3800_1 depends on file: /usr/local/bin/perl5.12.4 - found === p5-Module-Build-0.3800_1 depends on package: p5-CPAN-Meta=2.110420 - found === p5-Module-Build-0.3800_1 depends on package: p5-Module-Metadata=1.02 - found === p5-Module-Build-0.3800_1 depends on package: p5-Parse-CPAN-Meta=1.44.01 - found === p5-Module-Build-0.3800_1 depends on package: p5-Perl-OSType=1.000 - found === p5-Module-Build-0.3800_1 depends on package: p5-version=0.87 - found === p5-Module-Build-0.3800_1 depends on file: /usr/local/bin/perl5.12.4 - found === Configuring for p5-Module-Build-0.3800_1 *** BOOTSTRAPPING Perl::OSType *** *** BOOTSTRAPPING version *** *** BOOTSTRAPPING Module::Metadata *** Checking prerequisites... requires: ! CPAN::Meta is not installed build_requires: ! Parse::CPAN::Meta (1.40) is installed, but we need version = 1.4401 ERRORS/WARNINGS FOUND IN PREREQUISITES. You may wish to install the versions of the modules indicated above before proceeding with this installation Could not create MYMETA files Creating new 'Build' script for 'Module-Build' version '0.3800' Copied META.yml to MYMETA.yml for bootstrapping These additional prerequisites must be installed: requires: ! Perl::OSType (we need version 1.00) ! version (we need version 0.87) ! Module::Metadata (we need version 1.02) === Building for p5-Module-Build-0.3800_1 Can't locate Perl/OSType.pm in @INC (@INC contains: t/lib t/bundled lib /usr/local/lib/perl5/5.12.4/BSDPAN /usr/local/lib/perl5/site_perl/5.12.4/mach /usr/local/lib/perl5/site_perl/5.12.4 /usr/local/lib/perl5/5.12.4/mach /usr/local/lib/perl5/5.12.4 .) at lib/Module/Build.pm line 13. BEGIN failed--compilation aborted at lib/Module/Build.pm line 13. Compilation failed in require at Build line 42. BEGIN failed--compilation aborted at Build line 42. *** Error code 2 Stop in /usr1/ports/devel/p5-Module-Build. *** Error code 1 Stop in /usr1/ports/converters/p5-Encode-Detect. *** Error code 1 Stop in /usr1/ports/mail/p5-Mail-SpamAssassin. *** Error code 1 Stop in /usr1/ports/mail/p5-Mail-SpamAssassi Hello Tim, list, I have the same problem on one of my boxes. Cannot upgrade p5-Module-Build-0.3800 port because of this. Has anyone filed a PR against this problem? -- Jerry ✌ jerry+f...@seibercom.net Disclaimer: off-list followups get on-list replies or ignored. Do not CC this poster. Please do not ignore the Reply-To header. http://www.catb.org/~esr/faqs/smart-questions.html ___ freebsd-questions@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-questions To unsubscribe, send any mail to freebsd-questions-unsubscr...@freebsd.org
Re: Perl Problem After Upgrade to 5.12.4
On 7/8/2011 6:52 AM, Jerry said this: On Fri, 08 Jul 2011 13:00:24 +0200 SoCruel.NU FreeBSD Questions Mailbox articulated: On Wed, 06 Jul 2011 10:01:21 -0500, Tim Daneliuk wrote: Ideas anyone? I am trying to rebuild SpamAssassin after a perl upgrade to 5.12.4 and get this (I DID run perl-after-upgrade prior to this): === p5-Encode-Detect-1.01 depends on file: /usr/local/lib/perl5/site_perl/5.12.4/Module/Build.pm - not found ===Verifying install for /usr/local/lib/perl5/site_perl/5.12.4/Module/Build.pm in /usr/ports/devel/p5-Module-Build === License check disabled, port has not defined LICENSE === Extracting for p5-Module-Build-0.3800_1 = SHA256 Checksum OK for Module-Build-0.3800.tar.gz. === p5-Module-Build-0.3800_1 depends on file: /usr/local/bin/perl5.12.4 - found === Patching for p5-Module-Build-0.3800_1 === p5-Module-Build-0.3800_1 depends on file: /usr/local/bin/perl5.12.4 - found === p5-Module-Build-0.3800_1 depends on package: p5-CPAN-Meta=2.110420 - found === p5-Module-Build-0.3800_1 depends on package: p5-Module-Metadata=1.02 - found === p5-Module-Build-0.3800_1 depends on package: p5-Parse-CPAN-Meta=1.44.01 - found === p5-Module-Build-0.3800_1 depends on package: p5-Perl-OSType=1.000 - found === p5-Module-Build-0.3800_1 depends on package: p5-version=0.87 - found === p5-Module-Build-0.3800_1 depends on file: /usr/local/bin/perl5.12.4 - found === Configuring for p5-Module-Build-0.3800_1 *** BOOTSTRAPPING Perl::OSType *** *** BOOTSTRAPPING version *** *** BOOTSTRAPPING Module::Metadata *** Checking prerequisites... requires: ! CPAN::Meta is not installed build_requires: ! Parse::CPAN::Meta (1.40) is installed, but we need version = 1.4401 ERRORS/WARNINGS FOUND IN PREREQUISITES. You may wish to install the versions of the modules indicated above before proceeding with this installation Could not create MYMETA files Creating new 'Build' script for 'Module-Build' version '0.3800' Copied META.yml to MYMETA.yml for bootstrapping These additional prerequisites must be installed: requires: ! Perl::OSType (we need version 1.00) ! version (we need version 0.87) ! Module::Metadata (we need version 1.02) === Building for p5-Module-Build-0.3800_1 Can't locate Perl/OSType.pm in @INC (@INC contains: t/lib t/bundled lib /usr/local/lib/perl5/5.12.4/BSDPAN /usr/local/lib/perl5/site_perl/5.12.4/mach /usr/local/lib/perl5/site_perl/5.12.4 /usr/local/lib/perl5/5.12.4/mach /usr/local/lib/perl5/5.12.4 .) at lib/Module/Build.pm line 13. BEGIN failed--compilation aborted at lib/Module/Build.pm line 13. Compilation failed in require at Build line 42. BEGIN failed--compilation aborted at Build line 42. *** Error code 2 Stop in /usr1/ports/devel/p5-Module-Build. *** Error code 1 Stop in /usr1/ports/converters/p5-Encode-Detect. *** Error code 1 Stop in /usr1/ports/mail/p5-Mail-SpamAssassin. *** Error code 1 Stop in /usr1/ports/mail/p5-Mail-SpamAssassi Hello Tim, list, I have the same problem on one of my boxes. Cannot upgrade p5-Module-Build-0.3800 port because of this. Has anyone filed a PR against this problem? I was able to work around this by: 1) Uninstalling spamassassin and perl 5.12 2) Upgrading to perl 5.14 3) Running perl-after-upgrade 4) Reinstalling spamassassin I still cannot build remmina. There seems to be some hocus pocus having to do with missing dependent perl XML parser libs. Sigh. I can't wait until the planet either: a) Migrates 100% to python or b) Learns to do batteries included packaging like python. -- Tim Daneliuk tun...@tundraware.com ___ freebsd-questions@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-questions To unsubscribe, send any mail to freebsd-questions-unsubscr...@freebsd.org
Re: Perl Problem After Upgrade to 5.12.4
On Fri, 08 Jul 2011 08:12:16 -0500 Tim Daneliuk articulated: I was able to work around this by: 1) Uninstalling spamassassin and perl 5.12 2) Upgrading to perl 5.14 3) Running perl-after-upgrade 4) Reinstalling spamassassin That is not exactly the method prescribed in UPDATING: quote 20110517: AFFECTS: users of lang/perl* AUTHOR: s...@freebsd.org lang/perl5.14 is out. If you want to switch to it from, for example lang/perl5.12, that is: Portupgrade users: 0) Fix pkgdb.db (for safety): pkgdb -Ff 1) Reinstall new version of Perl (5.14): env DISABLE_CONFLICTS=1 portupgrade -o lang/perl5.14 -f perl-5.12.\* 2) Reinstall everything that depends on Perl: portupgrade -fr perl Portmaster users: portmaster -o lang/perl5.14 lang/perl5.12 Conservative: portmaster p5- Comprehensive (but perhaps overkill): portmaster -r perl- Note: If the perl- glob matches more than one port you will need to specify the name of the Perl directory in /var/db/pkg explicitly. /quote I used the portupgrade method without incident. From what I have been told, perl-after-upgrade != env DISABLE_CONFLICTS=1 portupgrade -o lang/perl5.14 -f perl-5.12.\* As always, YMMV! -- Jerry ✌ jerry+f...@seibercom.net Disclaimer: off-list followups get on-list replies or ignored. Do not CC this poster. Please do not ignore the Reply-To header. http://www.catb.org/~esr/faqs/smart-questions.html ___ freebsd-questions@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-questions To unsubscribe, send any mail to freebsd-questions-unsubscr...@freebsd.org
Re: Perl Problem After Upgrade to 5.12.4
On 7/8/2011 8:39 AM, Jerry said this: On Fri, 08 Jul 2011 08:12:16 -0500 Tim Daneliuk articulated: I was able to work around this by: 1) Uninstalling spamassassin and perl 5.12 2) Upgrading to perl 5.14 3) Running perl-after-upgrade 4) Reinstalling spamassassin That is not exactly the method prescribed in UPDATING: You're right, of course - I ordinarily do this when I upgrade perl ... somehow it slipped my tiny and aging mind. Thanks for the reminder :) quote 20110517: AFFECTS: users of lang/perl* AUTHOR: s...@freebsd.org lang/perl5.14 is out. If you want to switch to it from, for example lang/perl5.12, that is: Portupgrade users: 0) Fix pkgdb.db (for safety): pkgdb -Ff 1) Reinstall new version of Perl (5.14): env DISABLE_CONFLICTS=1 portupgrade -o lang/perl5.14 -f perl-5.12.\* 2) Reinstall everything that depends on Perl: portupgrade -fr perl Portmaster users: portmaster -o lang/perl5.14 lang/perl5.12 Conservative: portmaster p5- Comprehensive (but perhaps overkill): portmaster -r perl- Note: If the perl- glob matches more than one port you will need to specify the name of the Perl directory in /var/db/pkg explicitly. /quote I used the portupgrade method without incident. From what I have been told, perl-after-upgrade != env DISABLE_CONFLICTS=1 portupgrade -o lang/perl5.14 -f perl-5.12.\* As always, YMMV! -- Tim Daneliuk tun...@tundraware.com ___ freebsd-questions@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-questions To unsubscribe, send any mail to freebsd-questions-unsubscr...@freebsd.org
Re: Perl Problem After Upgrade to 5.12.4
God love is hard to find. You got lucky freebsd-questions! 2011/07/06 10:01:21 -0500 Tim Daneliuk tun...@tundraware.com = To FreeBSD Mailing List : TD === p5-Module-Build-0.3800_1 depends on package: p5-Parse-CPAN-Meta=1.44.01 - found TD ! Parse::CPAN::Meta (1.40) is installed, but we need version = 1.4401 if you use to updatedb(8) try to search for dupes: locate Parse/CPAN/Meta.pm If there is no dupes, look at the $VERSION inside that module 73! Peter pgp: A0E26627 (4A42 6841 2871 5EA7 52AB 12F8 0CE1 4AAC A0E2 6627) -- http://vereshagin.org ___ freebsd-questions@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-questions To unsubscribe, send any mail to freebsd-questions-unsubscr...@freebsd.org
Re: perl-threaded
On Mon, May 23, 2011 at 05:50:39PM -0400, Alejandro Imass wrote: Not necessarily, many cpan modules are either thread unaware/innocuous or thread safe, though there are exceptions. I have re-compiled Perl with threads with pre-installed libraries and never had a problem. You will surely know which things fail when they blow-up or leak you to death, when you use threading of course. Especially long-running software like mod_perl. But for that, you always have maxrequestsperchild ;-) Now that I mention it, mod_perl would probably need rebuilding IMHO just to be on the safe side, wherever _that_ is with threads ;-) Joking aside, I have scaled tremendously with apache mod_perl + mod_worker a rare but exquisite high-scale Web software recipe. Hi Alejandro - I did encounter a few issues, rebuilt them all and it's good. Thanks for your reply. jamie ___ freebsd-questions@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-questions To unsubscribe, send any mail to freebsd-questions-unsubscr...@freebsd.org
Re: perl-threaded
Not necessarily, many cpan modules are either thread unaware/innocuous or thread safe, though there are exceptions. I have re-compiled Perl with threads with pre-installed libraries and never had a problem. You will surely know which things fail when they blow-up or leak you to death, when you use threading of course. Especially long-running software like mod_perl. But for that, you always have maxrequestsperchild ;-) Now that I mention it, mod_perl would probably need rebuilding IMHO just to be on the safe side, wherever _that_ is with threads ;-) Joking aside, I have scaled tremendously with apache mod_perl + mod_worker a rare but exquisite high-scale Web software recipe. Best -- Alejandro Imass On Mon, May 23, 2011 at 4:20 PM, Jamie Paul Griffin grif...@gnix.co.uk wrote: I have rebuilt my perl5.14 with threading support. do I need to rebuild my perl-linked ports again now i've made this change? jamie ___ freebsd-questions@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-questions To unsubscribe, send any mail to freebsd-questions-unsubscr...@freebsd.org ___ freebsd-questions@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-questions To unsubscribe, send any mail to freebsd-questions-unsubscr...@freebsd.org
Re: perl - update
On Wed, 2 Feb 2011 07:03:32 -0600 ajtiM lum...@gmail.com wrote: Hi! My system: FreeBSD 8.1 I like to update perl to higher version and I don't want to screw up... I red /usr/ports/UPDATING: perl-after-upgrade script supplied with lang/perl5.12 If I update to perl 5.12.3 is it enough that I run above script, please? In /etc/make.conf I have: # added by use.perl 2010-11-05 17:40:46 PERL_VERSION=5.8.9 I have above from version 8.0. Do I need to change version from 5.8.9 to 5.12 or to 5.12.3? In UPDATING it also says: If you want to switch to lang/perl5.12 from lang/perl5.{8,10} please follow instructions in the entry 20100715 in this file. Note that 5.8.9 is built out of a different port to 5.12.3 ___ freebsd-questions@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-questions To unsubscribe, send any mail to freebsd-questions-unsubscr...@freebsd.org
Re: perl - update
On Wednesday February 2 2011 07:20:43 RW wrote: On Wed, 2 Feb 2011 07:03:32 -0600 ajtiM lum...@gmail.com wrote: Hi! My system: FreeBSD 8.1 I like to update perl to higher version and I don't want to screw up... I red /usr/ports/UPDATING: perl-after-upgrade script supplied with lang/perl5.12 If I update to perl 5.12.3 is it enough that I run above script, please? In /etc/make.conf I have: # added by use.perl 2010-11-05 17:40:46 PERL_VERSION=5.8.9 I have above from version 8.0. Do I need to change version from 5.8.9 to 5.12 or to 5.12.3? In UPDATING it also says: If you want to switch to lang/perl5.12 from lang/perl5.{8,10} please follow instructions in the entry 20100715 in this file. Note that 5.8.9 is built out of a different port to 5.12.3 Thank you very much. But I like to know if I need to change entry in make.conf: # added by use.perl 2010-11-05 17:40:46 PERL_VERSION=5.8.9 to PERL_VERSION=5.12.3 or just delete those line. Thanks in advance. Mitja http://jpgmag.com/people/lumiwa ___ freebsd-questions@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-questions To unsubscribe, send any mail to freebsd-questions-unsubscr...@freebsd.org
Re: perl - update
On Wed, 2 Feb 2011 07:47:02 -0600 ajtiM lum...@gmail.com wrote: Thank you very much. But I like to know if I need to change entry in make.conf: # added by use.perl 2010-11-05 17:40:46 PERL_VERSION=5.8.9 to PERL_VERSION=5.12.3 or just delete those line. You don't need to do anything, it'll be updated by installing the new version of perl. ___ freebsd-questions@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-questions To unsubscribe, send any mail to freebsd-questions-unsubscr...@freebsd.org
Re: Perl Dumping Core
On Wed, 16 Jun 2010 15:18:19 +0100, Matthew Seaman m.sea...@infracaninophile.co.uk wrote: On 16/06/2010 15:11:15, Tim Daneliuk wrote: I am running 8.1-PRERELEASE and seeing a half dozen of these a day: (perl5.10.1), uid 0: exited on signal 11 Anyone have theories on this? You have a perl process or processes owned by root that are dying due to segmentation violations. I've seen perl core dumps a few times too. They seem to be triggered by Gnome bug-buddy, but I haven't had much time to investigate why/when they are triggered. A typical Perl traceback here looks like this: : (gdb) bt : #0 0x28334d77 in kill () at kill.S:3 : #1 0x28239017 in _raise (sig=6) at /usr/src/lib/libthr/thread/thr_sig.c:185 : #2 0x2833386a in abort () at /usr/src/lib/libc/stdlib/abort.c:65 : #3 0x282b7113 in arena_dalloc_bin (arena=0x8049c60, chunk=0x2880, ptr=0x28900e60, mapelm=0x28800c14) at /usr/src/lib/libc/stdlib/malloc.c:2570 : #4 0x282b8bfa in idalloc (ptr=0x28900e60) at /usr/src/lib/libc/stdlib/malloc.c:4302 : #5 0x282b9b7a in free (ptr=0x28900e60) at /usr/src/lib/libc/stdlib/malloc.c:6132 : #6 0x2832e53b in __clean_env (freeVars=true) at /usr/src/lib/libc/stdlib/getenv.c:236 : #7 0x282631d0 in ?? () from /lib/libc.so.7 : #8 0x28347000 in ?? () from /lib/libc.so.7 : #9 0x2807b738 in ?? () from /libexec/ld-elf.so.1 : #10 0x7fbfece8 in ?? () : #11 0x283385bc in _fini () from /lib/libc.so.7 : #12 0x28092300 in ?? () : #13 0x2807b738 in ?? () from /libexec/ld-elf.so.1 : #14 0x7fbfece8 in ?? () : #15 0x2804ee95 in objlist_call_fini (list=0x28089190, force=40 '(', lockstate=0x132e46b) at /usr/src/libexec/rtld-elf/rtld.c:1640 : Previous frame inner to this frame (corrupt stack?) : (gdb) This isn't very helpful for *all* Perl core dumps, but it may lead someone towards obtaining a better traceback... pgpOMXkQ6Ur2c.pgp Description: PGP signature
Re: Perl Dumping Core
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 On 16/06/2010 15:11:15, Tim Daneliuk wrote: I am running 8.1-PRERELEASE and seeing a half dozen of these a day: (perl5.10.1), uid 0: exited on signal 11 Anyone have theories on this? You have a perl process or processes owned by root that are dying due to segmentation violations. Unfortunately, we don't do omniscience[*] or clairvoyance or anything like that, so unless you give us some useful information to work with, that's literally all we can tell you. Start by inspecting the output of ps(1) to find likely looking perl processes. If you've actually got perl.core files you may be able to investigate with a debugger and work out what is producing them, but I wouldn't hold out too much hope of that. Cheers, Matthew [*] well, only occasionally. - -- Dr Matthew J Seaman MA, D.Phil. 7 Priory Courtyard Flat 3 PGP: http://www.infracaninophile.co.uk/pgpkey Ramsgate JID: matt...@infracaninophile.co.uk Kent, CT11 9PW -BEGIN PGP SIGNATURE- Version: GnuPG/MacGPG2 v2.0.14 (Darwin) Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/ iEYEARECAAYFAkwY3SsACgkQ8Mjk52CukIzh+gCdHneBlv1k8N786nVsLlFc7jU4 W8IAn2iOOZZvr0GHvj/Iclp2qolaKnvj =AL0s -END PGP SIGNATURE- ___ freebsd-questions@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-questions To unsubscribe, send any mail to freebsd-questions-unsubscr...@freebsd.org
Re: Perl Dumping Core
On 6/16/2010 9:18 AM, Matthew Seaman wrote: On 16/06/2010 15:11:15, Tim Daneliuk wrote: I am running 8.1-PRERELEASE and seeing a half dozen of these a day: (perl5.10.1), uid 0: exited on signal 11 Anyone have theories on this? You have a perl process or processes owned by root that are dying due to segmentation violations. Unfortunately, we don't do omniscience[*] or clairvoyance or anything like that, so unless you give us some useful information to work with, that's literally all we can tell you. 'Sorry, I wasn't more specific :) And I DO expect you do be omniscient BTW, after all, my users/clients expect ME to be ... Start by inspecting the output of ps(1) to find likely looking perl processes. If you've actually got perl.core files you may be able to investigate with a debugger and work out what is producing them, but I wouldn't hold out too much hope of that. Cheers, Matthew [*] well, only occasionally. It seems that the long running perl processes are there in support of Mailman. I know it periodically restarts itself but I don't know how gracefully it shuts down the perl processess ... ___ freebsd-questions@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-questions To unsubscribe, send any mail to freebsd-questions-unsubscr...@freebsd.org
Re: Perl Dumping Core
On Wed, Jun 16, 2010 at 4:11 PM, Tim Daneliuk tun...@tundraware.com wrote: I am running 8.1-PRERELEASE and seeing a half dozen of these a day: (perl5.10.1), uid 0: exited on signal 11 Anyone have theories on this? If perl doesn't always crash, but only when running certain programs, it may be that a perl module is the culprit. Try to locate that module by examining the program that causes the crash, and recompile the module (likely a broken lib or dependency). -cpghost. -- Cordula's Web. http://www.cordula.ws/ ___ freebsd-questions@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-questions To unsubscribe, send any mail to freebsd-questions-unsubscr...@freebsd.org
Re: perl links
On Sat, 10 Apr 2010 07:14:48 +0800, Aiza wrote: A When installing perl i see 2 links between /usr/local/bin and /usr/bin. A Is this still required or is it something left over from when perl was A part of the base system? A A symlinking /usr/local/bin/perl5.8.9 and /usr/bin/perl A symlinking /usr/local/bin/perl5.8.9 and /usr/bin/perl5 most perl scripts begins with #!/usr/bin/perl this is common convention (also outside *BSD world) -- WBR, Anton Yuzhaninov ___ freebsd-questions@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-questions To unsubscribe, send any mail to freebsd-questions-unsubscr...@freebsd.org
Re: perl links
Anton == Anton Yuzhaninov cit...@citrin.ru writes: Anton most perl scripts begins with Anton #!/usr/bin/perl Anton this is common convention (also outside *BSD world) In fact, it's the recommendation from the original Camel book in 1990 (which I wrote, but the kids forget that :) that no matter where you install Perl, you always link/symlink /usr/bin/perl so that scripts can safely use shebang. -- Randal L. Schwartz - Stonehenge Consulting Services, Inc. - +1 503 777 0095 mer...@stonehenge.com URL:http://www.stonehenge.com/merlyn/ Smalltalk/Perl/Unix consulting, Technical writing, Comedy, etc. etc. See http://methodsandmessages.vox.com/ for Smalltalk and Seaside discussion ___ freebsd-questions@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-questions To unsubscribe, send any mail to freebsd-questions-unsubscr...@freebsd.org
Re: perl links
in message 86zl1btumw@red.stonehenge.com, wrote Randal L. Schwartz thusly... Anton == Anton Yuzhaninov cit...@citrin.ru writes: Anton most perl scripts begins with Anton #!/usr/bin/perl Anton this is common convention (also outside *BSD world) In fact, it's the recommendation from the original Camel book in 1990 (which I wrote, but the kids forget that :) that no matter where you install Perl, you always link/symlink /usr/bin/perl so that scripts can safely use shebang. So, you are the guilty one. By that logic, every software should assume some location, so that people can have fun with link farm maintainance. - parv -- ___ freebsd-questions@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-questions To unsubscribe, send any mail to freebsd-questions-unsubscr...@freebsd.org
Re: perl links
parv == parv p...@pair.com writes: parv So, you are the guilty one. By that logic, every software should parv assume some location, so that people can have fun with link farm parv maintainance. Keep in mind, the scene has changed in 20 years. :) -- Randal L. Schwartz - Stonehenge Consulting Services, Inc. - +1 503 777 0095 mer...@stonehenge.com URL:http://www.stonehenge.com/merlyn/ Smalltalk/Perl/Unix consulting, Technical writing, Comedy, etc. etc. See http://methodsandmessages.vox.com/ for Smalltalk and Seaside discussion ___ freebsd-questions@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-questions To unsubscribe, send any mail to freebsd-questions-unsubscr...@freebsd.org
Re: perl links
On Sat 10 Apr 2010 at 09:26:33 PDT Randal L. Schwartz wrote: parv == parv p...@pair.com writes: parv So, you are the guilty one. By that logic, every software should parv assume some location, so that people can have fun with link farm parv maintainance. Keep in mind, the scene has changed in 20 years. :) Has your advice on this point also changed? ___ freebsd-questions@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-questions To unsubscribe, send any mail to freebsd-questions-unsubscr...@freebsd.org
Re: perl qstn...
Alejandro == Alejandro Imass a...@p2ee.org writes: Alejandro did you mean unless? ;-) Did you read this: Augh. I hit send just as I realized that's backwards. Need more caffiene. Swap the true and false blocks there. :) -- Randal L. Schwartz - Stonehenge Consulting Services, Inc. - +1 503 777 0095 mer...@stonehenge.com URL:http://www.stonehenge.com/merlyn/ Smalltalk/Perl/Unix consulting, Technical writing, Comedy, etc. etc. See http://methodsandmessages.vox.com/ for Smalltalk and Seaside discussion ___ freebsd-questions@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-questions To unsubscribe, send any mail to freebsd-questions-unsubscr...@freebsd.org
Re: perl qstn...
On Fri, Apr 9, 2010 at 5:56 AM, Randal L. Schwartz mer...@stonehenge.com wrote: Alejandro == Alejandro Imass a...@p2ee.org writes: Alejandro did you mean unless? ;-) Did you read this: Augh. I hit send just as I realized that's backwards. Need more caffiene. Swap the true and false blocks there. :) Yeah, but _after_ I had pressed send . That sparked the comment that unless was a bad idea in C and then all helll broke loose lol -- Randal L. Schwartz - Stonehenge Consulting Services, Inc. - +1 503 777 0095 mer...@stonehenge.com URL:http://www.stonehenge.com/merlyn/ Smalltalk/Perl/Unix consulting, Technical writing, Comedy, etc. etc. See http://methodsandmessages.vox.com/ for Smalltalk and Seaside discussion ___ freebsd-questions@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-questions To unsubscribe, send any mail to freebsd-questions-unsubscr...@freebsd.org
Re: perl links
On Apr 9, 2010, at 4:14 PM, Aiza wrote: When installing perl i see 2 links between /usr/local/bin and /usr/bin. Is this still required or is it something left over from when perl was part of the base system? symlinking /usr/local/bin/perl5.8.9 and /usr/bin/perl symlinking /usr/local/bin/perl5.8.9 and /usr/bin/perl5 This is to compensate for Perl scripts which assume they know where the path to the interpreter is, rather than using env Regards, -- -Chuck ___ freebsd-questions@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-questions To unsubscribe, send any mail to freebsd-questions-unsubscr...@freebsd.org
Re: perl links
On Sat, Apr 10, 2010 at 07:14:48AM +0800, Aiza wrote: When installing perl i see 2 links between /usr/local/bin and /usr/bin. Is this still required or is it something left over from when perl was part of the base system? symlinking /usr/local/bin/perl5.8.9 and /usr/bin/perl symlinking /usr/local/bin/perl5.8.9 and /usr/bin/perl5 It is still required (at least the first one.) It is there to be compatible with a very large number of existing Perl scripts which assume that the Perl interpreter can be found as /usr/bin/perl This has nothing do to with when Perl was part of the base system - it is a Perl convention which was established before FreeBSD (or Linux for that matter) even existed. -- Insert your favourite quote here. Erik Trulsson ertr1...@student.uu.se ___ freebsd-questions@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-questions To unsubscribe, send any mail to freebsd-questions-unsubscr...@freebsd.org
Re: perl qstn...
On Wed, 7 Apr 2010 19:15:05 -0600 Chad Perrin per...@apotheon.com wrote: On Wed, Apr 07, 2010 at 01:09:54PM +0100, RW wrote: On Tue, 6 Apr 2010 21:07:17 -0600 Chad Perrin per...@apotheon.com wrote: On Tue, Apr 06, 2010 at 01:20:49PM +0100, RW wrote: On Mon, 5 Apr 2010 19:55:44 -0600 Chad Perrin per...@apotheon.com wrote: On Mon, Apr 05, 2010 at 05:36:32PM +0100, RW wrote: There are more things in heav'n and earth, Horatio, than are dreamt of by designers of eagerly evaluated prefix notation languages. And most of them are obscure for good reasons. Just because a a syntax fits into a classification scheme doesn't make it a good idea. Shall we trade more trite sniping, or would you like to say something more substantive? You started it. 1. No, I used a misquote to lead into a lengthy explanation. You started with a patronising misquote implying ignorance of wider context. I'm not, I'm expressing an opinion that this is not a feature worth copying. Judging by your further disputations with Mr. Schwartz, I don't think I believe you. I can live with that. If I don't think it worth copying, I'm not going to like it in perl. That's not the same as telling you what you should and shouldn't do. I don't use perl or python all that much, and I wasn't aware of quite how religious an issue this is. I thought I was commenting on a perl feature, but it appears to have been interpreted as an attack on your faith. Frankly, if everybody just stuck to a purely natural order of decision approach to imperative language design, we would never even have developed structured programming. I have no idea what you trying to say here. I presume it must be some kind of straw man argument. It's not a straw man argument. Your presumption is wrong. Then your comment is simply noise. Most structured languages get by without the feature I'm referring to, and I've made it clear I'm not talking about ordering in any other context. ___ freebsd-questions@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-questions To unsubscribe, send any mail to freebsd-questions-unsubscr...@freebsd.org
Re: perl qstn...
On Tue, 6 Apr 2010 21:07:17 -0600 Chad Perrin per...@apotheon.com wrote: On Tue, Apr 06, 2010 at 01:20:49PM +0100, RW wrote: On Mon, 5 Apr 2010 19:55:44 -0600 Chad Perrin per...@apotheon.com wrote: On Mon, Apr 05, 2010 at 05:36:32PM +0100, RW wrote: There are more things in heav'n and earth, Horatio, than are dreamt of by designers of eagerly evaluated prefix notation languages. And most of them are obscure for good reasons. Just because a a syntax fits into a classification scheme doesn't make it a good idea. Shall we trade more trite sniping, or would you like to say something more substantive? You started it. Natural languages are mostly driven by spoken usage, in which people firm-up half-formed ideas as they speak - this is not a good model for programming languages. If you are hacking out a quick and dirty script it may be convenient to type the decision after the action, but it don't I think it promotes good quality software. This sounds exactly like the complaints Pythonistas use to explain why they have a deep hatred of Perl. If that's how you feel, I'd prefer you stop trying to tell me how Perl should work, and just use something else. I'm not, I'm expressing an opinion that this is not a feature worth copying. Imperative languages have a natural order of decision followed by action, and code is most easily readable if the syntax doesn't try to subvert that. . . . except when the natural order of decision varies significantly, such as when comparing functions with operators. It gets even more confusing when both functions and operators are actually methods in object oriented languages with an imperative design, because suddenly the difference between a function and an operator becomes purely arbitrary. There's nothing about arbitrariness that suggests a natural order. Expression are different. When you are trying to understand thousands of lines of code, the order of execution within an expression is fine detail, but the flow of execution is something that needs to be taken-in easily. It's kind of odd you rail against natural language then talk about I'm not railing again natural languages, I just don't think they have much relevance. imperative languages having a natural order -- which is, presumably, based on the expectations of people who have been conditioned to think that way by their use of natural language. No, it's conditioned by causality, and other mainstream programming languages. People juggle a lot of languages, being different for the sake of it isn't very helpful. Frankly, if everybody just stuck to a purely natural order of decision approach to imperative language design, we would never even have developed structured programming. I have no idea what you trying to say here. I presume it must be some kind of straw man argument. ___ freebsd-questions@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-questions To unsubscribe, send any mail to freebsd-questions-unsubscr...@freebsd.org
Re: perl qstn...
On Tue, Apr 06, 2010 at 09:01:10PM -0600, Chad Perrin wrote: On Tue, Apr 06, 2010 at 06:17:41PM -0400, Steve Bertrand wrote: On 2010.04.06 17:10, Randal L. Schwartz wrote: Now, on the other hand, emacs rules, vi sucks. :-) :-) ok, ok. I was on the side of Perl, and was content following this thread, but now I don't like you anymore :P heh ;) Steve I'm willing to let the emacs users have their emacs, and to enjoy my vi. I guess the longer name (emacs) suits people who like pressing more buttons to accomplish the same amount of work anyway. besides all this, someone can use vi easily with only one hand---or just a few fingers for those of us who still hunt-and-peck. with emacs, gotta have at least 17 hands. -- Chad Perrin [ original content licensed OWL: http://owl.apotheon.org ] -- Gary Kline kl...@thought.org http://www.thought.org Public Service Unix http://jottings.thought.org http://transfinite.thought.org The 7.79a release of Jottings: http://jottings.thought.org/index.php ___ freebsd-questions@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-questions To unsubscribe, send any mail to freebsd-questions-unsubscr...@freebsd.org
Re: perl qstn...
On Tue, Apr 6, 2010 at 5:10 PM, Randal L. Schwartz mer...@stonehenge.com wrote: Chuck == Chuck Swiger cswi...@mac.com writes: [...] Now, on the other hand, emacs rules, vi sucks. :-) :-) you got that right bud! oh, and the Perl stuff too ;-) -- Randal L. Schwartz - Stonehenge Consulting Services, Inc. - +1 503 777 0095 mer...@stonehenge.com URL:http://www.stonehenge.com/merlyn/ Smalltalk/Perl/Unix consulting, Technical writing, Comedy, etc. etc. See http://methodsandmessages.vox.com/ for Smalltalk and Seaside discussion ___ freebsd-questions@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-questions To unsubscribe, send any mail to freebsd-questions-unsubscr...@freebsd.org ___ freebsd-questions@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-questions To unsubscribe, send any mail to freebsd-questions-unsubscr...@freebsd.org
Re: perl qstn...
On Wed, Apr 07, 2010 at 01:09:54PM +0100, RW wrote: On Tue, 6 Apr 2010 21:07:17 -0600 Chad Perrin per...@apotheon.com wrote: On Tue, Apr 06, 2010 at 01:20:49PM +0100, RW wrote: On Mon, 5 Apr 2010 19:55:44 -0600 Chad Perrin per...@apotheon.com wrote: On Mon, Apr 05, 2010 at 05:36:32PM +0100, RW wrote: There are more things in heav'n and earth, Horatio, than are dreamt of by designers of eagerly evaluated prefix notation languages. And most of them are obscure for good reasons. Just because a a syntax fits into a classification scheme doesn't make it a good idea. Shall we trade more trite sniping, or would you like to say something more substantive? You started it. 1. No, I used a misquote to lead into a lengthy explanation. 2. Seriously? Are you not aware of how juvenile that sounds? Natural languages are mostly driven by spoken usage, in which people firm-up half-formed ideas as they speak - this is not a good model for programming languages. If you are hacking out a quick and dirty script it may be convenient to type the decision after the action, but it don't I think it promotes good quality software. This sounds exactly like the complaints Pythonistas use to explain why they have a deep hatred of Perl. If that's how you feel, I'd prefer you stop trying to tell me how Perl should work, and just use something else. I'm not, I'm expressing an opinion that this is not a feature worth copying. Judging by your further disputations with Mr. Schwartz, I don't think I believe you. Imperative languages have a natural order of decision followed by action, and code is most easily readable if the syntax doesn't try to subvert that. . . . except when the natural order of decision varies significantly, such as when comparing functions with operators. It gets even more confusing when both functions and operators are actually methods in object oriented languages with an imperative design, because suddenly the difference between a function and an operator becomes purely arbitrary. There's nothing about arbitrariness that suggests a natural order. Expression are different. When you are trying to understand thousands of lines of code, the order of execution within an expression is fine detail, but the flow of execution is something that needs to be taken-in easily. This doesn't change anything I said. It's kind of odd you rail against natural language then talk about I'm not railing again natural languages, I just don't think they have much relevance. It's kind of odd you rail against natural language *in this context*. I thought in this context was obvious. imperative languages having a natural order -- which is, presumably, based on the expectations of people who have been conditioned to think that way by their use of natural language. No, it's conditioned by causality, and other mainstream programming languages. People juggle a lot of languages, being different for the sake of it isn't very helpful. Who said anything about being different for the sake of being different? If you find it too difficult to actually respond to what I said, please refrain from responding. Frankly, if everybody just stuck to a purely natural order of decision approach to imperative language design, we would never even have developed structured programming. I have no idea what you trying to say here. I presume it must be some kind of straw man argument. It's not a straw man argument. Your presumption is wrong. I have no idea how what I said could not be perfectly obvious. It's pretty clear. -- Chad Perrin [ original content licensed OWL: http://owl.apotheon.org ] pgpv6MIox8pkk.pgp Description: PGP signature
Re: perl qstn...
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 On 06/04/2010 02:55:44, Chad Perrin wrote: 3. lazy evaluation, where the (result) is not evaluated until it is needed, which gives the interpreter plenty of time to notice there's an unless immediately following it Obviously, the real answer in the case of Ruby and Perl falls somewhere around 1.5, but 3 is still a believable-sounding excuse, and perfectly acceptable to me. perl (and ruby) are byte-compiled languages, not interpreted languages (like sh). All ordering variations on if and unless statements should end up using pretty much the same sequence of opcodes once parsed and compiled. Cheers, Matthew - -- Dr Matthew J Seaman MA, D.Phil. 7 Priory Courtyard Flat 3 PGP: http://www.infracaninophile.co.uk/pgpkey Ramsgate Kent, CT11 9PW -BEGIN PGP SIGNATURE- Version: GnuPG/MacGPG2 v2.0.14 (Darwin) Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/ iEYEARECAAYFAku61VIACgkQ8Mjk52CukIwLPQCfXW15dHTRMRfIENyT//OrzzAz qYAAnjYjiRsS2jq9XaJ2xN15sM1BDc6K =3PnR -END PGP SIGNATURE- ___ freebsd-questions@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-questions To unsubscribe, send any mail to freebsd-questions-unsubscr...@freebsd.org
Re: perl qstn...
On Mon, 5 Apr 2010 19:55:44 -0600 Chad Perrin per...@apotheon.com wrote: On Mon, Apr 05, 2010 at 05:36:32PM +0100, RW wrote: IMO this is a bad mistake that other languages were quite right not to copy - a test shouldn't come after a block of code unless it's evaluated after the block (as in repeat...until) There are more things in heav'n and earth, Horatio, than are dreamt of by designers of eagerly evaluated prefix notation languages. And most of them are obscure for good reasons. Just because a a syntax fits into a classification scheme doesn't make it a good idea. Natural languages are mostly driven by spoken usage, in which people firm-up half-formed ideas as they speak - this is not a good model for programming languages. If you are hacking out a quick and dirty script it may be convenient to type the decision after the action, but it don't I think it promotes good quality software. Imperative languages have a natural order of decision followed by action, and code is most easily readable if the syntax doesn't try to subvert that. ___ freebsd-questions@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-questions To unsubscribe, send any mail to freebsd-questions-unsubscr...@freebsd.org
Re: perl qstn...
RW == RW rwmailli...@googlemail.com writes: RW Imperative languages have a natural order of decision followed by RW action, and code is most easily readable if the syntax doesn't try to RW subvert that. And yet, there's an equally valid argument that the most important thing should stand out the most. In that sense, in the Perl statement: warn x = $x, y = $y, z = $z\n if $debug; ... the most important part is that it's printing something to stderr, and what's being printed. It's only minor that it's only when debugging, and luckily Perl lets us relegate that to the tail end of the statement. Now, if you argue oh, the most important thing there is 'if debug', then fine, you'd write that as: if ($debug) { warn ... } And I'd be fine with that. But I tend to see that layout as a lot of noise just to add a minor conditional. Or you could speak Perl with a Shell accent, and say $debug and warn ...; Fine, that also works, and some part of your audience will hate you, and another part will be totally cool with it. But this *is* the reason There's More Than One Way To Do It in Perl. You can write Perl that most naturally expresses what you believe is important in the code. If you don't like all this freedom, there's always Python. :) -- Randal L. Schwartz - Stonehenge Consulting Services, Inc. - +1 503 777 0095 mer...@stonehenge.com URL:http://www.stonehenge.com/merlyn/ Smalltalk/Perl/Unix consulting, Technical writing, Comedy, etc. etc. See http://methodsandmessages.vox.com/ for Smalltalk and Seaside discussion ___ freebsd-questions@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-questions To unsubscribe, send any mail to freebsd-questions-unsubscr...@freebsd.org
Re: perl qstn...
On Sun, 04 Apr 2010 02:01:53 -0700, Gary Kline kl...@thought.org wrote: thanks for your url as well and the others to posted. but it seems like overkill since i dont need any explicit option or argument. i just need the script to tell me whether i have an arg or not. following is something i've kept in one of my junk drawers from when i was learning to write bourne sscripts. it uses the $[token] syntax that determines whether there are Any args on the cmdline. if not, the script prints a message and exits. #!/bin/sh if [ $# -eq 0 ] then echo No args; need filename. else echo $1 fi After a couple hours experimentation, the following does the same for my perl scripts: #!/usr/bin/perl $argc = @ARGV; if (! $argc ) { printf(No args; need filename.\n); } else { printf(%s\n, @ARGV); } Yes, that's very close to the sh(1) version. Perl's behavior in this case is described in the 'perlvar' manpage: @ARGV The array @ARGV contains the command-line arguments intended for the script. $#ARGV is generally the number of arguments minus one, because $ARGV[0] is the first argument, not the program's command name itself. See $0 for the command name. In other words, when @ARGV appears in scalar context it yields the 'size' of the @ARGV array, e.g.: % cat foo.pl printf(%d .. args = [%s]\n, int(@ARGV), join(', ', (@ARGV))); % perl foo.pl 0 .. args = [] % perl foo.pl 1 1 .. args = [1] % perl foo.pl 1 2 3 3 .. args = [1, 2, 3] So when int(@ARGV) is zero you know that there are no arguments at all. This means you can write your sh version like this in Perl: #!/usr/bin/perl if (int(@ARGV) == 0) { die No args; at least one filename expected; } printf(%s\n, join(' ', (@ARGV))); This is good enough as a command-line handling trick for really simple scripts, but you should probably have a look at the Getopt::Std and the Getopt::Long modules for longer scripts. Using them will make your option parsing code much cleaner and easier to change in the future. ___ freebsd-questions@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-questions To unsubscribe, send any mail to freebsd-questions-unsubscr...@freebsd.org
Re: perl qstn...
Giorgos == Giorgos Keramidas keram...@ceid.upatras.gr writes: Giorgos This means you can write your sh version like this in Perl: Giorgos #!/usr/bin/perl Giorgos if (int(@ARGV) == 0) { Giorgos die No args; at least one filename expected; Giorgos } Giorgos printf(%s\n, join(' ', (@ARGV))); Which, when you're not speaking Perl with a C accent, expressed more natively as: @ARGV or die No args: at least one filename expected; print @ARGV\n; -- Randal L. Schwartz - Stonehenge Consulting Services, Inc. - +1 503 777 0095 mer...@stonehenge.com URL:http://www.stonehenge.com/merlyn/ Smalltalk/Perl/Unix consulting, Technical writing, Comedy, etc. etc. See http://methodsandmessages.vox.com/ for Smalltalk and Seaside discussion ___ freebsd-questions@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-questions To unsubscribe, send any mail to freebsd-questions-unsubscr...@freebsd.org
Re: perl qstn...
Hi-- On Apr 6, 2010, at 6:21 AM, Randal L. Schwartz wrote: RW == RW rwmailli...@googlemail.com writes: RW Imperative languages have a natural order of decision followed by RW action, and code is most easily readable if the syntax doesn't try to RW subvert that. And yet, there's an equally valid argument that the most important thing should stand out the most. In that sense, in the Perl statement: warn x = $x, y = $y, z = $z\n if $debug; ... the most important part is that it's printing something to stderr, and what's being printed. It's only minor that it's only when debugging, and luckily Perl lets us relegate that to the tail end of the statement. Now, if you argue oh, the most important thing there is 'if debug', then fine, you'd write that as: if ($debug) { warn ... } And I'd be fine with that. Let's suppose you want to display one message if debugging is enabled, and a shorter message if it is not. Adding an else clause to an if statement is a natural change and the result remains highly readable. Can one even use this postfix test syntax with an else, or would you have to re-write the first version entirely? As far as I am concerned, the first version resembles exception handling, ie: try: something except Error1: handle error ...and should be reserved for situations where the statement is expected to run normally. If it is reasonable that the test might fail more often than in unusual circumstances, then I'd really prefer to put the test first. If you don't like all this freedom, there's always Python. :) Yes, Perl lets you innovate a remarkable number of ways of solving the same problem using syntax that varies from clean and maintainable to constructs which even the original author won't understand without effort a few months later. It seems to be uncommon for one to write unreadable Python code; I'm not sure additional freedom to write obfuscated code would be as beneficial as one may assume Regards, -- -Chuck ___ freebsd-questions@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-questions To unsubscribe, send any mail to freebsd-questions-unsubscr...@freebsd.org
Re: perl qstn...
Chuck == Chuck Swiger cswi...@mac.com writes: Chuck Let's suppose you want to display one message if debugging is Chuck enabled, and a shorter message if it is not. Then you wouldn't have used this construct. If you don't like all this freedom, there's always Python. :) Chuck Yes, Perl lets you innovate a remarkable number of ways of Chuck solving the same problem using syntax that varies from clean and Chuck maintainable to constructs which even the original author won't Chuck understand without effort a few months later. It seems to be Chuck uncommon for one to write unreadable Python code; I'm not sure Chuck additional freedom to write obfuscated code would be as Chuck beneficial as one may assume I call shenanigans: False dichotomy. Perl has *many* options that are all clear and readable, and some that aren't. Python has a *few* options that are all clear and readable, and some that aren't. You may not appreciate that freedom. Others do. With freedom comes responsibility. If that's not for you, Perl's not for you. -- Randal L. Schwartz - Stonehenge Consulting Services, Inc. - +1 503 777 0095 mer...@stonehenge.com URL:http://www.stonehenge.com/merlyn/ Smalltalk/Perl/Unix consulting, Technical writing, Comedy, etc. etc. See http://methodsandmessages.vox.com/ for Smalltalk and Seaside discussion ___ freebsd-questions@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-questions To unsubscribe, send any mail to freebsd-questions-unsubscr...@freebsd.org
Re: perl qstn...
On Apr 6, 2010, at 11:07 AM, Randal L. Schwartz wrote: Chuck == Chuck Swiger cswi...@mac.com writes: Chuck Let's suppose you want to display one message if debugging is Chuck enabled, and a shorter message if it is not. Then you wouldn't have used this construct. If the construct isn't a good idea considering the most obvious change one might make to the code, I would conclude that it's probably never going to be a good idea to use such a thing. Surely Perl source code shouldn't be considered as write-once, modify-never? If you don't like all this freedom, there's always Python. :) Chuck Yes, Perl lets you innovate a remarkable number of ways of Chuck solving the same problem using syntax that varies from clean and Chuck maintainable to constructs which even the original author won't Chuck understand without effort a few months later. It seems to be Chuck uncommon for one to write unreadable Python code; I'm not sure Chuck additional freedom to write obfuscated code would be as Chuck beneficial as one may assume I call shenanigans: False dichotomy. I agree: the assertion you've made that Python lacks freedom is a false dichotomy. As we all know, any language which is adequately expressive can be used to write arbitrary code; much less languages which permit callouts or extension mechanisms to invoke native C/assembler/etc code. If you really find an advantage in obfuscated syntax and regard it as representing more freedom, I won't argue that opinion with you directly, but instead ask that you demonstrate that this supposed freedom results in better code, ease of maintainability, etc: Perl has *many* options that are all clear and readable, and some that aren't. Python has a *few* options that are all clear and readable, and some that aren't. ...and an example or two would be? You may not appreciate that freedom. Others do. With freedom comes responsibility. If that's not for you, Perl's not for you. I would suggest that good software not only allows the user the full freedom to do anything which is possible, it should also avoid asking the user about choices which are impossible/invalid/wrong/etc. This can be input field validation, middleware logic, this can be determining the present state and greying out options which are not currently applicable, etc. Regards, -- -Chuck ___ freebsd-questions@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-questions To unsubscribe, send any mail to freebsd-questions-unsubscr...@freebsd.org
Re: perl qstn...
Chuck == Chuck Swiger cswi...@mac.com writes: Then you wouldn't have used this construct. Chuck If the construct isn't a good idea considering the most obvious Chuck change one might make to the code, Objection: presumes facts not in evidence, your honor. Seriously, I've written thousands of lines that look like: print . if $flag; over the years (decades), and only *once* or *twice* do I ever recall saying oh, I actually wanted a two-way switch, and had to rewrite it. So most obvious to you is clearly not what is actually most likely. This undermines the rest of your argument, but let's read on... Chuck Surely Perl source code shouldn't be considered as write-once, Chuck modify-never? Yes, and that's also presumes facts not in evidence. See above. Chuck I would suggest that good software not only allows the user the Chuck full freedom to do anything which is possible, it should also Chuck avoid asking the user about choices which are Chuck impossible/invalid/wrong/etc. This can be input field Chuck validation, middleware logic, this can be determining the present Chuck state and greying out options which are not currently applicable, Chuck etc. I agree. The difference with Perl is that there are often many equally good ways to choose. If that's too much repsonsibility for you, please don't use Perl. -- Randal L. Schwartz - Stonehenge Consulting Services, Inc. - +1 503 777 0095 mer...@stonehenge.com URL:http://www.stonehenge.com/merlyn/ Smalltalk/Perl/Unix consulting, Technical writing, Comedy, etc. etc. See http://methodsandmessages.vox.com/ for Smalltalk and Seaside discussion ___ freebsd-questions@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-questions To unsubscribe, send any mail to freebsd-questions-unsubscr...@freebsd.org
Re: perl qstn...
On Apr 6, 2010, at 11:43 AM, Randal L. Schwartz wrote: Chuck == Chuck Swiger cswi...@mac.com writes: Then you wouldn't have used this construct. Chuck If the construct isn't a good idea considering the most obvious Chuck change one might make to the code, Objection: presumes facts not in evidence, your honor. This isn't a court-room. I don't mind rhetorical flourishes, but if you are unwilling to consider how a statement might be changed over time as the circumstances require, even for the sake of discussion, well, in doing so you've chosen to not consider code maintainability. Seriously, I've written thousands of lines that look like: print . if $flag; over the years (decades), and only *once* or *twice* do I ever recall saying oh, I actually wanted a two-way switch, and had to rewrite it. So most obvious to you is clearly not what is actually most likely. Very well; I would like to hear you propose another type of change that might be made to this sort of postfix test syntax which you consider to be most likely. I find it remarkable, and nearly unbelievable, that one would only need to add an else clause to such a statement less often than 0.1% of the time. Frankly, I wouldn't mind taking a look through a few revisions of something you'd written (perhaps via CVSweb or similar) to see what kind of changes you do make to code over time. Chuck Surely Perl source code shouldn't be considered as write-once, Chuck modify-never? Yes, and that's also presumes facts not in evidence. See above. I'd be happy to take a look at your evidence. In fact, I'd already asked a similar question: Perl has *many* options that are all clear and readable, and some that aren't. Python has a *few* options that are all clear and readable, and some that aren't. ...and an example or two would be? ...and yet I do not see a response. Regards, -- -Chuck ___ freebsd-questions@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-questions To unsubscribe, send any mail to freebsd-questions-unsubscr...@freebsd.org
Re: perl qstn...
Chuck == Chuck Swiger cswi...@mac.com writes: Chuck Very well; I would like to hear you propose another type of Chuck change that might be made to this sort of postfix test syntax Chuck which you consider to be most likely. Maybe the content of the text message. I change that stuff all the time. Or maybe the exact nature of the condition. That also changes. Let me short cut the rest of the discussion, by summarizing: You and and I have different favorite languages However, our positions are different about the fact that we have different favorite languages. I'm perfectly willing to let you have Python, and work productively in it, while I'm happily being productive with Perl. I'm also perfectly willing to allow you imagine faults with Perl, even though after having used Perl productively for 20 years, those problems just don't arise in practice. You, on the other hand, seem to want to convince me that I couldn't have possibly been as productive in Perl as I have for the past 20 years, because of these alleged insurmountable problems. You seem to want to ensure that whatever my experience of Perl might be, that it is somehow wrong or tainted or misinformed. Hmm. Really? Really? Now, in the greater range of things, which position is more useful? Can we agree that we've gone *way beyond* the topic of freebsd-questions as well, and if anyone hasn't killfiled us already, they should have? :-) Now, on the other hand, emacs rules, vi sucks. :-) :-) -- Randal L. Schwartz - Stonehenge Consulting Services, Inc. - +1 503 777 0095 mer...@stonehenge.com URL:http://www.stonehenge.com/merlyn/ Smalltalk/Perl/Unix consulting, Technical writing, Comedy, etc. etc. See http://methodsandmessages.vox.com/ for Smalltalk and Seaside discussion ___ freebsd-questions@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-questions To unsubscribe, send any mail to freebsd-questions-unsubscr...@freebsd.org
Re: perl qstn...
On 2010.04.06 17:10, Randal L. Schwartz wrote: Now, on the other hand, emacs rules, vi sucks. :-) :-) ok, ok. I was on the side of Perl, and was content following this thread, but now I don't like you anymore :P heh ;) Steve ___ freebsd-questions@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-questions To unsubscribe, send any mail to freebsd-questions-unsubscr...@freebsd.org
Re: perl qstn...
On Tue, Apr 06, 2010 at 06:17:41PM -0400, Steve Bertrand wrote: On 2010.04.06 17:10, Randal L. Schwartz wrote: Now, on the other hand, emacs rules, vi sucks. :-) :-) ok, ok. I was on the side of Perl, and was content following this thread, but now I don't like you anymore :P heh ;) Steve I'm willing to let the emacs users have their emacs, and to enjoy my vi. I guess the longer name (emacs) suits people who like pressing more buttons to accomplish the same amount of work anyway. -- Chad Perrin [ original content licensed OWL: http://owl.apotheon.org ] pgpwq7ywxcB58.pgp Description: PGP signature
Re: perl qstn...
On Tue, Apr 06, 2010 at 01:20:49PM +0100, RW wrote: On Mon, 5 Apr 2010 19:55:44 -0600 Chad Perrin per...@apotheon.com wrote: On Mon, Apr 05, 2010 at 05:36:32PM +0100, RW wrote: IMO this is a bad mistake that other languages were quite right not to copy - a test shouldn't come after a block of code unless it's evaluated after the block (as in repeat...until) There are more things in heav'n and earth, Horatio, than are dreamt of by designers of eagerly evaluated prefix notation languages. And most of them are obscure for good reasons. Just because a a syntax fits into a classification scheme doesn't make it a good idea. The fact something is popular doesn't mean it's a good idea. Shall we trade more trite sniping, or would you like to say something more substantive? In no way, and at no time, did I imply that using unless like an infix operator is a good idea just because it fits with a given syntax classification. Natural languages are mostly driven by spoken usage, in which people firm-up half-formed ideas as they speak - this is not a good model for programming languages. If you are hacking out a quick and dirty script it may be convenient to type the decision after the action, but it don't I think it promotes good quality software. This sounds exactly like the complaints Pythonistas use to explain why they have a deep hatred of Perl. If that's how you feel, I'd prefer you stop trying to tell me how Perl should work, and just use something else. Imperative languages have a natural order of decision followed by action, and code is most easily readable if the syntax doesn't try to subvert that. . . . except when the natural order of decision varies significantly, such as when comparing functions with operators. It gets even more confusing when both functions and operators are actually methods in object oriented languages with an imperative design, because suddenly the difference between a function and an operator becomes purely arbitrary. There's nothing about arbitrariness that suggests a natural order. It's kind of odd you rail against natural language then talk about imperative languages having a natural order -- which is, presumably, based on the expectations of people who have been conditioned to think that way by their use of natural language. Frankly, if everybody just stuck to a purely natural order of decision approach to imperative language design, we would never even have developed structured programming. -- Chad Perrin [ original content licensed OWL: http://owl.apotheon.org ] pgpEUjI65NlvI.pgp Description: PGP signature
Re: perl qstn...
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 On 04/04/2010 19:48:14, Alejandro Imass wrote: But honestly pun aside unless(){} is far more readable than if(!){} and _especially_ if you are programming in an exception manner as you correctly point out. Every language should have an unless construct. I've always found that 'unless' makes a great deal of sense when used in the alternate syntax: do_foo() unless $condition ; As far as I know, perl and its descendant ruby are the only programming languages that let you put the condition test after the action, despite this being exceeding familiar in human languages. Cheers, Matthew - -- Dr Matthew J Seaman MA, D.Phil. 7 Priory Courtyard Flat 3 PGP: http://www.infracaninophile.co.uk/pgpkey Ramsgate Kent, CT11 9PW -BEGIN PGP SIGNATURE- Version: GnuPG/MacGPG2 v2.0.14 (Darwin) Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/ iEYEARECAAYFAku5pe0ACgkQ8Mjk52CukIxiwwCfVV5FD7gYil3eIG67Cgh14Hlt hnkAnRRggI9Eq13y9eWJYFNzSOMNX546 =5jSW -END PGP SIGNATURE- ___ freebsd-questions@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-questions To unsubscribe, send any mail to freebsd-questions-unsubscr...@freebsd.org
Re: perl qstn...
Matthew == Matthew Seaman m.sea...@infracaninophile.co.uk writes: Matthew As far as I know, perl and its descendant ruby are the only Matthew programming languages that let you put the condition test after Matthew the action, despite this being exceeding familiar in human Matthew languages. Except, we old-timers remember that Larry Wall directly lifted this from RSTS-E BASIC-PLUS, which he had used at Pacific University as a student. Having hacked BASIC-PLUS myself around the same time, I recognized it instantly. BASIC-PLUS went further though, allowing them to be nested. So you'd end up with monstrosities like: PRINT a IF a % 3 = 2 FOR a = b TO b+7 FOR b = 0 TO 90 STEP 10; Thankfully, Larry limited Perl's statement modifiers to precisely one level. :) Just another old geezer, -- Randal L. Schwartz - Stonehenge Consulting Services, Inc. - +1 503 777 0095 mer...@stonehenge.com URL:http://www.stonehenge.com/merlyn/ Smalltalk/Perl/Unix consulting, Technical writing, Comedy, etc. etc. See http://methodsandmessages.vox.com/ for Smalltalk and Seaside discussion ___ freebsd-questions@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-questions To unsubscribe, send any mail to freebsd-questions-unsubscr...@freebsd.org
Re: perl qstn...
in message 867homm1qf@red.stonehenge.com, wrote Randal L. Schwartz thusly... Matthew == Matthew Seaman m.sea...@infracaninophile.co.uk writes: Matthew As far as I know, perl and its descendant ruby are the Matthew only programming languages that let you put the Matthew condition test after the action, despite this being Matthew exceeding familiar in human languages. Except, we old-timers remember that Larry Wall directly lifted this from RSTS-E BASIC-PLUS, which he had used at Pacific University as a student. Having hacked BASIC-PLUS myself around the same time, I recognized it instantly. BASIC-PLUS went further though, allowing them to be nested. So you'd end up with monstrosities like: Beauty is in the eye ..., or, perhaos you would prefer Only a mother would PRINT a IF a % 3 = 2 FOR a = b TO b+7 FOR b = 0 TO 90 STEP 10; Oh Randal, don't tease me please about the lack of such loveliness in perl. - parv -- ___ freebsd-questions@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-questions To unsubscribe, send any mail to freebsd-questions-unsubscr...@freebsd.org
Re: perl qstn...
On Mon, 05 Apr 2010 09:57:17 +0100 Matthew Seaman m.sea...@infracaninophile.co.uk wrote: -BEGIN PGP SIGNED MESSAGE- Hash: SHA1 I've always found that 'unless' makes a great deal of sense when used in the alternate syntax: do_foo() unless $condition ; As far as I know, perl and its descendant ruby are the only programming languages that let you put the condition test after the action, IMO this is a bad mistake that other languages were quite right not to copy - a test shouldn't come after a block of code unless it's evaluated after the block (as in repeat...until) ___ freebsd-questions@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-questions To unsubscribe, send any mail to freebsd-questions-unsubscr...@freebsd.org
Re: perl qstn...
On Mon, Apr 05, 2010 at 05:36:32PM +0100, RW wrote: IMO this is a bad mistake that other languages were quite right not to copy - a test shouldn't come after a block of code unless it's evaluated after the block (as in repeat...until) There are more things in heav'n and earth, Horatio, than are dreamt of by designers of eagerly evaluated prefix notation languages. Actually, I'd think that using unless that way would be right up the alley of the users of most programming languages, since unless is here just being used the same way as an infix notation operator with very high precedence. If you want to get rigorous about it, I'd prefer this approach: unless (condition) (result) . . . where it uses strict prefix notation. I know that some people think postfix notation is the bee's knees because of implementation reasons, but frankly, implementation should be something we never have to see, in my opinion -- unless we're actually implementing it. Computers are for scut work; humans are for idea work. Failing strict prefix notation, I'm okay with the way Perl and Ruby use unless. This: (result) unless (condition) . . . could be explained away as fitting with any of: 1. conforming to natural language expectations, thus leaving implementation scut-work to the realm of the computer 2. infix notation with very high precedence for unless 3. lazy evaluation, where the (result) is not evaluated until it is needed, which gives the interpreter plenty of time to notice there's an unless immediately following it Obviously, the real answer in the case of Ruby and Perl falls somewhere around 1.5, but 3 is still a believable-sounding excuse, and perfectly acceptable to me. -- Chad Perrin [ original content licensed OWL: http://owl.apotheon.org ] pgpKFRwk4tO9r.pgp Description: PGP signature
Re: perl qstn...
On Sun, 2010-04-04 at 00:07 -0400, Greg Larkin wrote: -BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Gary Kline wrote: guys, i'm finally trying to get my private scripts and binaries in ~/bin in order. several of my perl scripts were meant to be throwaway ... but a few seem to be more useful and i would have to have informational or usage{} type messages. if a .pl script has to have at least one arg, is there an easy way to do that? can i have a perl fn called usage() that would be fed various strings? tia, gary Hi Gary, Check out this Perl module that builds on Getopt::Long, but also includes support for echoing usage messages for each option: http://search.cpan.org/~rjbs/Getopt-Long-Descriptive-0.085/lib/Getopt/Long/Descriptive.pm Hope that helps, Greg thanks for your url as well and the others to posted. but it seems like overkill since i dont need any explicit option or argument. i just need the script to tell me whether i have an arg or not. following is something i've kept in one of my junk drawers from when i was learning to write bourne sscripts. it uses the $[token] syntax that determines whether there are Any args on the cmdline. if not, the script prints a message and exits. #!/bin/sh if [ $# -eq 0 ] then echo No args; need filename. else echo $1 fi After a couple hours experimentation, the following does the same for my perl scripts: #!/usr/bin/perl $argc = @ARGV; if (! $argc ) { printf(No args; need filename.\n); } else { printf(%s\n, @ARGV); } gary ___ freebsd-questions@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-questions To unsubscribe, send any mail to freebsd-questions-unsubscr...@freebsd.org
Re: perl qstn...
Gary == Gary Kline kl...@thought.org writes: Gary #!/usr/bin/perl Gary $argc = @ARGV; Gary if (! $argc ) { Gary printf(No args; need filename.\n); Gary } Gary else { Gary printf(%s\n, @ARGV); Gary } Even simpler: if (@ARGV) { print No args\n; } else { print arg is $ARGV[0]\n; } If you're studying perl, you might want to join the very beginner-friendly mailing list, info at http://lists.perl.org/list/beginners.html, or start a conversation on perlmonks.org, also relatively beginner-friendly. And I'd recommend a couple of good books, but I might be seen as self-pimping. :) But if you look at http://learn.perl.org/ you'll see a number of other resources, including free tutorials online. print Just another Perl hacker,; # the original -- Randal L. Schwartz - Stonehenge Consulting Services, Inc. - +1 503 777 0095 mer...@stonehenge.com URL:http://www.stonehenge.com/merlyn/ Smalltalk/Perl/Unix consulting, Technical writing, Comedy, etc. etc. See http://methodsandmessages.vox.com/ for Smalltalk and Seaside discussion ___ freebsd-questions@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-questions To unsubscribe, send any mail to freebsd-questions-unsubscr...@freebsd.org
Re: perl qstn...
Randal == Randal L Schwartz mer...@stonehenge.com writes: Randal Even simpler: Randal if (@ARGV) { Randal print No args\n; Randal } else { Randal print arg is $ARGV[0]\n; Randal } Augh. I hit send just as I realized that's backwards. Need more caffiene. Swap the true and false blocks there. :) -- Randal L. Schwartz - Stonehenge Consulting Services, Inc. - +1 503 777 0095 mer...@stonehenge.com URL:http://www.stonehenge.com/merlyn/ Smalltalk/Perl/Unix consulting, Technical writing, Comedy, etc. etc. See http://methodsandmessages.vox.com/ for Smalltalk and Seaside discussion ___ freebsd-questions@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-questions To unsubscribe, send any mail to freebsd-questions-unsubscr...@freebsd.org
Re: perl qstn...
On Sun, Apr 04, 2010 at 08:25:03AM -0700, Randal L. Schwartz wrote: Even simpler: if (@ARGV) { print No args\n; } else { print arg is $ARGV[0]\n; } As Randal noted, he accidentally swapped the conditions here. Just for the sake of absolute clarity, I'll actually swap them: if (@ARGV) { print arg is $ARGV[0]\n; } else { print no args\n; } If you're studying perl, you might want to join the very beginner-friendly mailing list, info at http://lists.perl.org/list/beginners.html, or start a conversation on perlmonks.org, also relatively beginner-friendly. PerlMonks in particular is an excellent resource. I haven't been active there recently, but when I have been active there, I've always found it rewarding and educational. I can't recommend it enough. And I'd recommend a couple of good books, but I might be seen as self-pimping. :) That's okay. I'll pimp them for you. Learning Perl, also known as The Llama Book (because it has a llama on the cover), is one of the all-time best beginner's books for *any* language that I've ever encountered. I've gone through both the second and fourth editions, and both are excellent books. I prefer the organization of the second edition a bit, but the fourth is a trifle more up to date and does a much better job of covering Windows-related Perl development issues. If you're only worried about Unixy development and execution environments, my personal recommendation would be the second edition, though I suppose your mileage may vary. As a follow-up to the Llama, the Alpaca book (it has an alpaca on the cover, naturally) -- in its first edition known as Learning Perl Objects, References, and Modules (or Perl PORM, as I like to call it), and in later editions titled Intermediate Perl -- is also an excellent book. In addition to teaching more about Perl in particular, it also teaches some important general programming concepts from a Perl perspective, thus helping broaden your understanding of programming in general. The final member of the traditional camelid trilogy, and a great book to tack onto the list after the Alpaca, is the Camel Book, titled Programming Perl. It's sorta the definitive reference for Perl programmers, and covers a lot more of the language and its philosophy than the Llama and Alpaca, though in my opinion the Llama and Alpaca together provide a needed introduction that the Camel only skims past (out of necessity, really, since a hand-holding introduction isn't really the book's purpose). There's also Mastering Perl, which was written as a sequel to Intermediate Perl, and I'm sure it's an excellent book. I haven't read it, though, and know next to nothing about it, so I can't really recommend it. All four of the above are published by O'Reilly, and the three I've read at least are each the kind of book that has given O'Reilly its reputation as a purveyor of excellent technical books. Perl is blessed by an absurd number of excellent programming books by knowledgeable authors, and there are many more that are worth your time as well -- but in general the above are the canonical starting steps, with others following from there as you start figuring out what specific areas you want to give your focus next. Unfortunately, there are also a number of really crappy Perl books out there (many books that spell it PERL, in all-capital letters, are among the not-so-great books), and as such I figured I should be explicit in sharing my thoughts on the best books to get started in Perl. Now that I've gotten so far off-topic for this list, I'll return you to your regularly scheduled programming. But if you look at http://learn.perl.org/ you'll see a number of other resources, including free tutorials online. print Just another Perl hacker,; # the original -- Chad Perrin [ original content licensed OWL: http://owl.apotheon.org ] pgpTcet2ag6PP.pgp Description: PGP signature
Re: perl qstn...
On Sun, Apr 4, 2010 at 11:27 AM, Randal L. Schwartz mer...@stonehenge.com wrote: Randal == Randal L Schwartz mer...@stonehenge.com writes: Randal Even simpler: Randal if (@ARGV) { did you mean unless? ;-) Randal print No args\n; Randal } else { Randal print arg is $ARGV[0]\n; Randal } Augh. I hit send just as I realized that's backwards. Need more caffiene. Swap the true and false blocks there. :) -- Randal L. Schwartz - Stonehenge Consulting Services, Inc. - +1 503 777 0095 mer...@stonehenge.com URL:http://www.stonehenge.com/merlyn/ Smalltalk/Perl/Unix consulting, Technical writing, Comedy, etc. etc. See http://methodsandmessages.vox.com/ for Smalltalk and Seaside discussion ___ freebsd-questions@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-questions To unsubscribe, send any mail to freebsd-questions-unsubscr...@freebsd.org ___ freebsd-questions@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-questions To unsubscribe, send any mail to freebsd-questions-unsubscr...@freebsd.org
Re: perl qstn...
On Sun, Apr 04, 2010 at 12:45:30PM -0400, Alejandro Imass wrote: On Sun, Apr 4, 2010 at 11:27 AM, Randal L. Schwartz mer...@stonehenge.com wrote: Randal == Randal L Schwartz mer...@stonehenge.com writes: Randal Even simpler: Randal if (@ARGV) { did you mean unless? ;-) I find if to be clearer than unless when there's an else, so instead of making that if into an unless, I'd just swap the conditional actions. -- Chad Perrin [ original content licensed OWL: http://owl.apotheon.org ] pgpDO8HYcLtW7.pgp Description: PGP signature
Re: perl qstn...
On Sun, Apr 4, 2010 at 11:04 AM, Chad Perrin per...@apotheon.com wrote: On Sun, Apr 04, 2010 at 08:25:03AM -0700, Randal L. Schwartz wrote: [...] The final member of the traditional camelid trilogy, and a great book to Hmm, so there _are_ in fact several trilogies! g I would swap the Camel for the Black Leopard anyday. Not implying that the author is not a great writer, but the Camel book is mostly a printout of perldoc perl g sure hope Larry is not on this list lol tack onto the list after the Alpaca, is the Camel Book, titled Programming Perl. It's sorta the definitive reference for Perl programmers, and covers a lot more of the language and its philosophy than the Llama and Alpaca, though in my opinion the Llama and Alpaca together provide a needed introduction that the Camel only skims past (out of necessity, really, since a hand-holding introduction isn't really the book's purpose). There's also Mastering Perl, which was written as a sequel to Intermediate Perl, and I'm sure it's an excellent book. I haven't read it, though, and know next to nothing about it, so I can't really recommend it. Perhaps the Vicuña and kids is in fact the thrid member of the trilogy, but the Black Leopard is a must have to become a respected Perl hacker IMHO. Anyway, since this is all OT I started this thread in PM for your comments: http://www.perlmonks.org/?node_id=832725 Cheers, Alejandro Imass ___ freebsd-questions@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-questions To unsubscribe, send any mail to freebsd-questions-unsubscr...@freebsd.org
Re: perl qstn...
On Sun, 4 Apr 2010 10:33:53 -0600, Chad Perrin per...@apotheon.com wrote: On Sun, Apr 04, 2010 at 12:45:30PM -0400, Alejandro Imass wrote: did you mean unless? ;-) I find if to be clearer than unless when there's an else, so instead of making that if into an unless, I'd just swap the conditional actions. A quite language-independent technical sidenote :-) ... If your if() conditional is to test an exception, something that you usually DON'T want to happen - i. e. missing command line parameters - you can use the ! negation operator to indicate this in the if() argument. if(!...@argv) { print No args\n; exit; } In a short error message, you should indicate what you are expecting, e. g. with a synopsis or a simple example (no need for a 25 line help text here, e. g. print Input file name is missing.\n; print usage: blabla.pl filename\n; or print Use: blabla.pl inputfile\n; And you could even force perl to exit with an exit code != 0 to indicate that something happened (e. g. program wasn't run successfully). Now, as the don't want case has been considered, you can easily continue with your program, no need to put it into an else { } branch. PS. I'm not familiar with perl enough to be sure that the ! operator can be used at @ARGV to make sure it's 0, and how or if to use exit() to set the return code. I hardly can read perl at all, so the essence of my examples is of a rather generic nature. :-) -- Polytropon Magdeburg, Germany Happy FreeBSD user since 4.0 Andra moi ennepe, Mousa, ... ___ freebsd-questions@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-questions To unsubscribe, send any mail to freebsd-questions-unsubscr...@freebsd.org
Re: perl qstn...
On Sun, Apr 4, 2010 at 2:14 PM, Polytropon free...@edvax.de wrote: On Sun, 4 Apr 2010 10:33:53 -0600, Chad Perrin per...@apotheon.com wrote: On Sun, Apr 04, 2010 at 12:45:30PM -0400, Alejandro Imass wrote: did you mean unless? ;-) I find if to be clearer than unless when there's an else, so instead of making that if into an unless, I'd just swap the conditional actions. A quite language-independent technical sidenote :-) ... grin If your if() conditional is to test an exception, something that you usually DON'T want to happen - i. e. missing command line parameters - you can use the ! negation operator to indicate this in the if() argument. _precisely_ what unless is for. it's just a funny way of writing if(!... or should I say if(! is a funny way to write unless ;-) But honestly pun aside unless(){} is far more readable than if(!){} and _especially_ if you are programming in an exception manner as you correctly point out. Every language should have an unless construct. [...] And you could even force perl to exit with an exit code != 0 to indicate that something happened (e. g. program wasn't run successfully). a good practice in any language... Now, as the don't want case has been considered, you can easily continue with your program, no need to put it into an else { } branch. ahh! the clarity of unless PS. I'm not familiar with perl enough to be sure that the ! operator can be used at @ARGV to make sure it's 0, In scalar context will automagically return the number of elements perldoc perlintro (section Perl variable types) and how or if to use exit() to set the return code. die Bailing cause you forgot the filename unless @ARGV Yes, that _is_ actual code :) Will not only die with a pretty message on STDERR but will return the value of $! (errno) as exit value. (no need to make up exit codes) Good thing we are on a FBSD list, because I can't see the sense of programming in a non-nix environment ;-) I hardly can read perl at all, so the essence of my examples is of a rather generic nature. :-) Look mommi! Reading Perl is just like reading plain english! (or in Nigerian spam for that matter http://search.cpan.org/~jwalt/Acme-Lingua-NIGERIAN-1.0.0/NIGERIAN.pm) Cheers, Alejandro Imass -- Polytropon Magdeburg, Germany Happy FreeBSD user since 4.0 Andra moi ennepe, Mousa, ... ___ freebsd-questions@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-questions To unsubscribe, send any mail to freebsd-questions-unsubscr...@freebsd.org ___ freebsd-questions@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-questions To unsubscribe, send any mail to freebsd-questions-unsubscr...@freebsd.org
Re: perl qstn...
On Sun, Apr 4, 2010 at 11:25 AM, Randal L. Schwartz mer...@stonehenge.com wrote: Gary == Gary Kline kl...@thought.org writes: [...] And I'd recommend a couple of good books, but I might be seen as self-pimping. :) But if you look at http://learn.perl.org/ you'll see a number of other resources, including free tutorials online. The trilogy is a must-have regardless if you are beginner intermediate or advanced, and regardless of who wrote them ;-) - Learning Perl - Intermediate Perl - Advanced Perl Programming Of course, the Camel book (Programming Perl), and Perl Best Practices which IMHO is a must read for _any_ language but especially for Perl hackers. More here: http://oreilly.com/pub/topic/perl Best, Alejandro Imass print Just another Perl hacker,; # the original -- Randal L. Schwartz - Stonehenge Consulting Services, Inc. - +1 503 777 0095 mer...@stonehenge.com URL:http://www.stonehenge.com/merlyn/ Smalltalk/Perl/Unix consulting, Technical writing, Comedy, etc. etc. See http://methodsandmessages.vox.com/ for Smalltalk and Seaside discussion ___ freebsd-questions@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-questions To unsubscribe, send any mail to freebsd-questions-unsubscr...@freebsd.org ___ freebsd-questions@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-questions To unsubscribe, send any mail to freebsd-questions-unsubscr...@freebsd.org
Re: perl qstn...
On Sun, Apr 04, 2010 at 08:25:03AM -0700, Randal L. Schwartz wrote: Gary == Gary Kline kl...@thought.org writes: Gary #!/usr/bin/perl Gary $argc = @ARGV; Gary if (! $argc ) { Gary printf(No args; need filename.\n); Gary } Gary else { Gary printf(%s\n, @ARGV); Gary } Even simpler: if (@ARGV) { print No args\n; } else { print arg is $ARGV[0]\n; } If you're studying perl, you might want to join the very beginner-friendly mailing list, info at http://lists.perl.org/list/beginners.html, or start a conversation on perlmonks.org, also relatively beginner-friendly. And I'd recommend a couple of good books, but I might be seen as self-pimping. :) hey man, pimp away! we'll all learn a few tricks. ---i had to teach myself perl around '96 and bought a couple books, one with a floppy full of short programs. After doing a find . -name * -exec head -15 {} \; | more thru the truckload of these nifties, i finally came across the $argc idea. there are around a dozen no-longer-throwaways that need the kind of no-arg tip just to make the scripts more user friendly. even tho i'm the Only person who'll ever use them. ---Maybe you can clue me in on this one: around a dozen years ago i somw found a recursive grep named tgrep online. to save tying, i renamed it rgr. i can start anywhere and 'rgr pattern' --WITHOUT ANY ASTERISK-- will find any pattern and skip binary or tarballs or compressed files. given this, rgr has become my favorite utility, but since it doesn't have All of grep's options, yes, it's tru e, there are times whrn i have to use the real thing. i have searched for tgrep and cannot find a newer more complete version. would you or anyone reading this know where an upgraded version is? Here is the Usage string: p4 13:07 tao [5524] rgr Usage: tgrep [-iredblLnf] regexp filepat ... tgrep -h for help if not for trgep/rgr my shoulder would've fallen off and just laid on the floor; that's how much i use this script. having the 'w' switch would be nice, so would the -N switch. But if you look at http://learn.perl.org/ you'll see a number of other resources, including free tutorials online. tx for the pointer; i'll add it to my bookmarks. gary print Just another Perl hacker,; # the original -- Randal L. Schwartz - Stonehenge Consulting Services, Inc. - +1 503 777 0095 mer...@stonehenge.com URL:http://www.stonehenge.com/merlyn/ Smalltalk/Perl/Unix consulting, Technical writing, Comedy, etc. etc. See http://methodsandmessages.vox.com/ for Smalltalk and Seaside discussion -- Gary Kline kl...@thought.org http://www.thought.org Public Service Unix http://jottings.thought.org http://transfinite.thought.org The 7.79a release of Jottings: http://jottings.thought.org/index.php ___ freebsd-questions@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-questions To unsubscribe, send any mail to freebsd-questions-unsubscr...@freebsd.org
Re: perl qstn...
in message 20100404203951.gb47...@thought.org, wrote Gary Kline thusly... ---Maybe you can clue me in on this one: around a dozen years ago i somw found a recursive grep named tgrep online. to save tying, i renamed it rgr. i can start anywhere and 'rgr pattern' --WITHOUT ANY ASTERISK-- will find any pattern and skip binary or tarballs or compressed files. given this, rgr has become my favorite utility, but since it doesn't have All of grep's options, yes, it's tru e, there are times whrn i have to use the real thing. i have searched for tgrep and cannot find a newer more complete version. would you or anyone reading this know where an upgraded version is? Here is the Usage string: p4 13:07 tao [5524] rgr Usage: tgrep [-iredblLnf] regexp filepat ... tgrep -h for help if not for trgep/rgr my shoulder would've fallen off and just laid on the floor; that's how much i use this script. having the 'w' switch would be nice, so would the -N switch. What does -N do in grep included with FreeBSD? My version (FreeBSD 8) only has -n. I know of one tcgrep (by Tom Christiansen) ... http://www.perl.com/CPAN/authors/id/TOMC/scripts/tcgrep.gz Then, there is ack ... http://search.cpan.org/dist/ack/ack ... may need to tinker with option to search non-Perl files (see -a option). Or, simply ... #!/bin/sh # If your particular egrep is laced with potent PCRE, may use -P # option (before $@) to specify Perl regex. egrep -r $@ . - parv -- ___ freebsd-questions@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-questions To unsubscribe, send any mail to freebsd-questions-unsubscr...@freebsd.org
Caution:: Off-topic Re: perl qstn...
On Sun, Apr 04, 2010 at 12:45:30PM -0400, Alejandro Imass wrote: On Sun, Apr 4, 2010 at 11:27 AM, Randal L. Schwartz mer...@stonehenge.com wrote: Randal == Randal L Schwartz mer...@stonehenge.com writes: Randal Even simpler: Randal if (@ARGV) { did you mean unless? ;-) Randal print No args\n; Randal } else { Randal print arg is $ARGV[0]\n; Randal } Augh. I hit send just as I realized that's backwards. Need more caffiene. Swap the true and false blocks there. :) just having my 77th mug of french roast, so i'm hip. ...Anyway, here's one i'v been wanting to ask for years but don't know where to pose. Is C dead? i mean, since it's been official for years, can C add things like the unless keyword? Can C include the perl regex packages? if i asked this anywhere else, they would send out the men in white coats an d haul me away. here i'm safe:) anybody know if we need a new C [[maybe D]] that would be allowed to grow? gary -- Randal L. Schwartz - Stonehenge Consulting Services, Inc. - +1 503 777 0095 mer...@stonehenge.com URL:http://www.stonehenge.com/merlyn/ Smalltalk/Perl/Unix consulting, Technical writing, Comedy, etc. etc. See http://methodsandmessages.vox.com/ for Smalltalk and Seaside discussion ___ freebsd-questions@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-questions To unsubscribe, send any mail to freebsd-questions-unsubscr...@freebsd.org ___ freebsd-questions@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-questions To unsubscribe, send any mail to freebsd-questions-unsubscr...@freebsd.org -- Gary Kline kl...@thought.org http://www.thought.org Public Service Unix http://jottings.thought.org http://transfinite.thought.org The 7.79a release of Jottings: http://jottings.thought.org/index.php ___ freebsd-questions@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-questions To unsubscribe, send any mail to freebsd-questions-unsubscr...@freebsd.org
Re: perl qstn...
On Sun, Apr 04, 2010 at 10:58:35AM -1000, p...@pair.com wrote: in message 20100404203951.gb47...@thought.org, wrote Gary Kline thusly... ---Maybe you can clue me in on this one: around a dozen years ago i somw found a recursive grep named tgrep online. to save tying, i renamed it rgr. i can start anywhere and 'rgr pattern' --WITHOUT ANY ASTERISK-- will find any pattern and skip binary or tarballs or compressed files. given this, rgr has become my favorite utility, but since it doesn't have All of grep's options, yes, it's tru e, there are times whrn i have to use the real thing. i have searched for tgrep and cannot find a newer more complete version. would you or anyone reading this know where an upgraded version is? Here is the Usage string: p4 13:07 tao [5524] rgr Usage: tgrep [-iredblLnf] regexp filepat ... tgrep -h for help if not for trgep/rgr my shoulder would've fallen off and just laid on the floor; that's how much i use this script. having the 'w' switch would be nice, so would the -N switch. What does -N do in grep included with FreeBSD? My version (FreeBSD 8) only has -n. Sorry, my bad. I should have said that N was any positive integer. Sometimes I'll be searching for a phrase that i'm not certain of and will type grep -7 PATTERN file[s] where PATTERN is a known. I'll pipe around for various other strings. I know of one tcgrep (by Tom Christiansen) ... http://www.perl.com/CPAN/authors/id/TOMC/scripts/tcgrep.gz Then, there is ack ... http://search.cpan.org/dist/ack/ack ... may need to tinker with option to search non-Perl files (see -a option). Or, simply ... #!/bin/sh # If your particular egrep is laced with potent PCRE, may use -P # option (before $@) to specify Perl regex. egrep -r $@ . this tgrep is from the NL; by a Prof Piet van Oostrum and is dated 5/19/93. i think ii wrote this fellow many years ago. Zip. I'll ck out ack when i'm using a gui mailer, thanks. gary - parv -- -- Gary Kline kl...@thought.org http://www.thought.org Public Service Unix http://jottings.thought.org http://transfinite.thought.org The 7.79a release of Jottings: http://jottings.thought.org/index.php ___ freebsd-questions@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-questions To unsubscribe, send any mail to freebsd-questions-unsubscr...@freebsd.org
Re: Caution:: Off-topic Re: perl qstn...
On Sun, Apr 4, 2010 at 11:33 PM, Gary Kline kl...@thought.org wrote: Can C include the perl regex packages? Yes! Just use PCRE. Or, if you prefer C++, Boost.Regex: http://www.pcre.org/ http://www.boost.org/doc/libs/1_42_0/libs/regex/doc/html/index.html -- Cordula's Web. http://www.cordula.ws/ ___ freebsd-questions@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-questions To unsubscribe, send any mail to freebsd-questions-unsubscr...@freebsd.org
Re: perl qstn...
From owner-freebsd-questi...@freebsd.org Sun Apr 4 17:14:17 2010 Date: Sun, 4 Apr 2010 15:13:49 -0700 From: Gary Kline kl...@thought.org To: Randal L. Schwartz mer...@stonehenge.com, glar...@freebsd.org, FreeBSD Mailing List freebsd-questions@freebsd.org Cc: Subject: Re: perl qstn... On Sun, Apr 04, 2010 at 10:58:35AM -1000, p...@pair.com wrote: in message 20100404203951.gb47...@thought.org, wrote Gary Kline thusly... ---Maybe you can clue me in on this one: around a dozen years ago i somw found a recursive grep named tgrep online. to save tying, i renamed it rgr. i can start anywhere and 'rgr pattern' --WITHOUT ANY ASTERISK-- will find any pattern and skip binary or tarballs or compressed files. given this, rgr has become my favorite utility, but since it doesn't have All of grep's options, yes, it's tru e, there are times whrn i have to use the real thing. i have searched for tgrep and cannot find a newer more complete version. would you or anyone reading this know where an upgraded version is? Here is the Usage string: p4 13:07 tao [5524] rgr Usage: tgrep [-iredblLnf] regexp filepat ... tgrep -h for help if not for trgep/rgr my shoulder would've fallen off and just laid on the floor; that's how much i use this script. having the 'w' switch would be nice, so would the -N switch. What does -N do in grep included with FreeBSD? My version (FreeBSD 8) only has -n. Sorry, my bad. I should have said that N was any positive integer. Sometimes I'll be searching for a phrase that i'm not certain of and will type grep -7 PATTERN file[s] where PATTERN is a known. I'll pipe around for various other strings. I know of one tcgrep (by Tom Christiansen) ... http://www.perl.com/CPAN/authors/id/TOMC/scripts/tcgrep.gz Then, there is ack ... http://search.cpan.org/dist/ack/ack ... may need to tinker with option to search non-Perl files (see -a option). Or, simply ... #!/bin/sh # If your particular egrep is laced with potent PCRE, may use -P # option (before $@) to specify Perl regex. egrep -r $@ . this tgrep is from the NL; by a Prof Piet van Oostrum and is dated 5/19/93. i think ii wrote this fellow many years ago. Zip. I'll ck out ack when i'm using a gui mailer, thanks. Google to the rescue. Given the program name, and the author, one finds that this code was in UNIX Power Tools (O'Reilly * Assoc.) ___ freebsd-questions@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-questions To unsubscribe, send any mail to freebsd-questions-unsubscr...@freebsd.org
Re: Caution:: Off-topic Re: perl qstn...
On Sun, Apr 04, 2010 at 02:33:02PM -0700, Gary Kline wrote: anybody know if we need a new C [[maybe D]] that would be allowed to grow? There's already a D. I don't really know much about it, though. -- Chad Perrin [ original content licensed OWL: http://owl.apotheon.org ] pgpluEACy1sZx.pgp Description: PGP signature
Re: perl qstn...
On Sun, Apr 04, 2010 at 08:14:21PM -0500, Robert Bonomi wrote: From owner-freebsd-questi...@freebsd.org Sun Apr 4 17:14:17 2010 Date: Sun, 4 Apr 2010 15:13:49 -0700 From: Gary Kline kl...@thought.org To: Randal L. Schwartz mer...@stonehenge.com, glar...@freebsd.org, FreeBSD Mailing List freebsd-questions@freebsd.org Cc: Subject: Re: perl qstn... On Sun, Apr 04, 2010 at 10:58:35AM -1000, p...@pair.com wrote: in message 20100404203951.gb47...@thought.org, wrote Gary Kline thusly... ---Maybe you can clue me in on this one: around a dozen years ago i somw found a recursive grep named tgrep online. to save tying, i renamed it rgr. i can start anywhere and 'rgr pattern' --WITHOUT ANY ASTERISK-- will find any pattern and skip binary or tarballs or compressed files. given this, rgr has become my favorite utility, but since it doesn't have All of grep's options, yes, it's tru e, there are times whrn i have to use the real thing. i have searched for tgrep and cannot find a newer more complete version. would you or anyone reading this know where an upgraded version is? Here is the Usage string: p4 13:07 tao [5524] rgr Usage: tgrep [-iredblLnf] regexp filepat ... tgrep -h for help [[ ... ]] Google to the rescue. Given the program name, and the author, one finds that this code was in UNIX Power Tools (O'Reilly * Assoc.) right; i've got the power tools book front and center. it must have come with tgrep on a floppy. -- Gary Kline kl...@thought.org http://www.thought.org Public Service Unix http://jottings.thought.org http://transfinite.thought.org The 7.79a release of Jottings: http://jottings.thought.org/index.php ___ freebsd-questions@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-questions To unsubscribe, send any mail to freebsd-questions-unsubscr...@freebsd.org
Re: perl qstn...
Gary == Gary Kline kl...@thought.org writes: Gary if a .pl script has to have at least one arg, is there an easy Gary way to do that? Dare I say, there's more than one way to do it? :) See the Getopt:: family in the CPAN. My favorite is Getopt::Long. -- Randal L. Schwartz - Stonehenge Consulting Services, Inc. - +1 503 777 0095 mer...@stonehenge.com URL:http://www.stonehenge.com/merlyn/ Smalltalk/Perl/Unix consulting, Technical writing, Comedy, etc. etc. See http://methodsandmessages.vox.com/ for Smalltalk and Seaside discussion ___ freebsd-questions@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-questions To unsubscribe, send any mail to freebsd-questions-unsubscr...@freebsd.org
Re: perl qstn...
On Sat, Apr 03, 2010 at 02:17:06PM -0700, Randal L. Schwartz wrote: Gary == Gary Kline kl...@thought.org writes: Gary if a .pl script has to have at least one arg, is there an easy Gary way to do that? Dare I say, there's more than one way to do it? :) See the Getopt:: family in the CPAN. My favorite is Getopt::Long. For simple scripts I tend to use Getopt::Std instead, but Getopt::Long is great too. These two are pretty much the standard for command line option handling and help message generation in Perl. -- Chad Perrin [ original content licensed OWL: http://owl.apotheon.org ] pgpwV1YQ4xsBV.pgp Description: PGP signature
Re: perl qstn...
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Gary Kline wrote: guys, i'm finally trying to get my private scripts and binaries in ~/bin in order. several of my perl scripts were meant to be throwaway ... but a few seem to be more useful and i would have to have informational or usage{} type messages. if a .pl script has to have at least one arg, is there an easy way to do that? can i have a perl fn called usage() that would be fed various strings? tia, gary Hi Gary, Check out this Perl module that builds on Getopt::Long, but also includes support for echoing usage messages for each option: http://search.cpan.org/~rjbs/Getopt-Long-Descriptive-0.085/lib/Getopt/Long/Descriptive.pm Hope that helps, Greg -BEGIN PGP SIGNATURE- Version: GnuPG v2.0.10 (Darwin) Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/ iEYEARECAAYFAku4EIoACgkQ0sRouByUApCXNgCgrLt1v3rV2+AjfxXMT1ew3GhE pZIAn0P5O7L5koQflkiQOuoTA+75POOe =Cyq4 -END PGP SIGNATURE- ___ freebsd-questions@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-questions To unsubscribe, send any mail to freebsd-questions-unsubscr...@freebsd.org
Re: Perl 5.8 - 5.10 On Current Production System
On Thu, Mar 4, 2010 at 6:13 PM, Matthew Seaman m.sea...@infracaninophile.co.uk wrote: However, when I run: portupgrade -o lang/perl5.10 -f perl-5.8\.* I get this problem: --- Upgrading 'perl-5.8.9_3' to 'perl-5.10.1' (lang/perl5.10) --- Building '/usr/ports/lang/perl5.10' === Cleaning for perl-5.10.1 === perl-5.10.1 conflicts with installed package(s): perl-5.8.9_3 They install files into the same place. Please remove them first with pkg_delete(1). *** Error code 1 I supposed I could do a forced manual removal of perl, but isn't that what the '-f' arg in the portupgrade is supposed to do? You got bitten by an ill-considered change introduced after the UPDATING instructions were written. To work around it, you need to set DISABLE_CONFLICTS when rebuilding the port, eg like this: # portupgrade -m DISABLE_CONFLICTS=yes -o lang/perl5.10 -f perl-5.8\.* THANK YOU! This is *exactly* what was holding me up from upgrading to Perl 5.10. Please feel free to complain volubly about this: it's hand-holding for newbies which annoys and incoveniences the vastly larger number of non-newbies (ie. anyone who has been using the ports for more than a few weeks.) Cheers, Matthew -cpghost. -- Cordula's Web. http://www.cordula.ws/ ___ freebsd-questions@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-questions To unsubscribe, send any mail to freebsd-questions-unsubscr...@freebsd.org
Re: Perl 5.8 - 5.10 On Current Production System
Matthew Seaman m.sea...@infracaninophile.co.uk writes: You got bitten by an ill-considered change introduced after the UPDATING instructions were written. To work around it, you need to set DISABLE_CONFLICTS when rebuilding the port, eg like this: # portupgrade -m DISABLE_CONFLICTS=yes -o lang/perl5.10 -f perl-5.8\.* Please feel free to complain volubly about this: it's hand-holding for newbies which annoys and incoveniences the vastly larger number of non-newbies (ie. anyone who has been using the ports for more than a few weeks.) It has occurred to me that teaching portupgrade to handle this would be a Simple Matter of Programming. Maybe even a strategy as simple as adding the variable to the make command lines automatically any time '-o' is specified. I wonder whether I could write that change without actually learning ruby... -- Lowell Gilbert, embedded/networking software engineer, Boston area http://be-well.ilk.org/~lowell/ ___ freebsd-questions@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-questions To unsubscribe, send any mail to freebsd-questions-unsubscr...@freebsd.org
Re: Perl 5.8 - 5.10 On Current Production System
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 On 05/03/2010 15:22:05, Lowell Gilbert wrote: Matthew Seaman m.sea...@infracaninophile.co.uk writes: You got bitten by an ill-considered change introduced after the UPDATING instructions were written. To work around it, you need to set DISABLE_CONFLICTS when rebuilding the port, eg like this: # portupgrade -m DISABLE_CONFLICTS=yes -o lang/perl5.10 -f perl-5.8\.* Please feel free to complain volubly about this: it's hand-holding for newbies which annoys and incoveniences the vastly larger number of non-newbies (ie. anyone who has been using the ports for more than a few weeks.) It has occurred to me that teaching portupgrade to handle this would be a Simple Matter of Programming. Maybe even a strategy as simple as adding the variable to the make command lines automatically any time '-o' is specified. I wonder whether I could write that change without actually learning ruby... Probably it's easy enough to do that, but only at the cost of completely turning off the otherwise valuable conflicts checking mechanism. You'ld actually want to be informed of any conflicts /except/ the ones you always get in this sort of operation between the port being replaced and the port replacing it. The fundamental problem is that conflicts checking has been moved to way too early in the sequence -- it even blocks you from downloading the tarballs for any port that conflicts with what you have installed. Cheers, Matthew - -- Dr Matthew J Seaman MA, D.Phil. 7 Priory Courtyard Flat 3 PGP: http://www.infracaninophile.co.uk/pgpkey Ramsgate Kent, CT11 9PW -BEGIN PGP SIGNATURE- Version: GnuPG/MacGPG2 v2.0.14 (Darwin) Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/ iEYEARECAAYFAkuRJG0ACgkQ8Mjk52CukIxqrwCgiP3cq3jDDcJzRYIycSGD3FpL SIsAn1cWMmeFinU6C9UTWdlJWb0LcTxC =+Ede -END PGP SIGNATURE- ___ freebsd-questions@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-questions To unsubscribe, send any mail to freebsd-questions-unsubscr...@freebsd.org
Re: Perl 5.8 - 5.10 On Current Production System
Hi, Tim Daneliuk wrote: Is there a recommended procedure I can read somewhere on how to upgrade an entire production system from Perl 5.8 to 5.10 (or whatever is current) cleanly? Have a look at the 20100205 entry of ports/UPDATING. Regards, -- Glen Barber ___ freebsd-questions@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-questions To unsubscribe, send any mail to freebsd-questions-unsubscr...@freebsd.org
Re: Perl 5.8 - 5.10 On Current Production System
On 2010-03-04 17:06, Tim Daneliuk wrote: Is there a recommended procedure I can read somewhere on how to upgrade an entire production system from Perl 5.8 to 5.10 (or whatever is current) cleanly? /usr/ports/UPDATING ;-) ___ freebsd-questions@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-questions To unsubscribe, send any mail to freebsd-questions-unsubscr...@freebsd.org
Re: Perl 5.8 - 5.10 On Current Production System
On 3/4/2010 10:13 AM, Leslie Jensen wrote: On 2010-03-04 17:06, Tim Daneliuk wrote: Is there a recommended procedure I can read somewhere on how to upgrade an entire production system from Perl 5.8 to 5.10 (or whatever is current) cleanly? /usr/ports/UPDATING ;-) Thanks to all for pointing to this. However, when I run: portupgrade -o lang/perl5.10 -f perl-5.8\.* I get this problem: --- Upgrading 'perl-5.8.9_3' to 'perl-5.10.1' (lang/perl5.10) --- Building '/usr/ports/lang/perl5.10' === Cleaning for perl-5.10.1 === perl-5.10.1 conflicts with installed package(s): perl-5.8.9_3 They install files into the same place. Please remove them first with pkg_delete(1). *** Error code 1 I supposed I could do a forced manual removal of perl, but isn't that what the '-f' arg in the portupgrade is supposed to do? -- Tim Daneliuk tun...@tundraware.com PGP Key: http://www.tundraware.com/PGP/ ___ freebsd-questions@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-questions To unsubscribe, send any mail to freebsd-questions-unsubscr...@freebsd.org
Re: Perl 5.8 - 5.10 On Current Production System
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 On 04/03/2010 17:05:08, Tim Daneliuk wrote: On 3/4/2010 10:13 AM, Leslie Jensen wrote: On 2010-03-04 17:06, Tim Daneliuk wrote: Is there a recommended procedure I can read somewhere on how to upgrade an entire production system from Perl 5.8 to 5.10 (or whatever is current) cleanly? /usr/ports/UPDATING ;-) Thanks to all for pointing to this. However, when I run: portupgrade -o lang/perl5.10 -f perl-5.8\.* I get this problem: --- Upgrading 'perl-5.8.9_3' to 'perl-5.10.1' (lang/perl5.10) --- Building '/usr/ports/lang/perl5.10' === Cleaning for perl-5.10.1 === perl-5.10.1 conflicts with installed package(s): perl-5.8.9_3 They install files into the same place. Please remove them first with pkg_delete(1). *** Error code 1 I supposed I could do a forced manual removal of perl, but isn't that what the '-f' arg in the portupgrade is supposed to do? You got bitten by an ill-considered change introduced after the UPDATING instructions were written. To work around it, you need to set DISABLE_CONFLICTS when rebuilding the port, eg like this: # portupgrade -m DISABLE_CONFLICTS=yes -o lang/perl5.10 -f perl-5.8\.* Please feel free to complain volubly about this: it's hand-holding for newbies which annoys and incoveniences the vastly larger number of non-newbies (ie. anyone who has been using the ports for more than a few weeks.) Cheers, Matthew - -- Dr Matthew J Seaman MA, D.Phil. 7 Priory Courtyard Flat 3 PGP: http://www.infracaninophile.co.uk/pgpkey Ramsgate Kent, CT11 9PW -BEGIN PGP SIGNATURE- Version: GnuPG/MacGPG2 v2.0.14 (Darwin) Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/ iEYEARECAAYFAkuP6kAACgkQ8Mjk52CukIzOFwCcDWkYxJrX+nPwWpzhrWGBuLTO MIIAn1wVGgCJc4nFdDdxmyXnuzbJ3kni =LfKt -END PGP SIGNATURE- ___ freebsd-questions@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-questions To unsubscribe, send any mail to freebsd-questions-unsubscr...@freebsd.org
Re: Perl 5.8 - 5.10 On Current Production System
On 3/4/2010 11:13 AM, Matthew Seaman wrote: portupgrade -m DISABLE_CONFLICTS=yes -o lang/perl5.10 -f perl-5.8\.* Thanks for that. I'm not sure to whom I'd complain and/or if it would make any difference ;) -- Tim Daneliuk tun...@tundraware.com PGP Key: http://www.tundraware.com/PGP/ ___ freebsd-questions@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-questions To unsubscribe, send any mail to freebsd-questions-unsubscr...@freebsd.org
Re: Perl 5.8 - 5.10 On Current Production System
On Thursday 04 March 2010 19:13:36 Matthew Seaman wrote: You got bitten by an ill-considered change introduced after the UPDATING instructions were written. To work around it, you need to set DISABLE_CONFLICTS when rebuilding the port, eg like this: # portupgrade -m DISABLE_CONFLICTS=yes -o lang/perl5.10 -f perl-5.8\.* Please feel free to complain volubly about this: it's hand-holding for newbies which annoys and incoveniences the vastly larger number of non-newbies (ie. anyone who has been using the ports for more than a few weeks.) Has this absolutely ludicrous change not been reverted with extreme prejudice yet? And is there a PR where we can add interesting suggestions as to what miseries should be inflicted on the person responsible for it? ___ freebsd-questions@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-questions To unsubscribe, send any mail to freebsd-questions-unsubscr...@freebsd.org
Re: Perl upgrade problem...
On Fri, Feb 12, 2010 at 2:44 PM, Peter Harrison peter.piggy...@virgin.netwrote: Up till now I've kept Perl on my machine at 5.8.9. I now see from UPDATING that upgrading to 5.10 is recommended. However, when I follow the instructions, I get the following error: laptop# portupgrade -o lang/perl5.10 -f perl-5.8.9_3 if you're referring to this: 20090911: AFFECTS: users of lang/perl5.10 AUTHOR: s...@freebsd.org lang/perl5.10 has been updated to 5.10.1. You should update everything that depends on perl. The easiest way to do that is to use perl-after-upgrade script supplied with lang/perl5.10. Please see its manual page for details. If you want switch to lang/perl5.10 from lang/perl5.8 please follow instructions in the entry 20090328 in this file. Then you have misunderstood what it's saying. That only applies to folks already running 5.10 and if you have no need for that then do nothing further. If you really believe you need to run 5.10 then you should follow the complete instructions from the entry. -- Adam Vande More ___ freebsd-questions@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-questions To unsubscribe, send any mail to freebsd-questions-unsubscr...@freebsd.org
Re: Perl upgrade problem...
On 12/02/2010 20:50, Adam Vande More wrote: On Fri, Feb 12, 2010 at 2:44 PM, Peter Harrison peter.piggy...@virgin.netwrote: Up till now I've kept Perl on my machine at 5.8.9. I now see from UPDATING that upgrading to 5.10 is recommended. However, when I follow the instructions, I get the following error: laptop# portupgrade -o lang/perl5.10 -f perl-5.8.9_3 if you're referring to this: 20090911: AFFECTS: users of lang/perl5.10 AUTHOR: s...@freebsd.org lang/perl5.10 has been updated to 5.10.1. You should update everything that depends on perl. The easiest way to do that is to use perl-after-upgrade script supplied with lang/perl5.10. Please see its manual page for details. If you want switch to lang/perl5.10 from lang/perl5.8 please follow instructions in the entry 20090328 in this file. Then you have misunderstood what it's saying. That only applies to folks already running 5.10 and if you have no need for that then do nothing further. If you really believe you need to run 5.10 then you should follow the complete instructions from the entry. Err... he's following the right instructions. It's just that since those instructions were written there have been some badly thought-out changes in bsd.ports.mk. Any time you try and use portupgrade to replace one port with another now, you'll likely need to tell it to ignore CONFLICTS settings: # portupgrade -m DISABLE_CONFLICTS=yes -o lang/perl5.10 \ -f perl-5.8.9_3 Then reinstall every port that depends on perl -- you can't use perl_after_upgrade for this update: the delta in version numbers is too large. Cheers, Matthew -- Dr Matthew J Seaman MA, D.Phil. 7 Priory Courtyard, Flat 3 Black Earth Consulting Ramsgate Kent, CT11 9PW Free and Open Source Solutions Tel: +44 (0)1843 580647 signature.asc Description: OpenPGP digital signature
Re: Perl upgrade problem...
On Fri, Feb 12, 2010 at 3:03 PM, Matthew Seaman m.sea...@black-earth.co.ukwrote: Err... he's following the right instructions. ports/UPDATING does not recommend to upgrade. -- Adam Vande More ___ freebsd-questions@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-questions To unsubscribe, send any mail to freebsd-questions-unsubscr...@freebsd.org
Re: Perl upgrade problem...
On Fri, Feb 12, 2010 at 3:07 PM, Adam Vande More amvandem...@gmail.comwrote: On Fri, Feb 12, 2010 at 3:03 PM, Matthew Seaman m.sea...@black-earth.co.uk wrote: Err... he's following the right instructions. ports/UPDATING does not recommend to upgrade. I mean does not recommend going from 5.8 to 5.10 as the op has done. You are correctly in the previous entry containing incorrect instructions. -- Adam Vande More ___ freebsd-questions@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-questions To unsubscribe, send any mail to freebsd-questions-unsubscr...@freebsd.org
Re: Perl upgrade problem...
Friday, 12 February 2010 at 14:50:56 -0600, Adam Vande More said: On Fri, Feb 12, 2010 at 2:44 PM, Peter Harrison peter.piggy...@virgin.netwrote: Up till now I've kept Perl on my machine at 5.8.9. I now see from UPDATING that upgrading to 5.10 is recommended. However, when I follow the instructions, I get the following error: laptop# portupgrade -o lang/perl5.10 -f perl-5.8.9_3 if you're referring to this: 20090911: AFFECTS: users of lang/perl5.10 AUTHOR: s...@freebsd.org lang/perl5.10 has been updated to 5.10.1. You should update everything that depends on perl. The easiest way to do that is to use perl-after-upgrade script supplied with lang/perl5.10. Please see its manual page for details. If you want switch to lang/perl5.10 from lang/perl5.8 please follow instructions in the entry 20090328 in this file. Then you have misunderstood what it's saying. That only applies to folks already running 5.10 and if you have no need for that then do nothing further. If you really believe you need to run 5.10 then you should follow the complete instructions from the entry. I don't need 5.10, but I was prompted to think about upgrading from 20100205. I was trying to follow 20090328, I ran pkgdb -Ff (no problem) then portupgrade -o lang/per5.10 -f perl-5.8.9 which generated the error given. Peter Harrison. -- Adam Vande More ___ freebsd-questions@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-questions To unsubscribe, send any mail to freebsd-questions-unsubscr...@freebsd.org
Re: Perl upgrade problem...
On Fri, Feb 12, 2010 at 3:26 PM, Peter Harrison peter.piggy...@virgin.netwrote: I don't need 5.10, but I was prompted to think about upgrading from 20100205. I was trying to follow 20090328, I ran pkgdb -Ff (no problem) then portupgrade -o lang/per5.10 -f perl-5.8.9 which generated the error given. Peter Harrison. i see, my port tree was out of date, sorry. -- Adam Vande More ___ freebsd-questions@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-questions To unsubscribe, send any mail to freebsd-questions-unsubscr...@freebsd.org
Re: Perl upgrade problem...
Friday, 12 February 2010 at 21:03:54 +, Matthew Seaman said: On 12/02/2010 20:50, Adam Vande More wrote: On Fri, Feb 12, 2010 at 2:44 PM, Peter Harrison peter.piggy...@virgin.netwrote: Up till now I've kept Perl on my machine at 5.8.9. I now see from UPDATING that upgrading to 5.10 is recommended. However, when I follow the instructions, I get the following error: laptop# portupgrade -o lang/perl5.10 -f perl-5.8.9_3 if you're referring to this: 20090911: AFFECTS: users of lang/perl5.10 AUTHOR: s...@freebsd.org lang/perl5.10 has been updated to 5.10.1. You should update everything that depends on perl. The easiest way to do that is to use perl-after-upgrade script supplied with lang/perl5.10. Please see its manual page for details. If you want switch to lang/perl5.10 from lang/perl5.8 please follow instructions in the entry 20090328 in this file. Then you have misunderstood what it's saying. That only applies to folks already running 5.10 and if you have no need for that then do nothing further. If you really believe you need to run 5.10 then you should follow the complete instructions from the entry. Err... he's following the right instructions. It's just that since those instructions were written there have been some badly thought-out changes in bsd.ports.mk. Any time you try and use portupgrade to replace one port with another now, you'll likely need to tell it to ignore CONFLICTS settings: # portupgrade -m DISABLE_CONFLICTS=yes -o lang/perl5.10 \ -f perl-5.8.9_3 Then reinstall every port that depends on perl -- you can't use perl_after_upgrade for this update: the delta in version numbers is too large. Cheers, Matthew OK - that seems inconvenient, but I guess it makes sense. I remember some stuff on the list about this earlier now that you mention it. Seems to have made a bit of a hassle of replacing one port with another. Thanks for the advice. Peter. -- Dr Matthew J Seaman MA, D.Phil. 7 Priory Courtyard, Flat 3 Black Earth Consulting Ramsgate Kent, CT11 9PW Free and Open Source Solutions Tel: +44 (0)1843 580647 ___ freebsd-questions@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-questions To unsubscribe, send any mail to freebsd-questions-unsubscr...@freebsd.org
Re: Perl updates
Jos Chrispijn wrote: Can someone explain why we have to run an update batch in order to have all Perl related programs running with this update? Wouldn't it be better to upgrade Perl and have all programs use it as it hadn't been updated at all? You're talking about the update of lang/perl5.10 from perl-5.10.0 to perl-5.10.1 ? The reason you need to run perl-after-upgrade is because perl library modules are stored in directory trees which encode the perl version number. perl-after-upgrade basically moves installed modules from /usr/local/lib/perl5/site_perl/5.10.0 to /usr/local/lib/perl5/site_perl/5.10.1 plus it fixes up all of the pkg-plists and various other places where the directory path is embedded. Alternatively you could just re-install every single perl module on the system, plus any other ports that depend on perl, but that's going to be the majority of the software on your machine and perl-after-upgrade is a lot quicker. Even so, ports that embed a perl interpreter -- ie. that dynamically link against libperl.so -- will need to be recompiled, to account for libperl.so now being in a different location. There aren't too many of these: net-mgmt/net-snmp and www/mod_perl{,2} are probably the most commonly encountered. One of the functions of perl-after-upgrade is to tell you what packages need to be rebuilt because of this. Why isn't perl-after-upgrade run automatically? Two reasons. Firstly, the ports system cannot itself distinguish what updates would require perl-after-upgrade to be run: when updating, the mechanism is to delete the old package and then install the new one as if de-novo. The newly installed package has no information about what older version of itself it is replacing, if any. Secondly, you can't make perl-after-upgrade clever enough to deal with all conceivable corner cases. Other than by enforcing particular usage rules on how individual admins manage their perl installations -- a policy that is manifestly *not the BSD way* -- this is unfeasible. Given that we hold that it is in the gift of the individual admin to decide how to manage their systems, there have to be stages somewhere that involve the admin making a concious decision about what to do. Running perl-after-upgrade is one of those points. Lastly, just to note that if the upgrade is across a significantly large change in version number: eg from perl-5.8 to perl-5.10, then any dynamically loaded compiled extension modules (see perlxs(1)) will have to be recompiled as the ABI is not guaranteed to be kept the same in that case. Unfortunately, distinguishing modules that use perlxs from pure perl modules is not something the ports system is currently capable of, so the upgrade instructions there are rebuild everything that depends on perl. Cheers, Matthew -- Dr Matthew J Seaman MA, D.Phil. 7 Priory Courtyard Flat 3 PGP: http://www.infracaninophile.co.uk/pgpkey Ramsgate Kent, CT11 9PW signature.asc Description: OpenPGP digital signature
Re: Perl updates
Matthew Seaman wrote: You're talking about the update of lang/perl5.10 from perl-5.10.0 to perl-5.10.1 ? The reason you need to run perl-after-upgrade is because perl library modules are stored in directory trees which encode the perl version number. perl-after-upgrade basically moves installed modules from [-snip-] Thanks, appreciate this detailed information. Jos Chrispijn ___ freebsd-questions@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-questions To unsubscribe, send any mail to freebsd-questions-unsubscr...@freebsd.org
Re: Perl upgrade
Hi Jerry, Jerry wrote: Perl-5.10 was released to the public over a year ago. Another year transpired before it was released into the ports system. There was an immediate problem that was corrected when the maintainer switched to 'bison' from 'YACC'. Other than that, it has performed flawlessly as far as I can tell. Thanks, I didn't know that as it only appeared in UPDATING at 280309. regards, Jos Chrispijn ___ freebsd-questions@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-questions To unsubscribe, send any mail to freebsd-questions-unsubscr...@freebsd.org
Re: Perl upgrade
On Sat, 9 May 2009 08:31:45 -0500 (CDT) Lars Eighner luvbeas...@larseighner.com wrote: On Sat, 9 May 2009, Jos Chrispijn wrote: Lars Eighner wrote: On Sat, 9 May 2009, Jos Chrispijn wrote: You must be new around here. Yes, I am L-) The process described in UPDATING for upgrading to Perl 5.10 is relatively painless compared to previous perl upgrades. So much stuff depends upon perl that: [snip] Do you recommend having Perl updated or should I stay with 5.8? Unless you know there is something in 5.10 that you need now, I recommend waiting at least a little bit. Let the gotta-have-the-newest-shiny folks take the sharp edges off. Study the dependencies list from pkg_info and dependencies of any big thing you plan to install. If you are going to (re-)build something big or a lot of little things anyway, it may make sense to upgrade perl just before you do that so that rebuilding the ports that depend on perl will kill two birds with one stone. If such an opportunity doesn't arise, maybe do it anyway about the time of the first frost --- snuggle up in front of the blazing compiler and sip hot chocolate. Perl-5.10 was released to the public over a year ago. Another year transpired before it was released into the ports system. There was an immediate problem that was corrected when the maintainer switched to 'bison' from 'YACC'. Other than that, it has performed flawlessly as far as I can tell. -- Jerry ges...@yahoo.com The Martian Canals were clearly the Martian's last ditch effort! signature.asc Description: PGP signature
Re: Perl upgrade
On Sat, 09 May 2009 13:05:32 +0200 Jos Chrispijn j...@webrz.net wrote: Not that I am that paranoid, but can someone tell me why Perl 5.8 is not automatically updated to 5.10 thru the ports, but (accordingly by UPDATING) has to be updated by some manual interaction? That's the way the port system works. perl5.6, perl5.8 and perl5.10 are separate ports, making it automatic would involve forcing people off perl5.8 and marking it as moved. ___ freebsd-questions@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-questions To unsubscribe, send any mail to freebsd-questions-unsubscr...@freebsd.org
Re: Perl upgrade
On Sat, 9 May 2009, Jos Chrispijn wrote: Not that I am that paranoid, but can someone tell me why Perl 5.8 is not automatically updated to 5.10 thru the ports, but (accordingly by UPDATING) has to be updated by some manual interaction? You must be new around here. The process described in UPDATING for upgrading to Perl 5.10 is relatively painless compared to previous perl upgrades. So much stuff depends upon perl that: 1) special treatment is required to be sure you end up with a system that is functional in practice, and 2) people should not be misled as to the extent of the work involved. Use pkg_info -R name of installed perl package to see what you may be in for. Perl was once (recently for some of us) part of the system. Logic may be on the side of considering it an application, but as a practical matter it is a distinction without a (big) difference. -- Lars Eighner http://www.larseighner.com/index.html 8800 N IH35 APT 1191 AUSTIN TX 78753-5266 ___ freebsd-questions@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-questions To unsubscribe, send any mail to freebsd-questions-unsubscr...@freebsd.org