NAME

CSS::Struct::Output - Base class for CSS::Struct::Output::*.

SYNOPSIS

use CSS::Struct::Output;
my $css = CSS::Struct::Output->new(%parameters);
$css->put(@data);
$css->flush($reset_flag);
$css->reset;

METHODS

new(%parameters)
Constructor.
  • auto_flush

    Auto flush flag.
    Default is 0.
  • comment_delimeters

    Reference to array with begin and end comment delimeter.
    Default value is ['/*', '*/'].
    Possible values are:
    - ['/*', '*/']
    - ['<!--', '-->'],
  • output_handler

    Handler for print output strings.
    Must be a GLOB.
    Default value is undef.
  • output_sep

    Output separator.
    Default value is newline.
  • skip_bad_types

    Flag, that means bad 'CSS::Struct' types skipping.
    Default value is 0.
  • skip_comments

    Flag, that means comment skipping.
    Default value is 0.
flush($reset_flag)
Flush CSS structure in object.
If defined 'output_handler' flush to its.
Or return code.
If enabled $reset_flag, then resets internal variables via reset method.
put(@data)
Put CSS structure in format specified in L<CSS::Struct>.
reset()
Resets internal variables.

ERRORS

Mine:
        Auto-flush can't use without output handler.
        Bad comment delimeters.
        Bad data.
        Bad number of arguments.
                ('CSS::Struct' structure array),
        Bad type of data.
        Cannot write to output handler.
        No opened selector.
        Output handler is bad file handler.

From Class::Utils::set_params():
        Unknown parameter '%s'.

DEPENDENCIES

Class::Utils, Error::Pure, List::MoreUtils.

SEE ALSO

CSS::Struct, CSS::Struct::Output::Indent, CSS::Struct::Output::Raw.

AUTHOR

Michal Josef Špaček mailto:skim@cpan.org

http://skim.cz

LICENSE AND COPYRIGHT

© 2007-2020 Michal Josef Špaček

BSD 2-Clause License

VERSION

0.01