GSP
Quick Navigator

Search Site

Unix VPS
A - Starter
B - Basic
C - Preferred
D - Commercial
MPS - Dedicated
Previous VPSs
* Sign Up! *

Support
Contact Us
Online Help
Handbooks
Domain Status
Man Pages

FAQ
Virtual Servers
Pricing
Billing
Technical

Network
Facilities
Connectivity
Topology Map

Miscellaneous
Server Agreement
Year 2038
Credits
 

USA Flag

 

 

Man Pages
Data::Object::Name(3) User Contributed Perl Documentation Data::Object::Name(3)

Data::Object::Name

Name Class for Perl 5

  use Data::Object::Name;

  my $name = Data::Object::Name->new('FooBar/Baz');

This package provides methods for converting "name" strings.

This package implements the following methods:

  dist() : Str

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

dist example #1
  # given: synopsis

  my $dist = $name->dist; # FooBar-Baz
    

  file() : Str

The file method returns a file representation of the name.

file example #1
  # given: synopsis

  my $file = $name->file; # foo_bar__baz
    

  format(Str $method, Str $format) : Str

The format method calls the specified method passing the result to the core "sprintf" function with itself as an argument.

format example #1
  # given: synopsis

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

  label() : Str

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

label example #1
  # given: synopsis

  my $label = $name->label; # FooBar_Baz
    

  lookslike_a_file() : Bool

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

lookslike_a_file example #1
  # given: synopsis

  my $is_file = $name->lookslike_a_file; # falsy
    

  lookslike_a_label() : Bool

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

lookslike_a_label example #1
  # given: synopsis

  my $is_label = $name->lookslike_a_label; # falsy
    

  lookslike_a_package() : Bool

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

lookslike_a_package example #1
  # given: synopsis

  my $is_package = $name->lookslike_a_package; # falsy
    

  lookslike_a_path() : Bool

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

lookslike_a_path example #1
  # given: synopsis

  my $is_path = $name->lookslike_a_path; # truthy
    

  lookslike_a_pragma() : Bool

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

lookslike_a_pragma example #1
  # given: synopsis

  my $is_pragma = $name->lookslike_a_pragma; # falsy
    
lookslike_a_pragma example #2
  use Data::Object::Name;

  my $name = Data::Object::Name->new('[strict]');

  my $is_pragma = $name->lookslike_a_pragma; # truthy
    

  new(Str $arg) : Object

The new method instantiates the class and returns an object.

new example #1
  use Data::Object::Name;

  my $name = Data::Object::Name->new;
    
new example #2
  use Data::Object::Name;

  my $name = Data::Object::Name->new('FooBar');
    

  package() : Str

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

package example #1
  # given: synopsis

  my $package = $name->package; # FooBar::Baz
    

  path() : Str

The path method returns a path representation of the name.

path example #1
  # given: synopsis

  my $path = $name->path; # FooBar/Baz
    

Al Newkirk, "awncorp@cpan.org"

Copyright (C) 2011-2019, Al Newkirk, et al.

This is free software; you can redistribute it and/or modify it under the terms of the The Apache License, Version 2.0, as elucidated in the "license file" <https://github.com/iamalnewkirk/data-object-name/blob/master/LICENSE>.

Wiki <https://github.com/iamalnewkirk/data-object-name/wiki>

Project <https://github.com/iamalnewkirk/data-object-name>

Initiatives <https://github.com/iamalnewkirk/data-object-name/projects>

Milestones <https://github.com/iamalnewkirk/data-object-name/milestones>

Contributing <https://github.com/iamalnewkirk/data-object-name/blob/master/CONTRIBUTE.md>

Issues <https://github.com/iamalnewkirk/data-object-name/issues>

2020-05-07 perl v5.32.1

Search for    or go to Top of page |  Section 3 |  Main Index

Powered by GSP Visit the GSP FreeBSD Man Page Interface.
Output converted with ManDoc.