| 1 | package File::Assets::Filter::Concat; | ||
| 2 | |||
| 3 | use strict; | ||
| 4 | use warnings; | ||
| 5 | |||
| 6 | use base qw/File::Assets::Filter::Collect/; | ||
| 7 | |||
| 8 | sub signature { | ||
| 9 | return "concat"; | ||
| 10 | } | ||
| 11 | |||
| 12 | sub build_content { | ||
| 13 | my $self = shift; | ||
| 14 | |||
| 15 | my $matched = $self->matched; | ||
| 16 | |||
| 17 | my $content = ""; | ||
| 18 | for my $match (@$matched) { | ||
| 19 | $content .= ${ $match->{asset}->content }; | ||
| 20 | } | ||
| 21 | |||
| 22 | return \$content; | ||
| 23 | } | ||
| 24 | |||
| 25 | 1; | ||
| 26 | |||
| 27 | __END__ |