Skip to content

Commit

Permalink
RE-673: fix moar errors
Browse files Browse the repository at this point in the history
  • Loading branch information
cPholloway committed Sep 25, 2024
1 parent 1994a1c commit bd3a20c
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 6 deletions.
6 changes: 3 additions & 3 deletions elevate-cpanel
Original file line number Diff line number Diff line change
Expand Up @@ -8727,13 +8727,13 @@ sub run ( $pkg, @args ) {
return 0;
}

sub component ( $self, $name ) { # FIXME -> get_component
sub get_component ( $self, $name ) {
my $pkg = qq[Elevate::Components::$name];

# my $sub = $pkg->can( 'new' ) or die qq[Missing new from $pkg];
# my $x = $sub->( $pkg, cpev => $self );
# return $x;
return $pkg->new( cpev => $self );
return $pkg->new( components => $self->components );
}

sub get_blocker ( $self, $name ) { # helper for tests
Expand Down Expand Up @@ -9469,7 +9469,7 @@ sub run_stage_5 ($self) {

sub run_component_once ( $self, $name, $function ) {

my $component = $self->component($name);
my $component = $self->get_component($name);
my $label = "component:$name:$function";
my $sub = $component->can($function) #
or die qq[Missing functon $function from component '$name'];
Expand Down
6 changes: 3 additions & 3 deletions script/elevate-cpanel.PL
Original file line number Diff line number Diff line change
Expand Up @@ -431,13 +431,13 @@ sub run ( $pkg, @args ) {
return 0;
}

sub component ( $self, $name ) { # FIXME -> get_component
sub get_component ( $self, $name ) {
my $pkg = qq[Elevate::Components::$name];

# my $sub = $pkg->can( 'new' ) or die qq[Missing new from $pkg];
# my $x = $sub->( $pkg, cpev => $self );
# return $x;
return $pkg->new( cpev => $self );
return $pkg->new( components => $self->components );
}

sub get_blocker ( $self, $name ) { # helper for tests
Expand Down Expand Up @@ -1173,7 +1173,7 @@ sub run_stage_5 ($self) {

sub run_component_once ( $self, $name, $function ) {

my $component = $self->component($name);
my $component = $self->get_component($name);
my $label = "component:$name:$function";
my $sub = $component->can($function) #
or die qq[Missing functon $function from component '$name'];
Expand Down

0 comments on commit bd3a20c

Please sign in to comment.