X-Git-Url: http://git.vpit.fr/?p=perl%2Fmodules%2FLaTeX-TikZ.git;a=blobdiff_plain;f=lib%2FLaTeX%2FTikZ%2FMod%2FPattern%2FDots.pm;h=b029915d02c60b3b506ebcd4c2780ee9a6b1892d;hp=3fea8a6b08bd863e5b9384f64b05e83eb788dd1c;hb=d934d1a7f7268b248687f14e0ede2723010bf243;hpb=92f8566cc72a8bfded5c55589030ddab5f215bd6 diff --git a/lib/LaTeX/TikZ/Mod/Pattern/Dots.pm b/lib/LaTeX/TikZ/Mod/Pattern/Dots.pm index 3fea8a6..b029915 100644 --- a/lib/LaTeX/TikZ/Mod/Pattern/Dots.pm +++ b/lib/LaTeX/TikZ/Mod/Pattern/Dots.pm @@ -53,16 +53,16 @@ my $forge_template = Sub::Name::subname('forge_template' => sub { $center = "\\pgfqpoint{$half_width}{$half_width}"; $tile_size = "\\pgfqpoint{$width}{$width}"; - <<" PATTERN"; -\\pgfdeclarepatternformonly{#NAME#}{$low_left}{$up_right}{$tile_size}{% - \\pgfpathcircle{$center}{$dot_width} - \\pgfusepath{fill} -} - PATTERN + return [ + "\\pgfdeclarepatternformonly{#NAME#}{$low_left}{$up_right}{$tile_size}{", + "\\pgfpathcircle{$center}{$dot_width}", + "\\pgfusepath{fill}", + '}', + ]; }); around 'BUILDARGS' => sub { - my ($orig, $class, %args); + my ($orig, $class, %args) = @_; confess('Can\'t specify an explicit template for a '. __PACKAGE__ .' pattern') if exists $args{template};