Skip to content

Commit

Permalink
Fix registering custom template functions
Browse files Browse the repository at this point in the history
  • Loading branch information
ferki committed Aug 27, 2020
1 parent 3f5f30f commit 540bd5a
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 1 deletion.
1 change: 1 addition & 0 deletions ChangeLog
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ Revision history for Rex
- Fix fallback MD5 calculation method on OS X
- Fix dmidecode section getter
- Fix cpuinfo parsing
- Fix registering custom template functions

[DOCUMENTATION]
- Clarify contributing guide
Expand Down
2 changes: 1 addition & 1 deletion lib/Rex/Template.pm
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ our $BE_LOCAL = 1;
sub function {
my ( $class, $name, $code ) = @_;

my $ref_to_name = qualify_to_ref( 'name', $class );
my $ref_to_name = qualify_to_ref( $name, $class );
*{$ref_to_name} = $code;
}

Expand Down

0 comments on commit 540bd5a

Please sign in to comment.