CSS::Selector - A selector in a CSS object tree


CSS documentation Contained in the CSS distribution.

Index


Code Index:

NAME

Top

CSS::Selector - A selector in a CSS object tree

SYNOPSIS

Top

  use CSS;

DESCRIPTION

Top

This module represents a selector in a CSS object tree. Read the CSS.pm pod for information about the CSS object tree.

METHODS

Top

CONSTRUCTORS

new() or new( { ..options.. } )

This constructor returns a new CSS::Selector object, with an optional hash of options.

  name      	selector name (as string)
  adaptor       adaptor to use for serialization

ACCESSORS

set_adaptor( 'CSS::Adaptor::Foo' )

This method sets the current adaptor for the object.

AUTHOR

Top

Copyright (C) 2003-2004, Cal Henderson <cal@iamcal.com>

SEE ALSO

Top

CSS, http://www.w3.org/TR/REC-CSS1


CSS documentation Contained in the CSS distribution.

package CSS::Selector;

$VERSION = 1.01;

use strict;
use warnings;


sub new {
	my $class = shift;
	my $self = bless {}, $class;

	$self->{options}	= shift;
	$self->{name}		= $self->{options}->{name} || 'NO_NAME';
	$self->{adaptor}	= $self->{options}->{adaptor} || 'CSS::Adaptor';

	return $self;
}

sub set_adaptor {
	my $self = shift;
	my $adaptor = shift;

	# set adaptor
	$self->{adaptor} = $adaptor;
}

1;

__END__