Test-WriteVariants

 view release on metacpan or  search on metacpan

lib/Test/WriteVariants.pm  view on Meta::CPAN

    $test_writer = Test::WriteVariants->new(%attributes);

Instanciates a Test::WriteVariants instance and sets the specified attributes, if any.

=cut

sub new
{
    my ($class, %args) = @_;

    my $self = bless {} => $class;

    for my $attribute (qw(allow_dir_overwrite allow_file_overwrite))
    {
        next unless exists $args{$attribute};
        $self->$attribute(delete $args{$attribute});
    }
    confess "Unknown $class arguments: @{[ keys %args ]}"
      if %args;

    return $self;

lib/Test/WriteVariants/Context.pm  view on Meta::CPAN

    use warnings;
    require Data::Dumper;
    require Carp;

    # base class for an item (a name-value-type triple)

    sub new
    {
        my ($class, $name, $value) = @_;

        my $self = bless {} => $class;
        $self->name($name);
        $self->value($value);

        return $self;
    }

    sub name
    {
        my $self = shift;
        $self->{name} = shift if @_;

 view all matches for this distribution
 view release on metacpan -  search on metacpan

( run in 1.654 second using v1.00-cache-2.02-grep-82fe00e-cpan-d29e8ade9f55 )