App-revealup

 view release on metacpan or  search on metacpan

lib/App/revealup/base.pm  view on Meta::CPAN

package App::revealup::base;
use strict;
use warnings;

sub import {
    my $caller = caller(0);
    no strict 'refs';
    *{"${caller}::has"} = sub { attr($caller, @_) };
    *{"${caller}::new"} = sub {
        my ($klass, %opt) = @_;
        for my $key (keys %opt) {
            attr($caller, $key, $opt{$key}) if $opt{$key};
        }
        return bless \%opt, $klass;
    };
    strict->import;



( run in 0.350 second using v1.01-cache-2.11-cpan-cc502c75498 )