CSS::Ob...Default(3)
π 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 & LICENSE π
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
- alpine 3.24: perl-css-object-doc 0.2.0-r1 Β· GPL-1.0-or-later OR Artistic-1.0-Perl
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash-1017 on : a language model's rewrite of the original, under its terms