Stancer

 view release on metacpan or  search on metacpan

lib/Stancer/Core/Object.pm  view on Meta::CPAN

    my $this = shift;

    return $this unless defined $this->id;

    my $data = Stancer::Core::Request->new->del($this);

    if ($data) {
        $this->hydrate(decode_json $data);
    }

    my @parts = split m/::/sm, ref $this;
    my $class = $parts[-1];

    $log->info(sprintf '%s %s deleted', $class, $this->id);

    $this->clear_id;

    return $this;
}


lib/Stancer/Core/Object.pm  view on Meta::CPAN

    }

    $this->_set_populated(1);

    if ($data) {
        $this->hydrate(decode_json $data);
    }

    $this->_reset_modified();

    my @parts = split m/::/sm, ref $this;
    my $class = $parts[-1];

    $log->info(sprintf '%s %s %s', $class, $this->id, $verb);

    return $this;
}


## no critic (Capitalization)
sub toJSON {

lib/Stancer/Exceptions/Http.pm  view on Meta::CPAN

    is => 'ro',
    isa => InstanceOf['HTTP::Response'],
);



has status => (
    is => 'ro',
    builder => sub {
        my $this = shift;
        my @parts = split m/::/sm, ref $this;
        my $class = $parts[-1];

        $class =~ s/([[:upper:]])/_$1/xgsm;

        my $constant = 'HTTP' . uc $class;

        return HTTP::Status->$constant if HTTP::Status->can($constant);
    },
);



( run in 0.712 second using v1.01-cache-2.11-cpan-5511b514fd6 )