develooper Front page | perl.perl5.porters | Postings from October 2011

Re: [perl #102064] [PATCH] Fix use inaccuracy in perlmod.pm

Thread Previous | Thread Next
From:
Dr.Ruud
Date:
October 30, 2011 01:34
Subject:
Re: [perl #102064] [PATCH] Fix use inaccuracy in perlmod.pm
Message ID:
4EABD519.9070908@isolution.nl
On 2011-10-29 01:52, chromatic wrote:
> On Tuesday, October 25, 2011 at 08:18 AM, Father Chrysostomos wrote:

>> To break it, you would have to create a subroutine called MODULE, which
>> would break your version as well.  I fail to see how it is an improvement.
>
> My mistake; I attached the wrong patch.
>
> I had a reluctance to change the form of "require MODULE" to "require
> 'MODULE.pm'", but subsequent paragraphs in the document seem to read even
> better with this patch.

Not 'exactly equivalent':

$ perl -we '
   use DBI;
   DBI::->import;
'

$ perl -we '
   require DBI;
   "DBI"->import;
   DBI::->import;
'

$ perl -we '
   require "DBI.pm";
   "DBI"->import;
   DBI::->import;
'
Bareword "DBI::" refers to nonexistent package at -e line 4.

-- 
Ruud

Thread Previous | Thread Next


nntp.perl.org: Perl Programming lists via nntp and http.
Comments to Ask Bjørn Hansen at ask@perl.org | Group listing | About