mirror of
https://github.com/SoftFever/OrcaSlicer.git
synced 2025-08-07 22:14:00 -06:00
Replaced Moose with Moo => big performance boost and easier packaging
This commit is contained in:
parent
bf5824781d
commit
26b05ab155
13 changed files with 67 additions and 75 deletions
|
@ -1,32 +1,28 @@
|
|||
package Slic3r::Line;
|
||||
use Moose;
|
||||
use Moose::Util::TypeConstraints;
|
||||
use Moo;
|
||||
use Scalar::Util qw(weaken);
|
||||
|
||||
subtype 'Slic3r::Line::Length', as 'Int';
|
||||
coerce 'Slic3r::Line::Length', from 'Num', via { sprintf '%.0f', $_ };
|
||||
|
||||
has 'a' => (
|
||||
is => 'ro',
|
||||
isa => 'Slic3r::Point',
|
||||
#isa => 'Slic3r::Point',
|
||||
required => 1,
|
||||
);
|
||||
|
||||
has 'b' => (
|
||||
is => 'ro',
|
||||
isa => 'Slic3r::Point',
|
||||
#isa => 'Slic3r::Point',
|
||||
required => 1,
|
||||
);
|
||||
|
||||
has 'polyline' => (
|
||||
is => 'rw',
|
||||
isa => 'Slic3r::Polyline',
|
||||
#isa => 'Slic3r::Polyline',
|
||||
weak_ref => 1,
|
||||
);
|
||||
|
||||
has 'solid_side' => (
|
||||
is => 'rw',
|
||||
isa => enum([qw(left right)]), # going from a to b
|
||||
#isa => enum([qw(left right)]), # going from a to b
|
||||
);
|
||||
|
||||
sub BUILD {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue