Venus::Name

Name Class

Name Class for Perl 5

method: default method: dist method: explain method: file method: format method: label method: lookslike_a_file method: lookslike_a_label method: lookslike_a_package method: lookslike_a_path method: lookslike_a_pragma method: package method: path

package main;

use Venus::Name;

my $name = Venus::Name->new('Foo/Bar');

# $name->package;

This package provides methods for parsing and formatting package namespace strings.

Venus::Kind::Utility

Venus::Role::Accessible Venus::Role::Buildable Venus::Role::Explainable Venus::Role::Valuable

The default method returns the default value, i.e. 'Venus'.

default() (string)

{ since => '0.01', }

=example-1 default

# given: synopsis;

my $default = $name->default;

# "Venus"

The dist method returns a package distribution representation of the name.

dist() (string)

{ since => '0.01', }

=example-1 dist

# given: synopsis;

my $dist = $name->dist;

# "Foo-Bar"

The explain method returns the package name and is used in stringification operations.

explain() (string)

{ since => '0.01', }

=example-1 explain

# given: synopsis;

my $explain = $name->explain;

# "Foo/Bar"

The file method returns a file representation of the name.

file() (string)

{ since => '0.01', }

=example-1 file

# given: synopsis;

my $file = $name->file;

# "foo__bar"

The format method calls the specified method passing the result to the core "sprintf" function with itself as an argument. This method supports dispatching, i.e. providing a method name and arguments whose return value will be acted on by this method.

format(string $method, string $format) (string)

{ since => '0.01', }

=example-1 format

# given: synopsis;

my $format = $name->format('file', '%s.t');

# "foo__bar.t"

The label method returns a label (or constant) representation of the name.

label() (string)

{ since => '0.01', }

=example-1 label

# given: synopsis;

my $label = $name->label;

# "Foo_Bar"

The lookslike_a_file method returns truthy if its state resembles a filename.

lookslike_a_file() (string)

{ since => '0.01', }

=example-1 lookslike_a_file

# given: synopsis;

my $lookslike_a_file = $name->lookslike_a_file;

# ""

The lookslike_a_label method returns truthy if its state resembles a label (or constant).

lookslike_a_label() (string)

{ since => '0.01', }

=example-1 lookslike_a_label

# given: synopsis;

my $lookslike_a_label = $name->lookslike_a_label;

# ""

The lookslike_a_package method returns truthy if its state resembles a package name.

lookslike_a_package() (string)

{ since => '0.01', }

=example-1 lookslike_a_package

# given: synopsis;

my $lookslike_a_package = $name->lookslike_a_package;

# ""

The lookslike_a_path method returns truthy if its state resembles a file path.

lookslike_a_path() (string)

{ since => '0.01', }

=example-1 lookslike_a_path

# given: synopsis;

my $lookslike_a_path = $name->lookslike_a_path;

# 1

The lookslike_a_pragma method returns truthy if its state resembles a pragma.

lookslike_a_pragma() (string)

{ since => '0.01', }

=example-1 lookslike_a_pragma

# given: synopsis;

my $lookslike_a_pragma = $name->lookslike_a_pragma;

# ""

The package method returns a package name representation of the name given.

package() (string)

{ since => '0.01', }

=example-1 package

# given: synopsis;

my $package = $name->package;

# "Foo::Bar"

The path method returns a path representation of the name.

path() (string)

{ since => '0.01', }

=example-1 path

# given: synopsis;

my $path = $name->path;

# "Foo/Bar"

This package overloads the . operator.

This package overloads the eq operator.

This package overloads the ne operator.

This package overloads the qr operator.

This package overloads the "" operator.

This package overloads the ~~ operator.

t/Venus.t: present: authors t/Venus.t: present: license

63 POD Errors

The following errors were encountered while parsing the POD:

Around line 13:

Unknown directive: =name

Around line 21:

Unknown directive: =tagline

Around line 29:

Unknown directive: =abstract

Around line 37:

Unknown directive: =includes

Around line 57:

Unknown directive: =synopsis

Around line 76:

Unknown directive: =description

Around line 85:

Unknown directive: =inherits

Around line 93:

Unknown directive: =integrates

Around line 104:

Unknown directive: =method

Around line 108:

Unknown directive: =signature

Around line 112:

Unknown directive: =metadata

Around line 136:

Unknown directive: =method

Around line 140:

Unknown directive: =signature

Around line 144:

Unknown directive: =metadata

Around line 168:

Unknown directive: =method

Around line 173:

Unknown directive: =signature

Around line 177:

Unknown directive: =metadata

Around line 201:

Unknown directive: =method

Around line 205:

Unknown directive: =signature

Around line 209:

Unknown directive: =metadata

Around line 233:

Unknown directive: =method

Around line 240:

Unknown directive: =signature

Around line 244:

Unknown directive: =metadata

Around line 268:

Unknown directive: =method

Around line 272:

Unknown directive: =signature

Around line 276:

Unknown directive: =metadata

Around line 300:

Unknown directive: =method

Around line 304:

Unknown directive: =signature

Around line 308:

Unknown directive: =metadata

Around line 331:

Unknown directive: =method

Around line 336:

Unknown directive: =signature

Around line 340:

Unknown directive: =metadata

Around line 363:

Unknown directive: =method

Around line 368:

Unknown directive: =signature

Around line 372:

Unknown directive: =metadata

Around line 395:

Unknown directive: =method

Around line 399:

Unknown directive: =signature

Around line 403:

Unknown directive: =metadata

Around line 426:

Unknown directive: =method

Around line 430:

Unknown directive: =signature

Around line 434:

Unknown directive: =metadata

Around line 457:

Unknown directive: =method

Around line 461:

Unknown directive: =signature

Around line 465:

Unknown directive: =metadata

Around line 489:

Unknown directive: =method

Around line 493:

Unknown directive: =signature

Around line 497:

Unknown directive: =metadata

Around line 521:

Unknown directive: =operator

Around line 537:

=cut found outside a pod block. Skipping to next block.

Around line 547:

Unknown directive: =operator

Around line 563:

=cut found outside a pod block. Skipping to next block.

Around line 586:

=cut found outside a pod block. Skipping to next block.

Around line 596:

Unknown directive: =operator

Around line 612:

=cut found outside a pod block. Skipping to next block.

Around line 635:

=cut found outside a pod block. Skipping to next block.

Around line 645:

Unknown directive: =operator

Around line 661:

=cut found outside a pod block. Skipping to next block.

Around line 671:

Unknown directive: =operator

Around line 687:

=cut found outside a pod block. Skipping to next block.

Around line 705:

=cut found outside a pod block. Skipping to next block.

Around line 715:

Unknown directive: =operator

Around line 731:

=cut found outside a pod block. Skipping to next block.

Around line 737:

Unknown directive: =partials