GSP
Quick Navigator

Search Site

Unix VPS
A - Starter
B - Basic
C - Preferred
D - Commercial
MPS - Dedicated
Previous VPSs
* Sign Up! *

Support
Contact Us
Online Help
Handbooks
Domain Status
Man Pages

FAQ
Virtual Servers
Pricing
Billing
Technical

Network
Facilities
Connectivity
Topology Map

Miscellaneous
Server Agreement
Year 2038
Credits
 

USA Flag

 

 

Man Pages
Data::Stag::Writer(3) User Contributed Perl Documentation Data::Stag::Writer(3)

  Data::Stag::Writer - base class for all Writers

  # Abstract class - do not use directly
  package MyOutputter;
  use base qw(Data::Stag::Writer);

  sub e_foo {
    my ($self, $foo) = @_;
    $self->writef("data1: %s\n", $foo->get_data1);
    return;
  }

base mixin class for all writers

    This inherits from L<Data::Stag::BaseHandler>

new

       Title: new

        Args: [fn str], [fh FILEHANDLE]
      Return: L<Data::Stag::BaseHandler>
     Example: $w = MyWriter->new(-fh=>$fh);

returns the tree that was built from all uncaught events

file

       Title: file

        Args: filename str
     Returns: filename str
     Example: $handler->file("my_output_file.txt");

Setting this will cause all output to be diverted to this file; the file will be overwritten by default. The filehandle will not be opened unless any events are thrown

For more fine-grained control, use $handler->fh()

fh

       Title: fh

        Args: filehandle FH
     Returns: filehandle FH
     Example: $handler->fh(\*STDOUT);

Gets/Sets the output filehandle for the writer

safe_fh

       Title: safe_fh
        Type: PROTECTED

        Args: filehandle FH
     Returns: filehandle FH
     Example: $handler->fh(\*STDOUT);

As fh(), but makes sure that the filehandle is initialized

You should use this if you are overriding this class

write

       Title: write

        Type: PROTECTED
        Args: message str
     Returns: 
     Example: $self->write($stag->get_blah);

writes output

to be used by classes that subclass this one

writef

       Title: writef

As write, analagous to printf

  Usage   -
  Returns -
  Args    -
2013-09-18 perl v5.32.1

Search for    or go to Top of page |  Section 3 |  Main Index

Powered by GSP Visit the GSP FreeBSD Man Page Interface.
Output converted with ManDoc.