Text::Sass(3pm)

Text::Sass3pm

A naieve perl implementation of sass & scss.

Usage

  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

Overview

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>

Subroutines/methods

new - Constructor - nothing special

  my $oSass = Text::Sass->new;

css2sass - Translate CSS to Sass

  my $sSass = $oSass->css2sass($sCSS);

sass2css - Translate Sass to CSS

  my $sCSS = $oSass->sass2css($sSass);

scss2css - Translate Scss to CSS

  my $sCSS = $oSass->scss2css($sScss);

Dependencies

Readonly
Convert::Color

Incompatibilities

All variables are currently global. This can be quite unpleasant.

Bugs and limitations

See README

Diagnostics

 Set $Text::Sass::DEBUG = 1;

Configuration and environment

Nothing required beyond $DEBUG

Releases

8 releases since Debian 6.0 (Squeeze); the text changed 5 times.

  1. 6.0
  2. 7
  3. 8
  4. 9–10
  5. 11
  6. 12–13

Author

Roger Pettett <[email protected]>

From libtext-sass-perl 1.0.4-3 in Debian 13 (Trixie). Parsed by carta from the page's man source.