Text::Sass - A Naieve Perl implementation of Sass & SCSS.
Contents
Bugs And Limitations
See README
Configuration And Environment
Nothing required beyond $DEBUG
Dependencies
Readonly
Convert::Color
Description
This is a pure perl implementation of Sass and SCSS languages. Currently it implements only a subset of
the specification.
Sass project page <http://sass-lang.com>
Diagnostics
Set $Text::Sass::DEBUG = 1;
Incompatibilities
All variables are currently global. This can be quite unpleasant.
License And Copyright
This library is free software; you can redistribute it and/or modify it under the same terms as Perl
itself, either Perl version 5.8.10 or, at your option, any later version of Perl 5 you may have
available.
perl v5.40.1 2025-08-04 Text::Sass(3pm)
Name
Text::Sass - A Naieve Perl implementation of Sass & SCSS.
See Also
Text::Sass::XS - Perl binding for libsass. Consider using it if you need higher level of language
conformance and/or faster execution.
CSS::Sass - Yet another libsass binding.
Plack::Middleware::File::Sass - Sass and SCSS support for all Plack frameworks. Can use this module as
one of its backends.
Subroutines/Methods
new-Constructor-nothingspecial
my $oSass = Text::Sass->new;
css2sass-TranslateCSStoSass
my $sSass = $oSass->css2sass($sCSS);
sass2css-TranslateSasstoCSS
my $sCSS = $oSass->sass2css($sSass);
scss2css-TranslateScsstoCSS
my $sCSS = $oSass->scss2css($sScss);
Synopsis
use Text::Sass;
my $sass = Text::Sass->new();
print $sass->sass2css(<<'EOF');
$font-stack: Helvetica, sans-serif
$primary-color: #333
body
font: 100% $font-stack
color: $primary-color
EOF
print $sass->scss2css(<<'EOF');
$font-stack: Helvetica, sans-serif;
$primary-color: #333;
body {
font: 100% $font-stack;
color: $primary-color;
}
EOF
Version
See Text/Sass.pm
