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: new 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 new method constructs an instance of the package.
new(any @args) (Venus::Name)
{ since => '4.15', }
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
69 POD Errors
The following errors were encountered while parsing the POD:
- Around line 14:
Unknown directive: =name
- Around line 22:
Unknown directive: =tagline
- Around line 30:
Unknown directive: =abstract
- Around line 38:
Unknown directive: =includes
- Around line 59:
Unknown directive: =synopsis
- Around line 78:
Unknown directive: =description
- Around line 87:
Unknown directive: =inherits
- Around line 95:
Unknown directive: =integrates
- Around line 106:
Unknown directive: =method
- Around line 110:
Unknown directive: =signature
- Around line 114:
Unknown directive: =metadata
- Around line 138:
Unknown directive: =method
- Around line 142:
Unknown directive: =signature
- Around line 146:
Unknown directive: =metadata
- Around line 170:
Unknown directive: =method
- Around line 175:
Unknown directive: =signature
- Around line 179:
Unknown directive: =metadata
- Around line 203:
Unknown directive: =method
- Around line 207:
Unknown directive: =signature
- Around line 211:
Unknown directive: =metadata
- Around line 235:
Unknown directive: =method
- Around line 242:
Unknown directive: =signature
- Around line 246:
Unknown directive: =metadata
- Around line 270:
Unknown directive: =method
- Around line 274:
Unknown directive: =signature
- Around line 278:
Unknown directive: =metadata
- Around line 302:
Unknown directive: =method
- Around line 306:
Unknown directive: =signature
- Around line 310:
Unknown directive: =metadata
- Around line 333:
Unknown directive: =method
- Around line 338:
Unknown directive: =signature
- Around line 342:
Unknown directive: =metadata
- Around line 365:
Unknown directive: =method
- Around line 370:
Unknown directive: =signature
- Around line 374:
Unknown directive: =metadata
- Around line 397:
Unknown directive: =method
- Around line 401:
Unknown directive: =signature
- Around line 405:
Unknown directive: =metadata
- Around line 428:
Unknown directive: =method
- Around line 432:
Unknown directive: =signature
- Around line 436:
Unknown directive: =metadata
- Around line 459:
Unknown directive: =method
- Around line 463:
Unknown directive: =signature
- Around line 467:
Unknown directive: =metadata
- Around line 485:
=cut found outside a pod block. Skipping to next block.
- Around line 506:
=cut found outside a pod block. Skipping to next block.
- Around line 527:
=cut found outside a pod block. Skipping to next block.
- Around line 539:
Unknown directive: =method
- Around line 543:
Unknown directive: =signature
- Around line 547:
Unknown directive: =metadata
- Around line 571:
Unknown directive: =method
- Around line 575:
Unknown directive: =signature
- Around line 579:
Unknown directive: =metadata
- Around line 603:
Unknown directive: =operator
- Around line 619:
=cut found outside a pod block. Skipping to next block.
- Around line 629:
Unknown directive: =operator
- Around line 645:
=cut found outside a pod block. Skipping to next block.
- Around line 668:
=cut found outside a pod block. Skipping to next block.
- Around line 678:
Unknown directive: =operator
- Around line 694:
=cut found outside a pod block. Skipping to next block.
- Around line 717:
=cut found outside a pod block. Skipping to next block.
- Around line 727:
Unknown directive: =operator
- Around line 743:
=cut found outside a pod block. Skipping to next block.
- Around line 753:
Unknown directive: =operator
- Around line 769:
=cut found outside a pod block. Skipping to next block.
- Around line 787:
=cut found outside a pod block. Skipping to next block.
- Around line 797:
Unknown directive: =operator
- Around line 813:
=cut found outside a pod block. Skipping to next block.
- Around line 819:
Unknown directive: =partials