Changeset 12217

Show
Ignore:
Timestamp:
05/22/08 22:57:31 (5 years ago)
Author:
mizzy
Message:

Mooooooooooooooooooose

Location:
lang/perl/Punc/trunk
Files:
7 modified

Legend:

Unmodified
Added
Removed
  • lang/perl/Punc/trunk/Makefile.PL

    r11749 r12217  
    2121                       Moose 
    2222                       MooseX::ClassAttribute 
    23                        Class::ErrorHandler 
     23                       Class::MakeMethods 
    2424                   /); 
    2525 
  • lang/perl/Punc/trunk/bin/puncd

    r11777 r12217  
    3333    conf    => $conf, 
    3434    context => Punc->new->context, 
    35 }); 
     35})->init; 
    3636 
    3737$daemon->prepare->run; 
  • lang/perl/Punc/trunk/bin/puncmasterd

    r11777 r12217  
    3030    context => Punc->new->context, 
    3131    conf    => $conf, 
    32 }); 
     32})->init; 
    3333 
    3434$daemon->prepare->run; 
  • lang/perl/Punc/trunk/lib/Punc/Client.pm

    r11831 r12217  
    22 
    33use Moose; 
    4 our $VERSION = '0.01'; 
    54our $AUTOLOAD; 
    65use Punc::ConfigLoader; 
  • lang/perl/Punc/trunk/lib/Punc/Master/Daemon.pm

    r11834 r12217  
    1818); 
    1919 
    20 sub new { 
    21     my $class = shift; 
    22     my $self = $class->SUPER::new(@_); 
     20sub init { 
     21    my $self = shift; 
    2322 
    2423    $self->ca( 
  • lang/perl/Punc/trunk/lib/Punc/Slave/Daemon.pm

    r11777 r12217  
    1616has 'csrdir'  => ( is => 'rw', isa => 'Str' ); 
    1717 
    18 sub new { 
    19     my $class = shift; 
    20     my $self = $class->SUPER::new(@_); 
     18sub init { 
     19    my $self = shift; 
    2120 
    2221    $self->_find_or_request_cert($self->context); 
  • lang/perl/Punc/trunk/lib/Punc/Slave/Module.pm

    r11216 r12217  
    33use Moose; 
    44use Module::Pluggable; 
    5  
    6 extends 'Class::Data::Inheritable', 'Class::ErrorHandler'; 
    7  
    8 __PACKAGE__->mk_classdata('default_for'); 
     5use Class::MakeMethods ( 'Standard::Inheritable:scalar' => 'default_for' ); 
    96 
    107sub import { 
     
    1411    unshift @{"$pkg\::ISA"}, $class; 
    1512    $pkg->default_for($args); 
    16 } 
    17  
    18 sub new { 
    19     my $class = shift; 
    20     bless {}, $class; 
    2113} 
    2214 
     
    5446} 
    5547 
     48# code from Class::ErrorHandler 
     49use vars qw( $ERROR ); 
     50 
     51sub error { 
     52    my $msg = $_[1] || ''; 
     53    if (ref($_[0])) { 
     54        $_[0]->{_errstr} = $msg; 
     55    } else { 
     56        $ERROR = $msg; 
     57    } 
     58    return; 
     59} 
     60 
     61sub errstr { 
     62    ref($_[0]) ? $_[0]->{_errstr} : $ERROR 
     63} 
     64 
    56651;