=cut
sub layer {
- return $_[0] unless @_ > 1;
+ my $set = shift;
- my $layer = $_[1];
+ return $set unless @_;
- $_[0]->mod(
+ my $layer = $_[0];
+ $set->mod(
$ltml_tc->check($layer) ? $layer
: LaTeX::TikZ::Mod::Layer->new(name => $layer)
)
=cut
sub clip {
- return $_[0] unless @_ > 1;
+ my $set = shift;
+
+ return $set unless @_;
- $_[0]->mod(
+ $set->mod(
map {
$ltmc_tc->check($_) ? $_ : LaTeX::TikZ::Mod::Clip->new(clip => $_)
- } @_[1 .. $#_]
+ } @_
)
}