Binding

 view release on metacpan or  search on metacpan

META.yml  view on Meta::CPAN

module_name: Binding
name: Binding
no_index:
  directory:
    - inc
    - t
    - xt
requires:
  Data::Dump: 1.14
  Devel::Caller: 2.03
  PadWalker: 1.7
  UNIVERSAL::isa: 0
  perl: 5.8.0
resources:
  license: http://opensource.org/licenses/mit-license.php
version: 0.06

Makefile.PL  view on Meta::CPAN

use inc::Module::Install;

all_from 'lib/Binding.pm';

build_requires  'Test::More'        => '0.42';

requires
    'UNIVERSAL::isa'   => 0,
    'PadWalker'        => 1.7,
    'Devel::Caller'    => 2.03,
    'Data::Dump'       => 1.14;

tests 't/*.t';
author_tests 'xt/*.t';

WriteAll;


README  view on Meta::CPAN


    perl Makefile.PL
    make
    make test
    make install



DEPENDENCIES

PadWalker, Data::Dump, Devel::Caller

COPYRIGHT AND LICENCE

Copyright (C) 2008, Kang-min Liu

This is free software, licensed under:

    The MIT (X11) License

lib/Binding.pm  view on Meta::CPAN

package Binding;

use warnings;
use strict;
use PadWalker qw(peek_my peek_our peek_sub closed_over);
use Devel::Caller qw(caller_cv);
use Data::Dump qw(pp);

use 5.008;

our $VERSION = '0.06';

sub of_caller {
    my ($class, $level) = @_;
    $level = 1 unless defined($level);

lib/Binding.pm  view on Meta::CPAN


Return the value of the variable named $name in the specified scope.

=item my_vars

Returns all variables declared with "my" in the given binding.

Returns a hashref, which keys are variable names and values are
references to variable values.

See C<peek_my> function in L<PadWalker>.

=item our_vars

Returns all variables declared with "our" that's visible in the given
binding.

Returns a hashref, which keys are variable names and values are
references to variable values.

See C<peek_our> function in L<PadWalker>.

=back

=head1 DEPENDENCIES

L<PadWalker>, L<Data::Dump>, L<Devel::Caller>


=head1 BUGS AND LIMITATIONS

No bugs have been reported.

Please report any bugs or feature requests to
C<bug-binding@rt.cpan.org>, or through the web interface at
L<http://rt.cpan.org>.



( run in 0.392 second using v1.01-cache-2.11-cpan-05444aca049 )