| 1 | |||||||||||||
| 2 | ### | ||||||||||||
| 3 | # CSS::SAC::Selector::Simple - SAC SimpleSelector | ||||||||||||
| 4 | # Robin Berjon <robin@knowscape.com> | ||||||||||||
| 5 | # 24/02/2001 | ||||||||||||
| 6 | ### | ||||||||||||
| 7 | |||||||||||||
| 8 | package CSS::SAC::Selector::Simple; | ||||||||||||
| 9 | 2 | ▶ | use strict; | ||||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||||
| 10 | 2 | ▶ | use vars qw($VERSION); | ||||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||||
| 11 | 2 | ▶ | $VERSION = $CSS::SAC::VERSION || '0.03'; | ||||||||||
|
Condition50%1/2
$CSS::SAC::VERSION || '0.03'
MC/DC0%0/1
$CSS::SAC::VERSION || '0.03'
$CSS::SAC::VERSION
Truth table50%1/2
A
A= $CSS::SAC::VERSION
| |||||||||||||
| 12 | |||||||||||||
| 13 | 2 | ▶ | use base qw(CSS::SAC::Selector); | ||||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||||
| 14 | |||||||||||||
| 15 | |||||||||||||
| 16 | #---------------------------------------------------------------------# | ||||||||||||
| 17 | # build the fields for an array based object | ||||||||||||
| 18 | #---------------------------------------------------------------------# | ||||||||||||
| 19 | 2 | ▶ | use Class::ArrayObjects extend => { | ||||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||||
| 20 | class => 'CSS::SAC::Selector', | ||||||||||||
| 21 | with => [], | ||||||||||||
| 22 | 2 | }; | |||||||||||
| 23 | #---------------------------------------------------------------------# | ||||||||||||
| 24 | |||||||||||||
| 25 | |||||||||||||
| 26 | |||||||||||||
| 27 | ### Constructor ####################################################### | ||||||||||||
| 28 | # # | ||||||||||||
| 29 | # # | ||||||||||||
| 30 | |||||||||||||
| 31 | |||||||||||||
| 32 | #---------------------------------------------------------------------# | ||||||||||||
| 33 | # CSS::SAC::Selector::Simple->new($type) | ||||||||||||
| 34 | # creates a new sac SimpleSelector object | ||||||||||||
| 35 | #---------------------------------------------------------------------# | ||||||||||||
| 36 | 84 | ▶ | sub new { | ||||||||||
|
Subroutine
new: called CC=2 SCAR=7.0
Pod
documented
| |||||||||||||
| 37 | 84 | ▶ | my $class = ref($_[0])?ref(shift):shift; | ||||||||||
|
Branch: 1 branch
| |||||||||||||
| 38 | 84 | my $type = shift; | |||||||||||
| 39 | |||||||||||||
| 40 | # create a selector | ||||||||||||
| 41 | 84 | my $ssel = $class->SUPER::new($type); | |||||||||||
| 42 | |||||||||||||
| 43 | 84 | return $ssel; | |||||||||||
| 44 | } | ||||||||||||
| 45 | #---------------------------------------------------------------------# | ||||||||||||
| 46 | |||||||||||||
| 47 | |||||||||||||
| 48 | # # | ||||||||||||
| 49 | # # | ||||||||||||
| 50 | ### Constructor ####################################################### | ||||||||||||
| 51 | |||||||||||||
| 52 | |||||||||||||
| 53 | 2 | 1; | |||||||||||
| 54 | |||||||||||||
| 55 | =pod | ||||||||||||
| 56 | |||||||||||||
| 57 | =head1 NAME | ||||||||||||
| 58 | |||||||||||||
| 59 | CSS::SAC::Selector::Simple - SAC SimpleSelector | ||||||||||||
| 60 | |||||||||||||
| 61 | =head1 SYNOPSIS | ||||||||||||
| 62 | |||||||||||||
| 63 | see CSS::SAC::Selector | ||||||||||||
| 64 | |||||||||||||
| 65 | =head1 DESCRIPTION | ||||||||||||
| 66 | |||||||||||||
| 67 | This is a subclass of CSS::SAC::Selector, look there for more | ||||||||||||
| 68 | documentation. This class adds nothing, it's merely different. | ||||||||||||
| 69 | |||||||||||||
| 70 | This subclass adds nothing per se, it is only there to enforce | ||||||||||||
| 71 | some constraints as other selector classes have fields that may | ||||||||||||
| 72 | only contain a SimpleSelector | ||||||||||||
| 73 | |||||||||||||
| 74 | =head1 METHODS | ||||||||||||
| 75 | |||||||||||||
| 76 | =over 4 | ||||||||||||
| 77 | |||||||||||||
| 78 | =item * CSS::SAC::Selector::Simple->new($type) | ||||||||||||
| 79 | |||||||||||||
| 80 | =item * $ssel->new($type) | ||||||||||||
| 81 | |||||||||||||
| 82 | Creates a new simple selector. | ||||||||||||
| 83 | |||||||||||||
| 84 | =back | ||||||||||||
| 85 | |||||||||||||
| 86 | =head1 AUTHOR | ||||||||||||
| 87 | |||||||||||||
| 88 | Robin Berjon <robin@knowscape.com> | ||||||||||||
| 89 | |||||||||||||
| 90 | This module is licensed under the same terms as Perl itself. | ||||||||||||
| 91 | |||||||||||||
| 92 | =cut | ||||||||||||