Ported PlaceholderParser::apply_env_variables() to XS

This commit is contained in:
Alessandro Ranellucci 2015-07-01 17:56:38 +02:00
parent 724e668a94
commit f361d8ad43
4 changed files with 22 additions and 17 deletions

View file

@ -2,20 +2,6 @@ package Slic3r::GCode::PlaceholderParser;
use strict;
use warnings;
sub new {
# TODO: move this code to C++ constructor, remove this method
my ($class) = @_;
my $self = $class->_new;
$self->apply_env_variables;
return $self;
}
sub apply_env_variables {
my ($self) = @_;
$self->_single_set($_, $ENV{$_}) for grep /^SLIC3R_/, keys %ENV;
}
sub process {
my ($self, $string, $extra) = @_;