BSD Ports

devel/p5-Lexical-Import 0.002_2 FreeBSD

Clean imports from package-exporting modules

System
FreeBSD
Repository
FreeBSD ports
Maintainer
[email protected]
License
ART10, GPLv1+
Categories
devel, perl5
Package size
13.4 KiB, 24.6 KiB installed

Description

Lexical::Import allows functions and other items, from a separate module, to be imported into the lexical namespace (as implemented by Lexical::Var), when the exporting module exports non-lexically to a package in the traditional manner. This is a translation layer, to help code written in the new way to use modules written in the old way.

A lexically-imported item takes effect from the end of the definition statement up to the end of the immediately enclosing block, except where it is shadowed within a nested block. This is the same lexical scoping that the my, our, and state keywords supply. Within its scope, any use of the single-part name of the item (e.g., "$foo") refers directly to that item, regardless of what is in any package. Explicitly package-qualified names (e.g., "$main::foo") still refer to the package. There is no conflict between a lexical name definition and the same name in any package.

This mechanism only works on Perl 5.11.2 and later. Prior to that, it is impossible for lexical subroutine imports to work for bareword subroutine calls. (See "BUGS" in Lexical::Var for details.) Other kinds of lexical importing are possible on earlier Perls, but because this is such a critical kind of usage in most code, this module will ensure that it works, for convenience. If the limited lexical importing is desired on earlier Perls, use Lexical::Var directly.

In the other systems

SystemPortVersion
FreeBSDdevel/p5-Lexical-Import0.002_2
DragonFlydevel/p5-Lexical-Import0.002_2
HardenedBSDdevel/p5-Lexical-Import0.002_2
GhostBSDdevel/p5-Lexical-Import0.002_2

Install

Binary package:

pkg install p5-Lexical-Import

From the ports tree:

cd /usr/ports/devel/p5-Lexical-Import/ && make install clean

To depend on this port in another port's Makefile:

RUN_DEPENDS=	p5-Lexical-Import>0:devel/p5-Lexical-Import

Packages

The version each package repository carries. “-” means the repository builds no package of it, “n/a” that there is no such repository.

Repositoryaarch64amd64armv6armv7i386
FreeBSD:14:latest0.002_20.002_20.002_20.002_20.002_2
FreeBSD:14:quarterly0.002_20.002_2n/a0.002_20.002_2
FreeBSD:15:latest0.002_20.002_2n/a0.002_20.002_2
FreeBSD:15:quarterly0.002_20.002_2n/an/an/a
FreeBSD:16:latest0.002_20.002_2n/an/an/a
FreeBSD:16:quarterlyn/an/an/an/an/a

Dependencies

As this port's Makefile names them.

Build 3

Runtime 3

Test 2

The full lists below include those, and their dependencies in turn.

Build dependencies 5
Run dependencies 4

No port depends on this one.

Configuration

No options to configure.

USES
perl5
Service scripts
none

Files

pkg-plist 3
  • %%SITE_ARCH%%/Lexical/Import.pm
  • %%SITE_ARCH%%/auto/Lexical/Import/Import.so
  • %%PERL5_MAN3%%/Lexical::Import.3.gz
distinfo 1
FileSizeSHA256
Lexical-Import-0.002.tar.gz114325a555f870f09776d2d94b222a07c6a549896da751175bcc6714f1160b21d11fe
Master sites 1
  • CPAN

Commit history 0

No commits in the history this site was built from.