mirror of
https://github.com/SoftFever/OrcaSlicer.git
synced 2025-08-06 05:24:01 -06:00
Use Class::XSAccessor
This commit is contained in:
parent
cab51d4581
commit
0feef890b1
3 changed files with 21 additions and 1 deletions
|
@ -991,7 +991,11 @@ END
|
|||
};
|
||||
|
||||
# generate accessors
|
||||
{
|
||||
if (eval "use Class::XSAccessor; 1") {
|
||||
Class::XSAccessor->import(
|
||||
getters => { map { $_ => $_ } keys %$Options },
|
||||
);
|
||||
} else {
|
||||
no strict 'refs';
|
||||
for my $opt_key (keys %$Options) {
|
||||
*{$opt_key} = sub { $_[0]{$opt_key} };
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue