summary refs log tree commit diff
diff options
context:
space:
mode:
authorfranck cuny <franck@lumberjaph.net>2010-06-02 13:23:37 +0200
committerfranck cuny <franck@lumberjaph.net>2010-06-02 13:23:37 +0200
commita86d71f615e207fe82cd5866d7d8f2d3abc842f1 (patch)
tree10ea91f01a50eca899a9aeb8a743afdeea72840d
parentmove content deserialization to role (diff)
downloadmoosex-net-api-a86d71f615e207fe82cd5866d7d8f2d3abc842f1.tar.gz
remove old serilizer
-rw-r--r--lib/MooseX/Net/API/Role/Serialize.pm34
1 files changed, 0 insertions, 34 deletions
diff --git a/lib/MooseX/Net/API/Role/Serialize.pm b/lib/MooseX/Net/API/Role/Serialize.pm
deleted file mode 100644
index f527928..0000000
--- a/lib/MooseX/Net/API/Role/Serialize.pm
+++ /dev/null
@@ -1,34 +0,0 @@
-package MooseX::Net::API::Role::Serialize;
-
-use Moose::Role;
-use JSON::XS;
-use YAML::Syck;
-use XML::Simple;
-use Try::Tiny;
-
-sub _to_json {
-    return encode_json( $_[1] );
-}
-
-sub _to_yaml {
-    return Dump $_[1];
-}
-
-sub _to_xml {
-    my $xml = XML::Simple->new( ForceArray => 0 );
-    $xml->XMLin("$_[0]");
-}
-
-sub _do_serialization {
-    my ( $caller, $content, $format ) = @_;
-
-    my $format_content;
-    my $method = '_to_' . $format;
-    return if ( !$caller->meta->find_method_by_name($method) );
-    try {
-        $format_content = $caller->$method($content);
-    };
-    return $format_content if $format_content;
-}
-
-1;