[32499] in Perl-Users-Digest
Perl-Users Digest, Issue: 3764 Volume: 11
daemon@ATHENA.MIT.EDU (Perl-Users Digest)
Wed Aug 22 16:09:21 2012
Date: Wed, 22 Aug 2012 13:09:07 -0700 (PDT)
From: Perl-Users Digest <Perl-Users-Request@ruby.OCE.ORST.EDU>
To: Perl-Users@ruby.OCE.ORST.EDU (Perl-Users Digest)
Perl-Users Digest Wed, 22 Aug 2012 Volume: 11 Number: 3764
Today's topics:
Re: magic installation woes [OT] <cal@example.invalid>
Re: number of starting tabs <derykus@gmail.com>
Re: number of starting tabs <rweikusat@mssgmbh.com>
undefine @array <nospam.gravitalsun@hotmail.com.nospam>
Re: undefine @array <*@eli.users.panix.com>
Re: undefine @array <nospam.gravitalsun@hotmail.com.nospam>
Re: undefine @array (Tim McDaniel)
Re: using cpan effectively <cal@example.invalid>
Re: using cpan effectively <cal@example.invalid>
using Template effectively <cal@example.invalid>
Re: using Template effectively <rweikusat@mssgmbh.com>
Re: using Template effectively <ben@morrow.me.uk>
Re: using Template effectively <ben@morrow.me.uk>
Re: using Template effectively <rweikusat@mssgmbh.com>
Re: using Template effectively <hjp-usenet2@hjp.at>
Re: using Template effectively <ben@morrow.me.uk>
Re: using Template effectively <rweikusat@mssgmbh.com>
Re: using Template effectively <hjp-usenet2@hjp.at>
Re: using Template effectively <ben@morrow.me.uk>
Re: using Template effectively <rweikusat@mssgmbh.com>
Re: using Template effectively <mvdwege@mail.com>
Re: using Template effectively <whynot@pozharski.name>
Digest Administrivia (Last modified: 6 Apr 01) (Perl-Users-Digest Admin)
----------------------------------------------------------------------
Date: Tue, 21 Aug 2012 04:07:23 -0600
From: Cal Dershowitz <cal@example.invalid>
Subject: Re: magic installation woes [OT]
Message-Id: <Ao-dnQ6W_-hHwK7NnZ2dnUVZ_gqdnZ2d@supernews.com>
On 08/19/2012 11:31 PM, Cal Dershowitz wrote:
>
> Since you were missing a library named MagickCore and a header of the
> same name, the candidate suggesting itself would be libmagickcore-dev.
> You can install that with
>
> apt-get install libmagickcore-dev
$ sudo apt-get install libmagickcore-dev
[sudo] password for fred:
Reading package lists... Done
Building dependency tree
Reading state information... Done
libmagickcore-dev is already the newest version.
0 upgraded, 0 newly installed, 0 to remove and 12 not upgraded.
$
This is encouraging for me, because I've got 99 problems, and this is no
longer one of them.
--
Cal
------------------------------
Date: Tue, 21 Aug 2012 12:36:56 -0700 (PDT)
From: "C.DeRykus" <derykus@gmail.com>
Subject: Re: number of starting tabs
Message-Id: <86fc4993-73e4-4067-8417-7a32d0c79b40@googlegroups.com>
On Friday, August 17, 2012 1:33:07 PM UTC-7, Rainer Weikusat wrote:
> Ben Morrow <ben@morrow.me.uk> writes:
>
> > Quoth Rainer Weikusat <rweikusat@mssgmbh.com>:
>
> >> Ben Morrow <ben@morrow.me.uk> writes:
>
> >>
>
> >> > For the specific case of a single-character string, /^\t*/ followed
>
> >> > by measuring the length of the matched section (in any of the ways
>
> >> > already posted) is probably a better solution.
>
> >>
>
> >> If you know the sensible solution, as this very strongly suggests, why
>
> >> don't you post it?
>
> >>
>
> >> ------------
>
> >> print($ARGV[0] =~ /^\t*/ && $+[0], " leading tabs\n");
>
> >> ------------
>
> >
>
> > At least two people have already posted solutions equivalent to
>
> > that;
>
>
>
> At least two similar solution where posted but this one is better, as
>
> was explained in the text you deleted.
>
>
>
> > I was looking for something more general. I would prefer
>
> >
>
> > my ($tabs) = $var =~ /^(\t*)/;
>
> > say length $tabs;
>
> >
>
> > since I try to avoid @+, @- and $N where possible, but that's purely
>
> > a matter of taste.
>
>
>
> That's not 'purely a matter of taste'. The following two pieces of
>
> Perl code are equivalent insofar the final value of $tabs is
>
> concerned:
>
>
>
> -----
>
> $tabs = $ARGV[0] =~ /^\t*/ && $+[0];
>
> -----
>
>
>
> -----
>
> ($tabs) = $ARGV[0] =~ /^(\t*)/;
>
> $tabs = length($tabs);
>
> -----
>
>
>
> But they utilize different methods of calculating this value and while
>
> the first requires perl (5.10.1) to perform nine basic operations, the
>
> second needs fourteen, not the least because it reimplements a feature
>
> the perl regex engine already provides in a relatively clumsy way in
>
> Perl: There's no point in copying the substring or even just capturing
>
> it if only the number of characters are supposed to be counted.
> ...
I think the copy could be avoided though:
$tabs++ while $var =~ /\G\t/g;
--
Charles DeRykus
------------------------------
Date: Wed, 22 Aug 2012 20:52:26 +0100
From: Rainer Weikusat <rweikusat@mssgmbh.com>
Subject: Re: number of starting tabs
Message-Id: <87lih6embp.fsf@sapphire.mobileactivedefense.com>
"C.DeRykus" <derykus@gmail.com> writes:
> On Friday, August 17, 2012 1:33:07 PM UTC-7, Rainer Weikusat wrote:
>> > Quoth Rainer Weikusat <rweikusat@mssgmbh.com>:
[...]
>> -----
>>
>> $tabs = $ARGV[0] =~ /^\t*/ && $+[0];
>>
>> -----
>>
>> -----
>>
>> ($tabs) = $ARGV[0] =~ /^(\t*)/;
>>
>> $tabs = length($tabs);
>>
>> -----
>>
>> But they utilize different methods of calculating this value and while
>> the first requires perl (5.10.1) to perform nine basic operations, the
>> second needs fourteen, not the least because it reimplements a feature
>> the perl regex engine already provides in a relatively clumsy way in
>> Perl: There's no point in copying the substring or even just capturing
>> it if only the number of characters are supposed to be counted.
>
> I think the copy could be avoided though:
>
> $tabs++ while $var =~ /\G\t/g;
Leading remark: One the machine where I tested this, the absolute
difference are in he 1E-7 range which implies that this is a
scientific problem of some interest (to certain people, at least :-) but
each of the three variants is as suitable for any practical problem
where less than a couple of hundredthousands of inputs need to be
processed as the two others.
Regarding the last one: One should expect this to be distinctively
worse than the other two because even more 'algorithmic work' is
performed in Perl-code. And that was actually the result I got:
Averaged over for runs, the first ran at about 1.05 times the speed of
the second and at about 1.46 times the speed of the third
[second-to-third 1.39).
Test program
---------------
use Benchmark;
my $in = "\t\t\t\tbla";
my $t;
timethese(-5,
{
copy => sub {
($t) = $in =~ /^(\t*)/;
return length($t);
},
count => sub {
pos($in) = 0;
++$t while $in =~ /\G\t/g;
return $t;
},
calc => sub {
return $in =~ /^\t*/ && $+[0];
}});
------------------------------
Date: Wed, 22 Aug 2012 22:06:52 +0300
From: "George Mpouras" <nospam.gravitalsun@hotmail.com.nospam>
Subject: undefine @array
Message-Id: <k13akc$4o7$1@news.ntua.gr>
I want to delete an array completly.
use strict; use warnings; my
@array=qw/a b c/;
@array=();
undef @array;
print @array;
I expect a warning like "Global symbol "@array" requires explicit..." but it
did not compaint
------------------------------
Date: Wed, 22 Aug 2012 19:17:27 +0000 (UTC)
From: Eli the Bearded <*@eli.users.panix.com>
Subject: Re: undefine @array
Message-Id: <eli$1208221510@qz.little-neck.ny.us>
In comp.lang.perl.misc,
George Mpouras <nospam.gravitalsun@hotmail.com.nospam> wrote:
> I want to delete an array completly.
>
> use strict; use warnings; my
> @array=qw/a b c/;
> @array=();
> undef @array;
> print @array;
That behaves as I expect. Rewriting to make it a bit clearer:
use strict; use warnings;
my @array=qw/a b c/;
print "1: " . @array . "\n";
@array=();
print "2: " . @array . "\n";
undef @array;
print "3: " . @array . "\n";
@array=qw/d e f/;
print "4: " . @array . "\n";
undef @array;
print "5: " . @array . "\n";
Which outputs:
1: 3
2: 0
3: 0
4: 3
5: 0
> I expect a warning like "Global symbol "@array" requires explicit..." but
> it did not compaint
That makes me think you don't want to delete the contents of array,
but make it cease to be a recognized variable. I typically use scope
to achieve that, for those cases where I need it:
use strict; use warnings;
my @array=qw/a b c/;
print "1: " . @array . "\n";
@array=();
print "2: " . @array . "\n";
{
my @new_array=qw/d e f/;
print "3: " . @new_array . "\n";
}
print "4: " . @new_array . "\n";
Which fails to run because
Global symbol "@new_array" requires explicit package name
on the line with q(print "4: ")
Elijah
------
does not use C<my> on the script level, uses C<use vars> instead
------------------------------
Date: Wed, 22 Aug 2012 22:44:39 +0300
From: "George Mpouras" <nospam.gravitalsun@hotmail.com.nospam>
Subject: Re: undefine @array
Message-Id: <k13cr7$12s9$1@news.ntua.gr>
yes I want to clear symbol @array completly but at the same scope
------------------------------
Date: Wed, 22 Aug 2012 19:54:23 +0000 (UTC)
From: tmcd@panix.com (Tim McDaniel)
Subject: Re: undefine @array
Message-Id: <k13dde$733$1@reader1.panix.com>
George Mpouras <nospam.gravitalsun@hotmail.com.nospam> wrote:
> I expect a warning like "Global symbol "@array" requires explicit..."
> but it did not compaint
but later
>yes I want to clear symbol @array completly but at the same scope
These goals are not consistent. As Eli explained, that is not
possible in Perl.
If you clear an array, like
my @array;
...
@array = ();
or
my @array;
...
undef @array;
that sets @array to have zero elements, but @array still exists as a
variable and you will not get a message for using @array later.
"Global symbol ... requires explicit" is an error, not a warning, so
far as I know. The only way to get that error is to declare @array in
a scope that ends, like
{
my @array = (12, 14, 16);
...
}
--
Tim McDaniel, tmcd@panix.com
------------------------------
Date: Tue, 21 Aug 2012 03:36:01 -0600
From: Cal Dershowitz <cal@example.invalid>
Subject: Re: using cpan effectively
Message-Id: <1qOdnccB9qsdy67NnZ2dnUVZ_sSdnZ2d@supernews.com>
On 08/15/2012 04:50 AM, Rainer Weikusat wrote:
> This suggest that your install lacks the 'development package' for the
> ImageMagick libaries and possibly, the library package as well.
>
$ convert DSCN1452.JPG -resize 22% testpic.jpg
convert: no decode delegate for this image format `DSCN1452.JPG' @
error/constitute.c/ReadImage/544.
convert: no images defined `testpic.jpg' @
error/convert.c/ConvertImageCommand/3044.
$
I think I've got the perl side of it, but I'm missing things.
--
Cal
------------------------------
Date: Tue, 21 Aug 2012 06:12:51 -0600
From: Cal Dershowitz <cal@example.invalid>
Subject: Re: using cpan effectively
Message-Id: <y62dnWbjepTf5q7NnZ2dnUVZ_oWdnZ2d@supernews.com>
On 08/17/2012 05:00 AM, Mart van de Wege wrote:
> Cal Dershowitz <cal@example.invalid> writes:
>
>> On 08/15/2012 01:17 AM, Mart van de Wege wrote:
>>> install ImageMagick
>>
>> [x-posted to alt.os.linux.ubuntu]
>>
>> I tried hard today but failed. I understand that people don't want to
>> see logs. I mean other people, usually the barkey ones. I don't find
>> it unpleasant to read a log.
>>
>> Q1) Can anybody who has Imagemagick.h in a place that does something
>> useful tell me where it is on his/her installation?
>
> You have been told the answer. Make sure you have both ImageMagick and
> the development packages installed.
>
> You should be able to find out the exact commands yourself, instead of
> asking other people to do your homework for you.
>
> Mart
>
Welche Antwort bin ich erzaehlt worden?
"Homework" undergoes a strange transition between english and german,
and that said, meine Hausaufgaben sind gefertigt, zumindestens heute.
--
cal
------------------------------
Date: Tue, 21 Aug 2012 02:27:49 -0600
From: Cal Dershowitz <cal@example.invalid>
Subject: using Template effectively
Message-Id: <362dnQQvu_UY267NnZ2dnUVZ_qednZ2d@supernews.com>
Hello Newsgroup,
I got my first points on the scoreboard with the badger book:
$ perl destruct1.pl
People of Earth, your attention please.
This is Prostetnic Vogon Jeltz of the
Galactic Hyperspace Planning Council.
As you will no doubt be aware, the plans
for development of the outlying regions
of the Galaxy require the building of a
hyperspatial express route through your
star system, and regrettably your planet
is one of those scheduled for destruction.
The process will take slightly less than
two of your earth minutes.
Thank you.
$ cat destruct1.pl
#!/usr/bin/perl
use strict;
use warnings;
use Template;
use autodie;
my $tt = Template->new();
my $input = 'destruction.tt';
my $vars = {
planet => 'Earth',
captain => 'Prostetnic Vogon Jeltz',
time => 'two of your earth minutes',
};
$tt->process( $input, $vars )
|| die $tt->error();
$
My ubuntu install is new and still a little wobbly, so I'm looking for
the best methods in going forward.
$ perldoc perltidy
You need to install the perl-doc package to use this program.
$ perldoc Template
You need to install the perl-doc package to use this program.
$
Q1) I thought perl-docs came with with the modules. Am I not
downloading them correctly so as to get as much documentation as they
want to give me?
Q2) Is there a nifty perltidy command to get rid of empty lines? What
would a regex look like that does the same thing?
Thanks for your comment,
--
Cal
------------------------------
Date: Tue, 21 Aug 2012 13:36:40 +0100
From: Rainer Weikusat <rweikusat@mssgmbh.com>
Subject: Re: using Template effectively
Message-Id: <87obm4pgkn.fsf@sapphire.mobileactivedefense.com>
Cal Dershowitz <cal@example.invalid> writes:
[...]
> $ perldoc perltidy
> You need to install the perl-doc package to use this program.
[...]
> Q1) I thought perl-docs came with with the modules. Am I not
> downloading them correctly so as to get as much documentation as they
> want to give me?
perl-doc is a package containing the documentation bundled with the
perl core and the perldoc program. So why don't you just install it
when being asked to?
------------------------------
Date: Tue, 21 Aug 2012 15:10:44 +0100
From: Ben Morrow <ben@morrow.me.uk>
Subject: Re: using Template effectively
Message-Id: <4ghcg9-9lr2.ln1@anubis.morrow.me.uk>
Quoth Cal Dershowitz <cal@example.invalid>:
> Hello Newsgroup,
>
> I got my first points on the scoreboard with the badger book:
I don't wish to be rude, but what made you think anyone was interested?
The first section of your post appears to be completely irrelevant.
> My ubuntu install is new and still a little wobbly, so I'm looking for
> the best methods in going forward.
>
> $ perldoc perltidy
> You need to install the perl-doc package to use this program.
> $ perldoc Template
> You need to install the perl-doc package to use this program.
> $
>
> Q1) I thought perl-docs came with with the modules. Am I not
> downloading them correctly so as to get as much documentation as they
> want to give me?
Linux distributions have a very nasty habit of splitting the perl core
into several packages. You will need to locate and install them all to
get a properly-functioning perl install. Going from the information on
packages.debian.org, it looks like you need
libcgi-fast-perl
libperl-dev
libperl5.14
perl-base
perl-doc
perl-modules
but it's very hard to be sure; I don't know if Ubuntu is the same or
not.
> Q2) Is there a nifty perltidy command to get rid of empty lines? What
> would a regex look like that does the same thing?
perl -ni~ -e'/\S/ and print' file
Or do something equivalent in your editor.
Ben
------------------------------
Date: Tue, 21 Aug 2012 16:13:31 +0100
From: Ben Morrow <ben@morrow.me.uk>
Subject: Re: using Template effectively
Message-Id: <r5lcg9-v5s2.ln1@anubis.morrow.me.uk>
Quoth Ben Morrow <ben@morrow.me.uk>:
>
> Linux distributions have a very nasty habit of splitting the perl core
> into several packages. You will need to locate and install them all to
> get a properly-functioning perl install. Going from the information on
> packages.debian.org, it looks like you need
>
> libcgi-fast-perl
> libperl-dev
> libperl5.14
> perl-base
> perl-doc
> perl-modules
A correction: it looks like you need
perl
as well. I was under the impression perl-base and perl were
alternatives, but apparently you need both.
Ben
------------------------------
Date: Tue, 21 Aug 2012 16:37:08 +0100
From: Rainer Weikusat <rweikusat@mssgmbh.com>
Subject: Re: using Template effectively
Message-Id: <87628cp87v.fsf@sapphire.mobileactivedefense.com>
Ben Morrow <ben@morrow.me.uk> writes:
[...]
> Linux distributions have a very nasty habit of splitting the perl core
> into several packages. You will need to locate and install them all to
> get a properly-functioning perl install.
The opposite of this statement, "perl developers have the nasty habit
of aggegrating all kinds of technically unrelated or only losely
related stuff into a single tarball. Depending on your needs, large
parts of that may be omitted from any properly functioning perl
install", is - of course - just as true or as false.
------------------------------
Date: Tue, 21 Aug 2012 20:42:24 +0200
From: "Peter J. Holzer" <hjp-usenet2@hjp.at>
Subject: Re: using Template effectively
Message-Id: <slrnk37lkg.q9l.hjp-usenet2@hrunkner.hjp.at>
On 2012-08-21 15:13, Ben Morrow <ben@morrow.me.uk> wrote:
> Quoth Ben Morrow <ben@morrow.me.uk>:
>> Linux distributions have a very nasty habit of splitting the perl core
>> into several packages. You will need to locate and install them all to
>> get a properly-functioning perl install.
Fortunately the error message clearly told Cal the name of the missing
package, so locating and installing it shouldn't be that hard.
>> Going from the information on
>> packages.debian.org, it looks like you need
>>
>> libcgi-fast-perl
>> libperl-dev
>> libperl5.14
>> perl-base
>> perl-doc
>> perl-modules
>
> A correction: it looks like you need
>
> perl
>
> as well. I was under the impression perl-base and perl were
> alternatives, but apparently you need both.
Yes, perl-base is a minimal perl package intended to run simple scripts
(it includes only /usr/bin/perl and the most essential core packages)
while perl contains the rest of the core (some of it indirectly through
perl-modules) except the documentation. So if you want to run perl
programs you normally install perl (which sucks in perl-base,
perl-modules and a lot of other stuff through dependencies) and if you
want to develop perl programs you install perl and perl-doc.
I don't think you need libperl5.14 or libperl-dev unless you want to
embed perl in another program. And of course you only need
libcgi-fast-perl if you want to use FastCGI (which doesn't seem to be
the case here but maybe Cal has mentioned it in another thread).
hp
--
_ | Peter J. Holzer | Deprecating human carelessness and
|_|_) | Sysadmin WSR | ignorance has no successful track record.
| | | hjp@hjp.at |
__/ | http://www.hjp.at/ | -- Bill Code on asrg@irtf.org
------------------------------
Date: Tue, 21 Aug 2012 21:56:21 +0100
From: Ben Morrow <ben@morrow.me.uk>
Subject: Re: using Template effectively
Message-Id: <l89dg9-hlu2.ln1@anubis.morrow.me.uk>
Quoth "Peter J. Holzer" <hjp-usenet2@hjp.at>:
>
> I don't think you need libperl5.14 or libperl-dev unless you want to
> embed perl in another program.
Looking again, that's correct, and *really* confusing. Except on i386,
perl-base installs libperl.so.5.14, in the wrong place, and libperl5.14
installs nothing useful at all; on i386, perl-base installs a
statically-linked /usr/bin/perl and libperl5.14 installs a
libperl.so.5.14 (still in the wrong place), which /usr/bin/perl does not
link, but presumably other perl-embedding systems do. Presumably this
also means that on i386 /usr/bin/perl reports $Config{useshrplib} as
false, but there is in fact a libperl.so, which will *still* (I think)
report $Config{useshrplib} as false, since it presumably loads the same
Config.pm.
libperl-dev installs libperl.a and libperl.so (presumably a symlink
rather than a real library?) which are usually only needed to embed
perl; libperl.a is also used to install statically-linked XS modules, but
that's almost never done nowadays except for DynaLoader, which is built
at perl install time.
> And of course you only need
> libcgi-fast-perl if you want to use FastCGI (which doesn't seem to be
> the case here but maybe Cal has mentioned it in another thread).
Well, CGI::Fast has been part of the core forever (since 5004), so CPAN
modules can quite reasonably assume it will be there without declaring
an explicit dependancy. IMHO anything less than 'everything installed by
a normal manual perl install' is risky, unless you will only be using
perl to run things installed from packages (which have presumably been
tested against the various minimal options, and declare their detailed
dependancies properly).
At which point I have to ask: what on Earth is all this supposed to
achieve? A space saving of a few MB, at the cost of leaving users who
don't know all these details with an incomplete mess that can't be
trusted to run anything that hasn't been specifically tested against
that environment? Doesn't seem like a good deal, to me.
Ben
------------------------------
Date: Tue, 21 Aug 2012 22:18:38 +0100
From: Rainer Weikusat <rweikusat@mssgmbh.com>
Subject: Re: using Template effectively
Message-Id: <87ipccndu9.fsf@sapphire.mobileactivedefense.com>
Ben Morrow <ben@morrow.me.uk> writes:
> Quoth "Peter J. Holzer" <hjp-usenet2@hjp.at>:
[...]
>> And of course you only need libcgi-fast-perl if you want to use
>> FastCGI (which doesn't seem to be the case here but maybe Cal has
>> mentioned it in another thread).
>
> Well, CGI::Fast has been part of the core forever (since 5004), so CPAN
> modules can quite reasonably assume it will be there without declaring
> an explicit dependancy.
CPAN modules have been developed with a specific, packaged perl
distribution in mind (and its not that this specific packaged perl
distribution wouldn't change) ...
> IMHO anything less than 'everything installed by a normal manual
> perl install' is risky, unless you will only be using perl to run
> things installed from packages
... and installing modules packaged for this specific distribution
might require additional work when they are supposed to be used with
other distributions.
> At which point I have to ask: what on Earth is all this supposed to
> achieve? A space saving of a few MB, at the cost of leaving users who
> don't know all these details with an incomplete mess that can't be
> trusted to run anything that hasn't been specifically tested against
> that environment?
Actually, no software downloaded from some random location on the
internet, including random other 'software distribution point' can be
'trusted to run' on a system it wasn't tested with. That's why users
of 'Linux distributions' are usually encouraged to stick to software
packaged for their distribution --- it has been tested with it, is
actually considered to be sufficiently bug free for a general release
and there's a 'well-known address' for dealing with bugs, as opposed
fiftythousand e-mail addresses distributed throughout a labyrinth of
four times as many web pages, half of which used to be used by people
who meanwhile died.
------------------------------
Date: Tue, 21 Aug 2012 23:48:50 +0200
From: "Peter J. Holzer" <hjp-usenet2@hjp.at>
Subject: Re: using Template effectively
Message-Id: <slrnk380i4.4km.hjp-usenet2@hrunkner.hjp.at>
On 2012-08-21 20:56, Ben Morrow <ben@morrow.me.uk> wrote:
> At which point I have to ask: what on Earth is all this supposed to
> achieve? A space saving of a few MB,
About 50 MB, actually, which is about 1/4 of the size of a minimal
Debian installation. Given the choice between increasing this size by
25% or replacing every perl perl essential perl script by one in a
different language, most Debian developers would probably prefer the
latter. Much of this is historical, of course, but there are still
embedded systems with very little space.
> at the cost of leaving users who don't know all these details with an
> incomplete mess that can't be trusted to run anything that hasn't been
> specifically tested against that environment?
Frankly, anyone who can't be bothered to type "apt-get install
libfoo-bar-perl" when a perl script complains about a missing Foo::Bar
module shouldn't even try to use CPAN. He's almost guaranteed to trip
over the first module which includes some XS code.
hp
--
_ | Peter J. Holzer | Deprecating human carelessness and
|_|_) | Sysadmin WSR | ignorance has no successful track record.
| | | hjp@hjp.at |
__/ | http://www.hjp.at/ | -- Bill Code on asrg@irtf.org
------------------------------
Date: Tue, 21 Aug 2012 23:54:33 +0100
From: Ben Morrow <ben@morrow.me.uk>
Subject: Re: using Template effectively
Message-Id: <96gdg9-stv2.ln1@anubis.morrow.me.uk>
Quoth "Peter J. Holzer" <hjp-usenet2@hjp.at>:
> On 2012-08-21 20:56, Ben Morrow <ben@morrow.me.uk> wrote:
> > At which point I have to ask: what on Earth is all this supposed to
> > achieve? A space saving of a few MB,
>
> About 50 MB, actually, which is about 1/4 of the size of a minimal
> Debian installation. Given the choice between increasing this size by
> 25% or replacing every perl perl essential perl script by one in a
> different language, most Debian developers would probably prefer the
> latter. Much of this is historical, of course, but there are still
> embedded systems with very little space.
I don't actually have much of a problem with Debian splitting the perl
distribution for their own internal use, provided they are prepared to
deal with the consequences. But 'apt-get install perl' should install a
complete perl distribution, including everything, in way which is
consistent with the installed Config.pm. Otherwise we just get people
reporting bugs to p5p and CPAN modules which are actually caused by
Debian packaging incompatibilities. (None of this is specific to Debian,
of course, nor to Linux; ActiveState have been guilty of the same tricks
from time to time.)
> > at the cost of leaving users who don't know all these details with an
> > incomplete mess that can't be trusted to run anything that hasn't been
> > specifically tested against that environment?
>
> Frankly, anyone who can't be bothered to type "apt-get install
> libfoo-bar-perl" when a perl script complains about a missing Foo::Bar
> module shouldn't even try to use CPAN. He's almost guaranteed to trip
> over the first module which includes some XS code.
In which case the Debian package should include a CPAN.pm modified to
loudly print 'DO NOT USE THIS. USE .debS INSTEAD, OR BUILD YOUR OWN
PERL.' every time it's used, and should document somewhere appropriate
and obvious that the perl package is not entirely compatible with a
standard perl install, and should not be used for normal Perl
development.
Ben
------------------------------
Date: Wed, 22 Aug 2012 01:51:40 +0100
From: Rainer Weikusat <rweikusat@mssgmbh.com>
Subject: Re: using Template effectively
Message-Id: <87pq6jycir.fsf@sapphire.mobileactivedefense.com>
Ben Morrow <ben@morrow.me.uk> writes:
[...]
>> Frankly, anyone who can't be bothered to type "apt-get install
>> libfoo-bar-perl" when a perl script complains about a missing Foo::Bar
>> module shouldn't even try to use CPAN. He's almost guaranteed to trip
>> over the first module which includes some XS code.
>
> In which case the Debian package should include a CPAN.pm modified to
> loudly print 'DO NOT USE THIS. USE .debS INSTEAD, OR BUILD YOUR OWN
> PERL.' every time it's used,
That would be rather annoying, given that some people use cpan because
they need or want to, not just because they've been tricked into doing
it for no good reason ...
------------------------------
Date: Wed, 22 Aug 2012 09:49:50 +0200
From: Mart van de Wege <mvdwege@mail.com>
Subject: Re: using Template effectively
Message-Id: <861uizpdr5.fsf@gaheris.avalon.lan>
Ben Morrow <ben@morrow.me.uk> writes:
> But 'apt-get install perl' should install a complete perl
> distribution, including everything, in way which is consistent with
> the installed Config.pm.
It does. 'perl' drags in 'perl-modules' as well, giving a complete perl
install.
It *doesn't* pull in perl-doc by default, but anyone installing Debian
*should* known that Debian doesn't auto-install documentation packages
anyway.
Of course, anyone installing Ubuntu is not supposed to worry about that,
but that's *Ubuntu's* fault, for not patching their packages for this
use case.
--
"We will need a longer wall when the revolution comes."
--- AJS, quoting an uncertain source.
------------------------------
Date: Wed, 22 Aug 2012 09:41:57 +0300
From: Eric Pozharski <whynot@pozharski.name>
Subject: Re: using Template effectively
Message-Id: <slrnk38vpl.pfr.whynot@orphan.zombinet>
with <96gdg9-stv2.ln1@anubis.morrow.me.uk> Ben Morrow wrote:
*SKIP* [[ jeez ]]
Then,.. I assume, you propos to raid debian, or something?
--
Torvalds' goal for Linux is very simple: World Domination
Stallman's goal for GNU is even simpler: Freedom
------------------------------
Date: 6 Apr 2001 21:33:47 GMT (Last modified)
From: Perl-Users-Request@ruby.oce.orst.edu (Perl-Users-Digest Admin)
Subject: Digest Administrivia (Last modified: 6 Apr 01)
Message-Id: <null>
Administrivia:
To submit articles to comp.lang.perl.announce, send your article to
clpa@perl.com.
Back issues are available via anonymous ftp from
ftp://cil-www.oce.orst.edu/pub/perl/old-digests.
#For other requests pertaining to the digest, send mail to
#perl-users-request@ruby.oce.orst.edu. Do not waste your time or mine
#sending perl questions to the -request address, I don't have time to
#answer them even if I did know the answer.
------------------------------
End of Perl-Users Digest V11 Issue 3764
***************************************