Revision ab719aed
Von Sven Schöling vor fast 7 Jahren hinzugefügt
SL/PriceSource.pm | ||
---|---|---|
3 | 3 |
use strict; |
4 | 4 |
use parent 'SL::DB::Object'; |
5 | 5 |
use Rose::Object::MakeMethods::Generic ( |
6 |
scalar => [ qw(record_item record) ], |
|
6 |
scalar => [ qw(record_item record fast) ],
|
|
7 | 7 |
'scalar --get_set_init' => [ qw( |
8 | 8 |
best_price best_discount |
9 | 9 |
) ], |
... | ... | |
31 | 31 |
return unless $class; |
32 | 32 |
|
33 | 33 |
$self->{price_source_by_name}{$class} //= |
34 |
$class->new(record_item => $self->record_item, record => $self->record); |
|
34 |
$class->new(record_item => $self->record_item, record => $self->record, fast => $self->fast);
|
|
35 | 35 |
} |
36 | 36 |
|
37 | 37 |
sub price_from_source { |
... | ... | |
253 | 253 |
A special empty discount that does not change the previously entered discount |
254 | 254 |
and opens the discount field to manual changes. |
255 | 255 |
|
256 |
=item C<fast> |
|
257 |
|
|
258 |
If set to true, indicates that calls may skip doing intensive work and instead |
|
259 |
return a price or discount flagged as unknown. The caller must be prepared to |
|
260 |
deal with those. |
|
261 |
|
|
262 |
Typically this is intended to delay expensive calculations until they can be |
|
263 |
done in a second batch pass. If the information is already present, it is still |
|
264 |
encouraged that implementations return the correct values. |
|
265 |
|
|
256 | 266 |
=back |
257 | 267 |
|
268 |
|
|
258 | 269 |
=head1 SEE ALSO |
259 | 270 |
|
260 | 271 |
L<SL::PriceSource::Base>, |
SL/PriceSource/Base.pm | ||
---|---|---|
4 | 4 |
|
5 | 5 |
use parent qw(SL::DB::Object); |
6 | 6 |
use Rose::Object::MakeMethods::Generic ( |
7 |
scalar => [ qw(record_item record) ], |
|
7 |
scalar => [ qw(record_item record fast) ],
|
|
8 | 8 |
); |
9 | 9 |
|
10 | 10 |
sub name { die 'name needs to be implemented' } |
Auch abrufbar als: Unified diff
PriceSource: fast Flag für zukünftige Performanceoptimierungen