The Perl Toolchain Summit needs more sponsors. If your company depends on Perl, please support this very important event.

NAME

Data::Object::Scalar

ABSTRACT

Data-Object Scalar Class

SYNOPSIS

  use Data::Object::Scalar;

  my $scalar = Data::Object::Scalar->new(\*main);

DESCRIPTION

Data::Object::Scalar provides routines for operating on Perl 5 scalar objects. Scalar methods work on data that meets the criteria for being a scalar.

METHODS

This package implements the following methods.

new

  # given \*main

  my $scalar = Data::Object::Scalar->new(\*main);

The new method expects a scalar reference and returns a new class instance.

roles

  # given $scalar

  $scalar->roles;

The roles method returns the list of roles attached to object. This method returns a Data::Object::Array object.

rules

  my $rules = $scalar->rules;

The rules method returns consumed rules.

defined

  # given $scalar

  $scalar->defined; # 1

The defined method returns true if the object represents a value that meets the criteria for being defined, otherwise it returns false. This method returns a Data::Object::Number object.

eq

  # given $scalar

  $scalar->eq; # exception thrown

This method is a consumer requirement but has no function and is not implemented. This method will throw an exception if called.

ge

  # given $scalar

  $scalar->ge; # exception thrown

This method is a consumer requirement but has no function and is not implemented. This method will throw an exception if called.

gt

  # given $scalar

  $scalar->gt; # exception thrown

This method is a consumer requirement but has no function and is not implemented. This method will throw an exception if called.

le

  # given $scalar

  $scalar->le; # exception thrown

This method is a consumer requirement but has no function and is not implemented. This method will throw an exception if called.

lt

  # given $scalar

  $scalar->lt; # exception thrown

This method is a consumer requirement but has no function and is not implemented. This method will throw an exception if called.

ne

  # given $scalar

  $scalar->ne; # exception thrown

This method is a consumer requirement but has no function and is not implemented. This method will throw an exception if called.

ROLES

This package inherits all behavior from the folowing role(s):

RULES

This package adheres to the requirements in the folowing rule(s):