lib/LaTeXML/Core/Mouth/http.pm untested

filter: Statementstmt 0.0% 0 / 26 Branchbran 0.0% 0 / 6 Conditioncond n/a MC/DCmcdc n/a Subroutinesub 0.0% 0 / 6 Podpod 0.0% 0 / 1 totaltotal 0.0% 0 / 39 CC 4 SCAR 23.0
CC
4
Cov
0%
new
20.0
BEGIN
2.0
BEGIN
2.0
CRAP 10.0
1 # /=====================================================================\ #
2 # | LaTeXML::Core::Mouth::http | #
3 # | Analog of TeX's Mouth: for reading from http | #
4 # |=====================================================================| #
5 # | Part of LaTeXML: | #
6 # | Public domain software, produced as part of work done by the | #
7 # | United States Government & not subject to copyright in the US. | #
8 # |---------------------------------------------------------------------| #
9 # | Bruce Miller <bruce.miller@nist.gov> #_# | #
10 # | http://dlmf.nist.gov/LaTeXML/ (o o) | #
11 # \=========================================================ooo==U==ooo=/ #
12 package LaTeXML::Core::Mouth::http;
13 use strict;
14 use warnings;
15 use base qw(LaTeXML::Core::Mouth);
16 use LaTeXML::Util::WWW;
17 use LaTeXML::Global;
18  
19 sub new {
20 my ($class, $url, %options) = @_;
21 my ($urlbase, $name, $ext) = url_split($url);
22 $STATE->assignValue(URLBASE => $urlbase) if defined $urlbase;
23 my $self = bless { source => $url, shortsource => $name }, $class;
24 $$self{fordefinitions} = 1 if $options{fordefinitions};
25 $$self{notes} = 1 if $options{notes};
26 my $content = auth_get($url);
27 $self->openString($content);
28 $self->initialize;
29 return $self; }
30  
31 #======================================================================
32 1;
33  
34 __END__