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
Venus::Role::Reflectable(3) User Contributed Perl Documentation Venus::Role::Reflectable(3)

Venus::Role::Reflectable - Reflectable Role

Reflectable Role for Perl 5

  package Example;
  use Venus::Class;
  with 'Venus::Role::Reflectable';
  sub test {
    true
  }
  package main;
  my $example = Example->new;
  # $example->space;

This package modifies the consuming package and provides methods for introspecting the object and its underlying package.

This package provides the following methods:

  class() (string)

The class method returns the class name for the given class or object.

Since 0.01

class example 1
  # given: synopsis;
  my $class = $example->class;
  # "Example"
    

  meta() (Venus::Meta)

The meta method returns a Venus::Meta object for the given object.

Since 1.23

meta example 1
  # given: synopsis;
  my $meta = $example->meta;
  # bless({name => "Example"}, "Venus::Meta")
    

  reify(string | coderef $code, any @args) (object)

The reify method dispatches the method call or executes the callback and returns the result as a value object.

Since 1.23

reify example 1
  # given: synopsis
  package main;
  my $reify = $example->reify;
  # bless({}, "Example")
    
reify example 2
  # given: synopsis
  package main;
  my $reify = $example->reify('class');
  # bless({value => "Example"}, "Venus::String")
    
reify example 3
  # given: synopsis
  package main;
  my $reify = $example->reify('test');
  # bless({value => 1}, "Venus::Boolean")
    

  space() (Venus::Space)

The space method returns a Venus::Space object for the given object.

Since 0.01

space example 1
  # given: synopsis;
  my $space = $example->space;
  # bless({ value => "Example" }, "Venus::Space")
    

  type(string | coderef $code, any @args) (Venus::Type)

The type method dispatches the method call or executes the callback and returns the result as a Venus::Type object.

Since 0.01

type example 1
  # given: synopsis;
  my $type = $example->type;
  # bless({ value => bless({}, "Example") }, "Venus::Type")
    
type example 2
  # given: synopsis;
  my $type = $example->type('class');
  # bless({ value => "Example" }, "Venus::Type")
    

Awncorp, "awncorp@cpan.org"

Copyright (C) 2022, Awncorp, "awncorp@cpan.org".

This program is free software, you can redistribute it and/or modify it under the terms of the Apache license version 2.0.

2023-11-27 perl v5.40.2

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.