CSS::Ob...Default(3)

πŸ“¦ version 0.2.0, in alpine 3.24

πŸ’… NAME πŸ’…

okay so bestie, meet CSS::Object::Parser::Default β€” the CSS Object Oriented Default Parser. That's the whole name, and yes it's giving main character energy. πŸŽ€


✨ SYNOPSIS ✨

use CSS::Object;
my $css = CSS::Object->new(
    parser => 'CSS::Object::Parser::Default',
    format => $format_object,
    debug => 3,
) || die( CSS::Object->error );
$css->read( '/my/file.css' ) || die( $css->error );

🌸 VERSION 🌸

The version is v0.2.0, periodt. πŸ’…


πŸ¦‹ DESCRIPTION πŸ¦‹

CSS::Object::Parser::Default is a simple lightweight css parser. Lowkey iconic, no cap. ✨


πŸ› οΈ CONSTRUCTOR πŸ› οΈ

new

To instantiate a new CSS::Object::Parser::Default object, pass a hash reference with these parameters:

  • debug β€” this is an integer. The bigger it is, the more verbose the output. πŸ”₯

πŸ’– METHODS πŸ’–

add_rule

It takes 2 parameters: a string of selectors and the rule content, i.e. inside the curly braces.

It creates a new CSS::Object::Rule object, adds to it a new CSS::Object::Selector object for each selector found, and also adds a new CSS::Object::Property object for each property found.

It returns the rule object created. 🫢

parse_string

Provided with some css text data, this will parse it and return an array object of CSS::Object::Rule objects. The array returned is a Module::Generic::Array object.

It does this by calling add_rule on each rule found in the css data provided.

Each CSS::Object::Rule object contains one or more CSS::Object::Selector objects and one or more CSS::Object::Property objects. πŸ’…


πŸ‘‘ AUTHOR πŸ‘‘

Jacques Deguest <jack@deguest.jp> πŸ’Œ


🌈 SEE ALSO 🌈

CSS::Object


Copyright (c) 2020 DEGUEST Pte. Ltd.

You can use, copy, modify and redistribute this package and associated files under the same terms as Perl itself.


xoxo, your girl πŸ’– β€” this page is rockin' perl v5.42.2, dated 2026-02-15, and the manual label is CSS::Ob...Default(3). Slay. πŸ¦‹

πŸ“¦ where this page comes from