develooper Front page | perl.perl6.language | Postings from May 2005

Re: Syntax of using Perl5 modules?

Thread Previous | Thread Next
From:
Terrence Brannon
Date:
May 25, 2005 07:43
Subject:
Re: Syntax of using Perl5 modules?
Message ID:
6mmzqjz7qq.fsf@Abulafia.hcoop.net
Autrijus Tang <autrijus@autrijus.org> writes:

> So, this now works in Pugs with (with a "env PUGS_EMBED=perl5" build):
>
>     use Digest--perl5;
>
>     my $cxt = Digest.SHA1;
>     $cxt.add('Pugs!');
>
>     # This prints: 66db83c4c3953949a30563141f08a848c4202f7f
>     say $cxt.hexdigest;
>
> This includes the "Digest.pm" from Perl 5.  DBI.pm, CGI.pm etc will
> also work.
>
> Now my question is, is my choice of using the "perl5" namespace indicator a 
> sane way to handle this? 

I was getting used to ":" as an adverbial and adjective modifier. So I
would think the above would be:

use Digest:perl5

but that would be confusing given that two colons separate parts of a
package namespace.

-- 
	Carter's Compass: I know I'm on the right track when,
	   by deleting something, I'm adding functionality.


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