Skip to content

Commit

Permalink
fixing failed tests, requiring at least one XML backend if using seri…
Browse files Browse the repository at this point in the history
…alizer
  • Loading branch information
xsawyerx committed Nov 3, 2010
1 parent e9a3d20 commit d5fb4ba
Showing 1 changed file with 8 additions and 1 deletion.
9 changes: 8 additions & 1 deletion lib/Dancer/Serializer/XML.pm
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,14 @@ sub to_xml {

# class definition

sub loaded { Dancer::ModuleLoader->load('XML::Simple') }
sub loaded {
# we need either XML::Parser or XML::Sax too
Dancer::ModuleLoader->load('XML::Simple') &&
(
Dancer::ModuleLoader->load('XML::Parser') or
Dancer::ModuleLoader->load('XML::Sax')
);
}

sub init {
my ($self) = @_;
Expand Down

0 comments on commit d5fb4ba

Please sign in to comment.