Devel-Trepan

 view release on metacpan or  search on metacpan

lib/Devel/Trepan/Position.pm  view on Meta::CPAN

# Copyright (C) 2011-2014 Rocky Bernstein <rocky@cpan.org>
use warnings; use strict;

use Class::Struct;
no strict 'subs';
struct Devel::Trepan::Position => {pkg   => '$', filename => '$', line => '$',
				   event => '$'};
use strict 'subs';

package Devel::Trepan::Position;
sub eq($$)
{
    my ($self, $other) = @_;
    return 0 unless defined $self && defined $other;
    return (
            $self->filename eq $other->filename
            && $self->line eq $other->line
            && $self->event eq $other->event)
}

sub inspect($) {

lib/Devel/Trepan/Util.pm  view on Meta::CPAN

@EXPORT    = qw( hash_merge safe_repr uniq_abbrev extract_expression
                 parse_eval_suffix parse_eval_sigil
                 YES NO YES_OR_NO @YN bool2YN);
@ISA = qw(Exporter);

use constant YES => qw(y yes oui si yep ja);
@YN = YES;
use constant NO => qw(n no non nope nein);
push(@YN, NO);

sub YN($)
{
    my $response = shift;
    !!grep(/^${response}$/i, @YN);
}

# Return 'Yes' for True and 'No' for False, and ?? for anything else
sub bool2YN($)
{
    my $bool = shift;
    $bool ? 'Yes' : 'No';



( run in 3.768 seconds using v1.01-cache-2.11-cpan-364913b4093 )