Basement.pm

filter: Statementstmt 95.8% 163 / 170 Branchbran 77.4% 48 / 62 Conditioncond 47.0% 8 / 17 MC/DCmcdc 10.0% 1 / 10 Subroutinesub 100% 30 / 30 Podpod 100% 1 / 1 totaltotal 86.5% 251 / 290 CC 42 SCAR 20.6
CC
42
Cov
88%
get_states
21.5
_parse_parameters
6.7
MODIFY_CODE_ATTRIBUTES
6.1
CRAP 7.8
↑ Summary Basement/Std.pm »
1 =head1 NAME
2  
3 POE::Component::Basement
4  
5 =cut
6 package POE::Component::Basement;
7 5 ▶use strict;
Subroutine BEGIN: called CC=1 SCAR=0.0
8  
9 5 ▶use Scalar::Util qw/ refaddr /;
Subroutine BEGIN: called CC=1 SCAR=0.0
10 5 ▶use UNIVERSAL::require;
Subroutine BEGIN: called CC=1 SCAR=0.0
11 5 ▶use Sub::Installer;
Subroutine BEGIN: called CC=1 SCAR=0.0
12 5 ▶use Carp;
Subroutine BEGIN: called CC=1 SCAR=0.0
13 5 ▶use NEXT;
Subroutine BEGIN: called CC=1 SCAR=0.0
14 5 ▶use POE;
Subroutine BEGIN: called CC=1 SCAR=0.0
15  
16 5 ▶use vars qw/ %STATES @CARP_NOT @EXPORT_SUBS $VERSION /;
Subroutine BEGIN: called CC=1 SCAR=0.0
17 5 ▶use base qw/ POE::Component::Basement::Std Class::Data::Inheritable /;
Subroutine BEGIN: called CC=1 SCAR=0.0
18 5 ▶BEGIN { @CARP_NOT = qw/ attributes / }
Subroutine BEGIN: called CC=1 SCAR=0.0
19  
20 5 __PACKAGE__->mk_classdata( $_ ) for qw/ session_class /;
21 5 __PACKAGE__->session_class( 'POE::Session' );
22 5 $VERSION = .01;
23  
24 =head1 SYNOPSIS
25  
26 package POE::MyComponent;
27  
28 # use as base
29 use base qw/ POE::Component::Basement /;
30
31 # where the initializations happen (see Class::Std)
32 sub BUILD { ... }
33
34 # see also Class::Std and Class::Data::Inheritable also
35 # for accessor creation etc.
36
37 # define states
38 sub state_one : State( :inline<_start> ) { ... }
39 sub state_two : State( :object<foo> ) { ... }
40 sub state_three : State( :package<bar> ) { ... }
41
42 # combined
43 sub state_multi : State( :inline<foobar> :package<snafoo> ) { ... }
44 ...
45  
46 # chained events
47 sub first : State( :object<foo> :chained<bar> ) { ... }
48 sub second : State( :object<bar> ) { ... }
49 ...
50  
51 # calling in a row
52 sub first : State( :object<foo> :next<bar> ) { ... }
53 sub second : State( :object<bar> ) { ... }
54 ...
55
56 # usage
57 my $comp = POE::MyComponent->new ({
58
59 # single alias or array reference for multiple
60 aliases => [qw/ mycomp shub_niggurath /],
61  
62 ... # your specific init_arg's.
63 });
64  
65 =head1 DESCRIPTION
66  
67 Provides L<Class::Std> and base L<POE> component functionality. This module is
68 still kinda experimental.
69  
70 =head1 CLASS AND INSTANCE DATA
71  
72 =head2 Setting C<session_class>
73  
74 Determines on which class the session should be built on. To use, for instance,
75 L<POE::Session::MessageBased>, set the option like this:
76  
77 MyComponent->session_class( 'POE::Session::MessageBased' );
78  
79 The default is L<POE::Session>.
80  
81 =cut
82  
83 5 my %aliases_of : ATTR( :init_arg<aliases> :default<[]> );
84  
85 =head2 Option C<aliases>
86  
87 Can be a single value to be set as alias, or an array reference. If the latter,
88 L<POE::Kernel>'s C<alias_set> is called for each of it's elements. This must
89 be supplied as argument to the C<new> method. See L<SYNOPSIS> for examples.
90  
91 =head1 ATTRIBUTES
92  
93 This module just uses the attribute C<State> and delegates all other attribute
94 handling to L<Class::Std>. Parameters can multiple, separated by spaces. They
95 look like those of L<Class::Std> to be coherent. As an example:
96  
97 sub start_event : State( :inline<_start> ) {
98 ...
99 }
100  
101 This would create an C<inline_state> for our session, named C<_start>.
102  
103 =head2 inline, package and object
104  
105 Create C<inline_states>, C<package_states> or C<object_states> in your session.
106 Multiple specifications of these parameters cause multiple events to be defined.
107 Have a look at L<POE> for more information.
108  
109 =head2 chained
110  
111 sub first : State( :inline<_start> :chained<end> ) {
112 print "Called first.\n";
113 return 23;
114 }
115
116 sub end : State( :inline<end> ) {
117 my $last_return = $_[ARG0];
118 print "Called second. First returned $last_return\n";
119 }
120  
121 Specifies with which event the current state should be chained. If you use
122 C<chained>, the given event will be triggered after the sub has completed. It's
123 return values will be passed to the chained event.
124  
125 =head2 next
126  
127 # the event gets triggered
128 POE::Kernel->yield( foo => 333 );
129  
130 sub first : State( :inline<foo> :next<bar> ) {
131 my ( $nr ) = $_[ARG0];
132 ...
133 }
134
135 sub second : State( :inline<bar> ) {
136 my ( $nr ) = $_[ARG0];
137 ...
138 }
139
140 An event that was specified with C<next> is triggered right after completion
141 of the current subroutine. The C<next> event gets the same parameters as the
142 current.
143  
144 =head2 error
145  
146 sub first : State( :inline<foo> :error<error_occured> ) {
147 die "in the name of Cthulhu";
148 }
149  
150 sub second : State( :inline<error_occured> ) {
151 my $error = $_[ARG0];
152 print 'An Error has occured: ' . $error;
153 }
154  
155 If an C<error> handling state is defined, C<PCB> will build an C<eval> block
156 around the subroutine call and emit the event specified with C<error>. First
157 argument is the error message.
158  
159 =head1 INHERITANCE
160  
161 Currently, you can overload the called methods in package and object states.
162 Though you have to do this without specifying a new C<State()> attribute. The
163 new method has the same attributes as the overriden. The latter can also be
164 called with L<NEXT>. This basic way works like:
165  
166 # the original
167 package Original;
168 sub whatever : State( :package<_start> ) { ... }
169 ...
170
171 # the new one
172 package NewOne;
173 use base qw/ Original /;
174 sub whatever { ... }
175  
176 But for information, I'm planning the possibility to override specific events.
177  
178 =head1 METHODS
179  
180 Methods starting with an underline (C<_>) is thought as internal to
181 POE::Component::Basement and should therefore not be called directly.
182  
183 =cut
184  
185 40 ▶sub _parse_attribute {
Subroutine _parse_attribute: called CC=2 SCAR=7.6
186 40 my ( $attr ) = @_;
187 40 ▶ if ( $attr =~ /^(\w+)(?:\((.*)\))?$/ ) { return ( $1, $2 ) }
Branch: 1 branch
BranchTrueFalseTotal
if ($attr =~ /^(\w+)(?:\((.*)\))?$/) 40 0 40
188 0 return;
189 }
190  
191 =head2 _parse_attributes
192  
193 ( $name, $param ) = _parse_attribute( $attribute )
194
195 Takes an attribute and tries to split it into name and parameters. Returns
196 undef if nothing usable found.
197  
198 =cut
199  
200 4 ▶sub new {
Subroutine new: called CC=3 SCAR=11.0
Pod documented
201 4 my $class = shift;
202
203 # delegate original call
204 4 my $self = $class->NEXT::new( @_ );
205
206 # collect all states of this class
207 4 my $states = $self->get_states;
208
209 # session class
210 4 my $sc = $class->session_class;
211
212 # load and create session
213 4 UNIVERSAL::require( $sc );
214 4 $sc->create ( %$states );
215
216 # register aliases
217 4 my $aliases = $aliases_of{ ident $self };
218 POE::Kernel->alias_set( $_ )
219 4 ▶ for ( ref $aliases eq 'ARRAY' ? @$aliases : ($aliases) );
Branch: 1 branch
BranchTrueFalseTotal
ref $aliases eq 'ARRAY' ? : 0 4 4
220
221 # they shall receive us
222 4 return $self;
223 }
224  
225 =head2 new
226  
227 Constructor. See L<SYNOPSIS> for usage. This overrides the C<new> method
228 provided by L<Class::Std>.
229  
230 =cut
231  
232 # no warnings about redefinement
233 5 ▶{ no warnings 'redefine';
Subroutine BEGIN: called CC=1 SCAR=0.0
234
235 # called per sub
236 40 ▶ sub MODIFY_CODE_ATTRIBUTES {
Subroutine MODIFY_CODE_ATTRIBUTES: called CC=6 SCAR=18.1
237 40 my ( $class, $code, @attrs ) = @_;
238 40 my @unknown;
239  
240 # walk attributes of sub
241 40 for my $attr (@attrs) {
242
243 # parse the attribute into pieces
244 40 ▶ if ( my ( $name, $param ) = _parse_attribute( $attr ) ) {
Branch: 1 branch
BranchTrueFalseTotal
if (() = _parse_attribute($attr)) 40 0 40
245
246 # recognized as 'State' attribute
247 40 ▶ if ( lc $name eq 'state' ) {
Branch: 1 branch
BranchTrueFalseTotal
if (lc $name eq "state") 15 25 40
248
249 # split up states
250 15 my ( $states, $params ) = _parse_parameters( $param );
251
252 # die without states
253 15 ▶ croak 'No states detected' unless %{ $states || {} };
Branch: 1 branch
BranchTrueFalseTotal
unless %{$states or {};} 0 15 15
Condition50%1/2
$states || {}
l!l
150
MC/DC0%0/1
$states || {}
$states
Truth table50%1/2
A
A= $states
Aresult
11
00
254
255 # register states of component
256 15 register_states( $class, $code, $states, $params );
257
258 # finished attribute, next
259 15 next;
260 }
261 }
262
263 # unable to parse or unknown, ignore
264 25 push @unknown, $attr;
265 }
266
267 # return what we haven't processed
268 40 return $class->NEXT::MODIFY_CODE_ATTRIBUTES( $code, @unknown );
269 }
270 }
271  
272 =head2 MODIFY_CODE_ATTRIBUTES
273  
274 This is an internal sub that's responsible for building your state-map, as it
275 is called on specification of an attribute. See perldoc's L<attributes> for
276 more information about this subject. This is an I<internal function>, do not
277 call directly.
278  
279 =cut
280  
281 5 my %code_replacement;
282  
283 15 ▶sub _create_modified_state : RESTRICTED {
Subroutine _create_modified_state: called CC=5 SCAR=16.1
284 15 my ( $class, $code, $params ) = @_;
285 15 my $orig_code = $code;
286 15 my $tag;
287  
288 # we have a chained event. next hop gets return values as ARG0
289 15 ▶ if ( my $next = $params->{chained} ) {
Branch: 2 branches
BranchTrueFalseTotal
if (my $next = $params->{'chained'}) { } 5 10 15
elsif (my $next = $params->{'next'}) { } 1 9 10
290 5 my $last_code = $code;
291 5 ▶ $code = sub {
Subroutine __ANON__: called CC=1 SCAR=0.0
292 5 my @rets = $last_code->( @_ );
293 4 POE::Kernel->yield( $next, @rets );
294 5 };
295 }
296 elsif ( my $next = $params->{next} ) {
297 1 my $last_code = $code;
298 1 ▶ $code = sub {
Subroutine __ANON__: called CC=1 SCAR=0.0
299 1 $last_code->( @_ );
300 1 POE::Kernel->yield( $next, @_[POE::Session::ARG0 .. $#_] );
301 1 };
302 }
303
304 # check for error handling
305 15 ▶ if ( my $err_handler = $params->{error} ) {
Branch: 1 branch
BranchTrueFalseTotal
if (my $err_handler = $params->{"error"}) 2 13 15
306 2 my $last_code = $code;
307 2 ▶ $code = sub {
Subroutine __ANON__: called CC=2 SCAR=6.9
308 2 eval { $last_code->( @_ ) };
309 2 ▶ POE::Kernel->yield( $err_handler, $@ ) if $@;
Branch: 1 branch
BranchTrueFalseTotal
if $@ 1 1 2
310 }
311 2 }
312  
313 # install new sub if modified
314 15 ▶ if ( refaddr $code ne refaddr $orig_code ) {
Branch: 1 branch
BranchTrueFalseTotal
if (builtin::refaddr($code) ne builtin::refaddr($orig_code)) 6 9 15
315 6 $code_replacement{ refaddr $orig_code } = $code;
316 }
317
318 15 return $orig_code;
319 5 ▶}
Subroutine BEGIN: called CC=1 SCAR=0.0
320  
321 =head2 _create_modified_state
322  
323 $code = _create_modified_state( \&coderef, \%params );
324  
325 Does the wrapping for the more enhanced attributes. Internal, do not call.
326  
327 =cut
328  
329 15 ▶sub register_states : RESTRICTED {
Subroutine register_states: called CC=2 SCAR=6.9
330 15 my ( $class, $code, $states, $params ) = @_;
331  
332 # have a look at every state
333 15 ▶ while ( my ( $state, $type ) = each %$states ) {
Branch: 1 branch
BranchTrueFalseTotal
if (() = each %$states) 15 15 30
334  
335 # see if we need to do something on the code
336 15 $code = _create_modified_state( $class, $code, $params );
337
338 # remember
339 15 $STATES{ $class }{ $type }{ $state } = $code;
340 }
341
342 15 return;
343 5 ▶}
Subroutine BEGIN: called CC=1 SCAR=0.0
344  
345 =head2 register_states
346  
347 void register_states( $class, $coderef, { state_name => 'type' } );
348  
349 Registers states corresponding to a specific code reference. Accepted state
350 names are C<inline>, C<package> and C<object>. Internal, do not call.
351  
352 =cut
353  
354 4 ▶sub _flatten_inheritance : RESTRICTED {
Subroutine _flatten_inheritance: called CC=3 SCAR=11.0
355 4 my ( $class ) = @_;
356  
357 # bad refs
358 5 ▶ no strict 'refs';
Subroutine BEGIN: called CC=1 SCAR=0.0
359  
360 # include father class
361 4 my ( %classmap, @isa_queue );
362 4 $classmap{ $class } = 1;
363  
364 # we start with the specified class and walk the queue
365 4 push @isa_queue, @{ $class . '::ISA' };
366 4 ▶ while ( my $c = shift @isa_queue ) {
Branch: 1 branch
BranchTrueFalseTotal
if (my $c = shift @isa_queue) 14 4 18
367  
368 # only act on unseen classes
369 14 ▶ unless ( exists $classmap{ $c } ) {
Branch: 1 branch
BranchTrueFalseTotal
unless (exists $classmap{$c}) 14 0 14
370  
371 # remember class and add it's @ISA to the queue
372 14 $classmap{ $c } = 1;
373 14 push @isa_queue, @{ $c . '::ISA' };
374 }
375 }
376  
377 # tell our caller what we've found
378 4 return keys %classmap;
379 5 ▶}
Subroutine BEGIN: called CC=1 SCAR=0.0
380  
381 =head2 _flatten_inheritance
382  
383 @classes_in_family = _flatten_inheritance( $rootclass )
384  
385 Returns an array with names of classes used in the specified C<$rootclass>'
386 inheritance tree. This is internal, do not call.
387  
388 =cut
389  
390 4 ▶sub get_states : RESTRICTED {
Subroutine get_states: called CC=18 SCAR=30.7
391 4 my ( $self ) = @_;
392 4 my ( %struct, %seen_states );
393 4 ▶ my $own_class = ref( $self ) || $self;
Condition33%1/3
ref $self || $self
l!l&&r!l&&!r
400
MC/DC0%0/2
ref $self || $self
ref $self $self
Truth table33%1/3
A || B
A= ref $selfB= $self
ABresult
1X1
011
000
394  
395 # we iterate through our inheritance and collect our states
396 4 ▶ for my $class ( _flatten_inheritance( ref( $self ) || $self ) ) {
Condition33%1/3
ref $self || $self
l!l&&r!l&&!r
400
MC/DC0%0/2
ref $self || $self
ref $self $self
Truth table33%1/3
A || B
A= ref $selfB= $self
ABresult
1X1
011
000
397 18 ▶ next unless exists $STATES{ $class };
Branch: 1 branch
BranchTrueFalseTotal
unless exists $POE::Component::Basement::STATES{$class} 12 6 18
398  
399 # walk through our types and set up their states
400 6 ▶ while ( my ( $type, $states ) = each %{ $STATES{ $class } } ) {
Branch: 1 branch
BranchTrueFalseTotal
if (() = each %{$POE::Component::Basement::STATES{$class};}) 11 6 17
401
402 # get each state name and code reference
403 11 ▶ while ( my ( $state, $code ) = each %{ $states || {} } ) {
Branch: 1 branch
BranchTrueFalseTotal
if (() = each %{$states or {};}) 15 11 26
Condition50%1/2
$states || {}
l!l
260
MC/DC0%0/1
$states || {}
$states
Truth table50%1/2
A
A= $states
Aresult
11
00
404
405 # we only allow unique states
406 15 ▶ if ( exists $seen_states{ $state } ) {
Branch: 1 branch
BranchTrueFalseTotal
if (exists $seen_states{$state}) { } 0 15 15
407 0 die "State $state defined twice "
408 . "($seen_states{$state} and $class)\n";
409 }
410 15 else { $seen_states{ $state } = $class }
411  
412 # get the name of the sub
413 15 ▶ my $name = _get_symbol_name( $class, $code )
Branch: 1 branch
BranchTrueFalseTotal
my $name = _get_symbol_name($class, $code) or die "No name in symbol table for $state in $class\n" 15 0 15
414 or die "No name in symbol table for $state in $class\n";
415  
416 # code might have to be replaced
417 15 ▶ if ( my $newcode = $code_replacement{ refaddr $code } ) {
Branch: 1 branch
BranchTrueFalseTotal
if (my $newcode = $code_replacement{builtin::refaddr($code)}) 6 9 15
418 6 Sub::Installer::reinstall_sub
419 ( $class => { $name => $newcode } );
420 6 $code = $newcode;
421 }
422
423 # package states just need a name
424 15 ▶ if ( lc $type eq 'package' ) {
Branch: 3 branches
BranchTrueFalseTotal
if (lc $type eq 'package') { } 4 11 15
elsif (lc $type eq 'inline') { } 8 3 11
elsif (lc $type eq 'object') { } 3 0 3
425
426 # the session wants an array reference
427 4 ▶ $struct{ $type . '_states' } ||= [ $own_class, {} ];
Condition100%2/2
$struct{$type . '_states'} ||= [$own_class, {}]
l!l
13
MC/DC100%1/1
$struct{$type . '_states'} ||= [$own_class, {}]
$struct{$type . '_states'}
Truth table100%2/2
A
A= $struct{$type . '_states'}
Aresult
11
00
428
429 # add new state to package
430 4 $struct{ $type . '_states' }[1]{ $state } = $name;
431 }
432
433 # inline states get the code reference
434 elsif ( lc $type eq 'inline' ) {
435 8 $struct{ $type . '_states' }{ $state } = $code;
436 }
437
438 # object is like package, just with ourself
439 elsif ( lc $type eq 'object' ) {
440
441 # object states are surrounded by array ref
442 3 ▶ $struct{ $type . '_states' } ||= [ $self, {} ];
Condition50%1/2
$struct{$type . '_states'} ||= [$self, {}]
l!l
03
MC/DC0%0/1
$struct{$type . '_states'} ||= [$self, {}]
$struct{$type . '_states'}
Truth table50%1/2
A
A= $struct{$type . '_states'}
Aresult
11
00
443
444 # object states obviously need an object
445 3 ▶ die 'Didn\'t get an object as first argument'
Branch: 1 branch
BranchTrueFalseTotal
unless ref $self and UNIVERSAL::isa($self, "UNIVERSAL") 0 3 3
Condition33%1/3
ref $self and UNIVERSAL::isa($self, "UNIVERSAL")
!ll&&!rl&&r
003
MC/DC0%0/2
ref $self and UNIVERSAL::isa($self, "UNIVERSAL")
ref $self UNIVERSAL::isa($self, "UNIVERSAL")
Truth table33%1/3
A and B
A= ref $selfB= UNIVERSAL::isa($self, "UNIVERSAL")
ABresult
0X0
100
111
446 unless ref $self and UNIVERSAL::isa( $self, 'UNIVERSAL' );
447
448 # save states under object
449 3 $struct{ $type . '_states' }[1]{ $state } = $name;
450 }
451 }
452 }
453 }
454
455 # return ready structure
456 4 return \%struct;
457 5 ▶}
Subroutine BEGIN: called CC=1 SCAR=0.0
458  
459 =head2 get_states
460  
461 \%struct = $comp->get_states()
462  
463 Returns a structure containing the defined inline, package and object states
464 ready to use for L<POE::Session>s constructor. Internal and restricted, do not
465 call.
466  
467 =cut
468  
469 # we cache the sub names
470 my %symcache;
471  
472 15 ▶sub _get_symbol_name : RESTRICTED {
Subroutine _get_symbol_name: called CC=4 SCAR=14.0
473 15 my ( $class, $code ) = @_;
474  
475 # we need symrefs, and reset symbol table hash
476 5 ▶ no strict 'refs';
Subroutine BEGIN: called CC=1 SCAR=0.0
477 15 keys %{ $class . '::' };
478
479 # return cached version, if existing
480 return $symcache{ refaddr( $code ) }
481 15 ▶ if $symcache{ refaddr( $code ) };
Branch: 1 branch
BranchTrueFalseTotal
if $symcache{builtin::refaddr($code)} 0 15 15
482
483 # walk symbol table
484 15 ▶ while ( my ( $name, $smth ) = each %{ $class . '::' } ) {
Branch: 1 branch
BranchTrueFalseTotal
if (() = each %{$class . '::';}) 232 0 232
485
486 # cache name and return
487 return $symcache{ refaddr( $code ) } = $name
488 232 ▶ if refaddr( *{ $smth }{CODE} ) eq refaddr( $code );
Branch: 1 branch
BranchTrueFalseTotal
if builtin::refaddr(*{$smth;}{"CODE"}) eq builtin::refaddr($code) 15 217 232
489 }
490
491 # no name was found
492 0 return undef;
493 5 ▶}
Subroutine BEGIN: called CC=1 SCAR=0.0
494  
495 =head2 _get_symbol_name
496  
497 $subname = _get_symbol_name( $class, $coderef );
498  
499 Searches for a code reference in the symbol table of a class and returns the
500 sub's name if found. Otherwise undef. Do not call.
501  
502 =cut
503  
504 15 ▶sub _parse_parameters {
Subroutine _parse_parameters: called CC=6 SCAR=19.0
505 15 my ( $string ) = @_;
506 15 my %struct;
507
508 # extract everything that looks like a parameter
509 15 ▶ while ( $string =~ s/: ([a-z0-9_.;]+?) <(.*?)> //xi ) {
Branch: 1 branch
BranchTrueFalseTotal
if ($string =~ s/: ([a-z0-9_.;]+?) <(.*?)> //xi) 23 15 38
510 23 my ( $name, $value ) = ( $1, $2 );
511
512 # empty ones have to be ignored
513 23 ▶ next unless $name;
Branch: 1 branch
BranchTrueFalseTotal
unless $name 0 23 23
514
515 # states
516 23 ▶ if ( grep { $name eq $_ } qw/ inline package object / ) {
Branch: 2 branches
BranchTrueFalseTotal
if (grep {$name eq $_;} 'inline', 'package', 'object') { } 15 8 23
elsif (grep {$name eq $_;} 'error', 'chained', 'next') { } 8 0 8
517 15 $struct{states}{ $value } = $name;
518 }
519
520 # enhanced
521 24 elsif ( grep { $name eq $_ } qw/ error chained next / ) {
522 8 $struct{params}{ $name } = $value;
523 }
524
525 # huh?!
526 else {
527 0 croak "Unknown parameter: '$name'";
528 }
529 }
530
531 # there was some part in that attr line we didn't understand
532 15 ▶ if ( $string =~ /\S/ ) {
Branch: 1 branch
BranchTrueFalseTotal
if ($string =~ /\S/) 0 15 15
533
534 # we're dying anyways, so let's make it pretty
535 0 $string =~ s/^\s+//; $string =~ s/\s+$//;
536 0 croak "Unable to understand: '$string'";
537 }
538
539 15 return @struct{qw/ states params /};
540 }
541  
542 =head2 _parse_parameters
543  
544 %parameters = _parse_parameters( $parameter_string )
545  
546 This function looks for parameters formed like :name<value> and returns them in
547 ( name => value, .. ) like pairs. Dies on malformed or unknown parameters.
548 Internal method, do not call.
549  
550 =cut
551  
552 =head1 SEE ALSO
553  
554 L<POE>, L<Class::Std>, L<Class::Data::Inheritable>
555  
556 =head1 REQUIRES
557  
558 L<POE>, L<Class::Std>, L<Carp>, L<Scalar::Util>, L<NEXT>, L<Sub::Installer>,
559 L<Class::Data::Inheritable>
560  
561 =head1 AUTHOR
562  
563 Robert Sedlacek <phaylon@dunkelheit.at>
564  
565 =head1 LICENSE
566  
567 You can copy and/or modify this module under the same terms as perl itself.
568  
569 =cut
570  
571 5 1;
↑ Summary Basement/Std.pm »