From 2d9c61d9e4854e2038e2c6afb65b1cfee236bbf5 Mon Sep 17 00:00:00 2001 From: P. J. McDermott Date: Sat, 11 Aug 2012 16:42:34 -0400 Subject: Remove format-specific book module. --- (limited to 'scripts/MarkdownBook/Book.pm') diff --git a/scripts/MarkdownBook/Book.pm b/scripts/MarkdownBook/Book.pm index ffabb18..5581fb3 100644 --- a/scripts/MarkdownBook/Book.pm +++ b/scripts/MarkdownBook/Book.pm @@ -16,6 +16,11 @@ use strict; use warnings; +# These are temporary. +use MarkdownBook::Document::HTML::Index; +use MarkdownBook::Document::HTML::Chapter; +use MarkdownBook::Document::HTML::Appendix; + package MarkdownBook::Book; sub new @@ -28,7 +33,13 @@ sub new $self = {}; bless($self, $class); - $self->{'format'} = $format; + if ($format eq 'html') { + $self->{'format'} = 'html'; + $self->{'format_mod'} = 'HTML'; + } elsif ($format eq 'txt') { + $self->{'format'} = 'txt'; + $self->{'format_mod'} = 'Txt'; + } $self->{'dir'} = $dir; $self->{'docs'} = []; @@ -81,7 +92,7 @@ sub get_document_module { my ($self, $mod) = @_; - return 'MarkdownBook::Document::' . $self->{'format'} . '::' . $mod; + return 'MarkdownBook::Document::' . $self->{'format_mod'} . '::' . $mod; } sub create_documents -- cgit v0.9.1