Nephia::Context - Context Class for Nephia
HASHREF plus alpha
my $context = Nephia::Context->new( foo => 'bar', hoge => [qw/fuga piyo/] ); $context->get('foo'); ### 'bar' $context->get('hoge'); ### ['fuga', 'piyo']; $context->set(fizzbuzz => sub { my $x = ''; $x .= 'fizz' if ! $x % 3; $x .= 'buzz' if ! $x % 5; $x .= $_[0] unless $x; return $x; }); $context->delete('hoge'); $context->get('hoge') ### undef $context->get('fizzbuzz')->(12) ### 'fizz'
my $context = Nephia::Context->new( %items );
Instantiate Nephia::Context. Then, store specified items.
my $item = $context->get( $name );
Fetch specified item that stored.
$context->set( $name => $value );
Store specified item.
$context->delete( $name );
Delete a specified item.
ytnobody <ytnobody@gmail.com>
To install Nephia, copy and paste the appropriate command in to your terminal.
cpanm
cpanm Nephia
CPAN shell
perl -MCPAN -e shell install Nephia
For more information on module installation, please visit the detailed CPAN module installation guide.