Changeset 3302


Ignore:
Timestamp:
03/12/09 09:45:10 (3 years ago)
Author:
jquelin
Message:

removing unused modules

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/Padre/lib/Padre/Config.pm

    r3301 r3302  
    1414use warnings; 
    1515 
    16 use Carp                   (); 
    17 use File::Spec             (); 
    18 use File::Copy             (); 
    19 use File::Path             (); 
    20 use Params::Util           qw{ _POSINT _INSTANCE }; 
    21 use Padre::Config::Setting (); 
    22 use Padre::Config::Human   (); 
    23 use Padre::Config::Project (); 
    24 use Padre::Config::Host    (); 
    25  
     16use Carp                     qw{ croak }; 
     17use Params::Util             qw{ _POSINT _INSTANCE }; 
    2618use Padre::Config::Constants qw{ :stores :types $PADRE_CONFIG_DIR }; 
     19use Padre::Config::Setting   (); 
     20use Padre::Config::Human     (); 
     21use Padre::Config::Project   (); 
     22use Padre::Config::Host      (); 
     23 
    2724 
    2825our $VERSION   = '0.28'; 
     
    179176    my $human = shift; 
    180177    unless ( _INSTANCE($host, 'Padre::Config::Host') ) { 
    181         Carp::croak("Did not provide a host config to Padre::Config->new"); 
     178        croak("Did not provide a host config to Padre::Config->new"); 
    182179    } 
    183180    unless ( _INSTANCE($human, 'Padre::Config::Human') ) { 
    184         Carp::croak("Did not provide a user config to Padre::Config->new"); 
     181        croak("Did not provide a user config to Padre::Config->new"); 
    185182    } 
    186183 
     
    192189        my $project = shift; 
    193190        unless ( _INSTANCE($project, 'Padre::Config::Project') ) { 
    194             Carp::croak("Did not provide a project config to Padre::Config->new"); 
     191            croak("Did not provide a project config to Padre::Config->new"); 
    195192        } 
    196193        $self->[$PROJECT] = $project; 
     
    207204    # Does the setting exist? 
    208205    my $setting = $SETTING{$name} or 
    209     Carp::croak("The configuration setting '$name' does not exist"); 
     206    croak("The configuration setting '$name' does not exist"); 
    210207 
    211208    # All types are $ASCII-like 
    212209    unless ( defined $value and not ref $value ) { 
    213         Carp::croak("Missing or non-scalar value for setting '$name'"); 
     210        croak("Missing or non-scalar value for setting '$name'"); 
    214211    } 
    215212 
     
    217214    my $type = $setting->type; 
    218215    if ( $type == $BOOLEAN and $value ne '1' and $value ne '0' ) { 
    219         Carp::croak("Tried to change setting '$name' to non-boolean '$value'"); 
     216        croak("Tried to change setting '$name' to non-boolean '$value'"); 
    220217    } 
    221218    if ( $type == $POSINT and not _POSINT($value) ) { 
    222         Carp::croak("Tried to change setting '$name' to non-posint '$value'"); 
     219        croak("Tried to change setting '$name' to non-posint '$value'"); 
    223220    } 
    224221    if ( $type == $INTEGER and not _INTEGER($value) ) { 
    225         Carp::croak("Tried to change setting '$name' to non-integer '$value'"); 
     222        croak("Tried to change setting '$name' to non-integer '$value'"); 
    226223    } 
    227224    if ( $type == $PATH and not -e $value ) { 
    228         Carp::croak("Tried to change setting '$name' to non-existant path '$value'"); 
     225        croak("Tried to change setting '$name' to non-existant path '$value'"); 
    229226    } 
    230227 
     
    243240    # Does the setting exist? 
    244241    my $setting = $SETTING{$name} or 
    245     Carp::croak("The configuration setting '$name' does not exist"); 
     242    croak("The configuration setting '$name' does not exist"); 
    246243 
    247244    return $DEFAULT{$name}; 
     
    293290    my $object = Padre::Config::Setting->new(@_); 
    294291    if ( $SETTING{$object->{name}} ) { 
    295         Carp::croak("The $object->{name} setting is already defined"); 
     292        croak("The $object->{name} setting is already defined"); 
    296293    } 
    297294 
     
    312309    eval $code; ## no critic 
    313310    if ( $@ ) { 
    314         Carp::croak("Failed to compile setting $object->{name}"); 
     311        croak("Failed to compile setting $object->{name}"); 
    315312    } 
    316313 
Note: See TracChangeset for help on using the changeset viewer.