Name

SPVM::FindBin - Locate Directory of Original Program

Description

SPVM::FindBin is the FindBin class in SPVM language.

Locates the full path to the script bin directory to allow the use of paths relative to the bin directory.

Usage

use FindBin;

FindBin->init;

my $Bin = FindBin->Bin;
my $Script = FindBin->Script;
my $RealBin = FindBin->RealBin;
my $RealScript = FindBin->RealScript;

Class Variables

Bin

our $Bin : ro string;

The path to bin directory from where script was invoked.

Script

our $Script : ro string;

The basename of script from which perl was invoked

RealBin

our $RealBin : ro string;

"Bin" with all links resolved

RealScript

our $RealScript : ro string;

"Script" with all links resolved

Class Methods

init

static method init : void ();

Initializes the "Bin" in $Bin, "Script" in $Script, "RealBin" in $RealBin, "RealScript" in $RealScript class variables.

again

static method again : void ();

The same as "init".

Repository

SPVM::FindBin - Github

See Also

FindBin

SPVM::FindBin is the Perl's FindBin porting to SPVM.

Author

Yuki Kimoto kimoto.yuki@gmail.com

Copyright & License

Copyright (c) 2023 Yuki Kimoto

MIT License