---
name: "CSS::Compressor"
section: "3pm"
platform: "linux"
package: "libcss-compressor-perl"
version: "0.05-2"
release: "Debian 13 (Trixie)"
platforms: ["linux"]
url: "https://new.carta.tech/CSS::Compressor"
---

# CSS::Compressor(3pm)

Perl extension for CSS minification

## NAME

CSS::Compressor - Perl extension for CSS minification

## SYNOPSIS

```
  use CSS::Compressor qw( css_compress );
  ...
  my $small = css_compress $css;
```

## DESCRIPTION

This module is an implementation of the CSS parts of Yahoo! YUIcompressor in Perl. It was needed to produce minified css on the fly using Perl based backend systems.

## FUNCTIONS

### css\_compress( $source )

Takes the stylesheet source, minifies it and returns the result string.

## SEE ALSO

- \<https://github.com/YUICompressor-NET/YUICompressor.NET\>

  YUIcompressor project homepage

- \<https://github.com/yui/yuicompressor\>

  YUIcompressor source repository

- CSS::Packer

  an alternative, Perl-based CSS compressor

## ACKNOWLEDGMENT

This module was originally developed for Booking.com. With approval from Booking.com, this module was generalized and put on CPAN, for which the author would like to express his gratitude.

## AUTHOR

Simon Bertrang, \<janus@cpan.org\>

## COPYRIGHT AND LICENSE

Copyright (C) 2012 by Simon Bertrang

This library is free software; you can redistribute it and/or modify it under the same terms as Perl itself, either Perl version 5.12.3 or, at your option, any later version of Perl 5 you may have available.
