- Timestamp:
- 05/14/08 12:28:25 (6 months ago)
- Location:
- dan/perl/closxop/lib
- Files:
-
- 3 modified
-
Closxop.pm (modified) (1 diff)
-
Closxop/DataStruct.pm (modified) (1 diff)
-
Closxop/Plugin.pm (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
-
dan/perl/closxop/lib/Closxop.pm
r11559 r11561 66 66 my $path = sprintf "%s/%s/Plugin", $self->config->global->plugin_dir, ref $self; 67 67 68 $self->plugins([]); 68 $self->{plugins} = []; 69 69 70 if ( -d $path && -r _ ) { 70 71 unshift @INC, $self->config->global->plugin_dir; -
dan/perl/closxop/lib/Closxop/DataStruct.pm
r11557 r11561 10 10 my $data = shift || {}; 11 11 12 unless ( ref $data eq 'HASH' ) { 13 Carp::croak qq(This data may be invalid.); 14 } 15 16 for my $key ( %{ $data } ) { 17 if ( ref $data->{$key} eq 'HASH' ) { 18 $data->{$key} = $class->new($data->{$key}); 12 if ( ref $data eq 'HASH' ) { 13 foreach my $key ( %{ $data } ) { 14 if ( ref $data->{$key} eq 'HASH' ) { 15 $data->{$key} = $class->new($data->{$key}); 16 } elsif ( ref $data->{$key} eq 'ARRAY' ) { 17 foreach my $index ( $#{ $data->{$key} } ) { 18 if ( ref $data->{$key}->[$index] eq 'HASH' ) { 19 $data->{$key}->[$index] = $class->new($data->{$key}->[$index]); 20 } 21 } 19 22 } 20 23 } 24 } 21 25 22 26 bless { _data => $data }, $class; -
dan/perl/closxop/lib/Closxop/Plugin.pm
r11557 r11561 14 14 my $config = $context->config; 15 15 16 return $self unless 17 exists $config->{plugins} && 18 ref $config->{plugins} eq 'ARRAY'; 16 return $self unless $config->plugins && ref $config->plugins eq 'ARRAY'; 19 17 20 foreach my $object ( @{ $config->{plugins} } ) { 21 next unless 22 exists $object->{module} && 23 exists $object->{config}; 18 foreach my $object ( @{ $config->plugins } ) { 19 next unless $object->module && $object->config; 24 20 25 if ( $self->plugin_name eq $object->{module} ) { 26 $self->plugin_config($object->{config}); 21 warn ref $object; 27 22 28 my $priority = $self->plugin_config->{priority}; 23 if ( $self->plugin_name eq $object->module ) { 24 $self->plugin_config($object->config); 25 26 my $priority = $self->plugin_config->priority; 29 27 $self->priority( $priority ? int $priority : 100 ); 30 28
![(please configure the [header_logo] section in trac.ini)](/share/chrome/site/your_project_logo.png)