Help for this page

Select Code to Download


  1. or download this
    my $ele = $root->look_down(
       _decl => ...was specified...,
    ) or die qq{declaration not found\n};
    
    my $dec = $ele->attr('_decl');
    
  2. or download this
    my $ele = $root->look_down(
       sub { $_[0]->attr('_decl') }
    ) or die qq{declaration not found\n};
    
    my $dec = $ele->attr('_decl');
    
  3. or download this
    my $dec = $root->attr('_decl')
       or die qq{declaration not found\n};
    
  4. or download this
    $dec->attr(text => 'DOCTYPE html PUBLIC "HTML4"');
    
  5. or download this
    $root->attr('_decl',
       HTML::Element->new('~declaration',
          text => 'DOCTYPE html PUBLIC "HTML4"',
       )
    );
    
  6. or download this
    #!/usr/bin/perl
    
    ...
    <head><title>declaration</title></head>
    <body><p>declaration</p></body>
    </html>
    
  7. or download this
    <!DOCTYPE html PUBLIC "HTML4">
    <html><head><title>declaration</title></head><body><p>declaration</bod
    +y></html>