diff options
author | P. J. McDermott <pjm@nac.net> | 2012-08-12 14:31:30 (EDT) |
---|---|---|
committer | P. J. McDermott <pjm@nac.net> | 2012-08-12 14:31:30 (EDT) |
commit | b2b307a2b170755a7218703cb4f761f58270a973 (patch) | |
tree | 55e18d18f15b34333e9a5be2d2b24b46fae68d43 | |
parent | d193dc32b3372bcff98222d12480376e15ab315e (diff) |
Prepend namespace to Carp subroutine calls.
-rw-r--r-- | scripts/MarkdownBook/Book.pm | 8 | ||||
-rw-r--r-- | scripts/MarkdownBook/Document.pm | 2 | ||||
-rw-r--r-- | scripts/MarkdownBook/Document/html.pm | 2 | ||||
-rw-r--r-- | scripts/MarkdownBook/Document/txt.pm | 3 |
4 files changed, 8 insertions, 7 deletions
diff --git a/scripts/MarkdownBook/Book.pm b/scripts/MarkdownBook/Book.pm index 572fb53..4f30afb 100644 --- a/scripts/MarkdownBook/Book.pm +++ b/scripts/MarkdownBook/Book.pm @@ -116,7 +116,7 @@ sub create_documents # Create chapter documents. $i = 0; open($series_fh, '<', $self->{'dir'} . '/chapters') - or croak('Cannot open chapters file'); + or Carp::croak('Cannot open chapters file'); while (<$series_fh>) { chomp($_); ($file, $title) = split(/[ \t]+/, $_, 2); @@ -134,7 +134,7 @@ sub create_documents @letters = ('A' .. 'Z'); if (-e $self->{'dir'} . '/appendices') { open($series_fh, '<', $self->{'dir'} . '/apendices') - or croak('Cannot open appendices file'); + or Carp::croak('Cannot open appendices file'); while (<$series_fh>) { chomp($_); ($file, $title) = split(/[ \t]+/, $_, 2); @@ -198,13 +198,13 @@ sub _do_subst_macro return $self->_do_gen_toc(); } elsif ($macro eq 'sectlink') { if (@args != 1) { - carp('Invalid arguments to "sectlink" macro'); + Carp::carp('Invalid arguments to "sectlink" macro'); } else { $sec = $self->{'sections_by_id'}->{$args[0]}; return '[ยง ' . $sec->number() . '][' . $sec->id() . ']'; } } else { - carp("Unrecognized macro \"$macro\""); + Carp::carp("Unrecognized macro \"$macro\""); } } diff --git a/scripts/MarkdownBook/Document.pm b/scripts/MarkdownBook/Document.pm index fa47cdb..2a30396 100644 --- a/scripts/MarkdownBook/Document.pm +++ b/scripts/MarkdownBook/Document.pm @@ -145,7 +145,7 @@ sub parse open($source_fh, '<', $self->{'book'}->dir() . '/' . $self->{'file'} . '.mdwn') - or croak('Cannot open "' . $self->{'file'} . '" source document'); + or Carp::croak('Cannot open "' . $self->{'file'} . '" source document'); $source_text = join('', <$source_fh>); close($source_fh); diff --git a/scripts/MarkdownBook/Document/html.pm b/scripts/MarkdownBook/Document/html.pm index 5ee1e79..60f22c7 100644 --- a/scripts/MarkdownBook/Document/html.pm +++ b/scripts/MarkdownBook/Document/html.pm @@ -145,7 +145,7 @@ sub _do_output_template $doc_tmpl->param(BODY => $body); open($doc_fh, '>', $self->file_path() . '.html') - or croak('Cannot open "' . $self->{'file'} . '" destination document'); + or Carp::croak('Cannot open "' . $self->{'file'} . '" destination document'); $doc_tmpl->output(print_to => $doc_fh); close($doc_fh); } diff --git a/scripts/MarkdownBook/Document/txt.pm b/scripts/MarkdownBook/Document/txt.pm index 3ffd9cd..f150477 100644 --- a/scripts/MarkdownBook/Document/txt.pm +++ b/scripts/MarkdownBook/Document/txt.pm @@ -30,7 +30,8 @@ sub output open($out_fh, '>', $self->{'book'}->dir() . '/' . $self->{'file'} . '.txt') - or croak('Cannot open "' . $self->{'file'} . '" destination document'); + or Carp::croak('Cannot open "' . $self->{'file'} . + '" destination document'); # Print document title. print($out_fh $self->{'title'} . "\n" . |