Permalink
Browse files

Add the stupidest tag parser possible

  • Loading branch information...
1 parent 6568ccb commit 318d5ab0acf268afb97963b50e371b7de5a698ee @rafl committed May 25, 2010
Showing with 15 additions and 0 deletions.
  1. +15 −0 lib/DBIx/Class/Tags/TagParser.pm
@@ -0,0 +1,15 @@
+package DBIx::Class::Tags::TagParser;
+
+use Moose;
+use namespace::autoclean;
+
+sub parse {
+ my ($self, $tag_str) = @_;
+ return map {
+ +{ name => $_ }
+ } split /\s*,\s*/, $tag_str;
+}
+
+__PACKAGE__->meta->make_immutable;
+
+1;

0 comments on commit 318d5ab

Please sign in to comment.