Up to [Local Repository] / interchange / lib / Vend
Request diff between arbitrary revisions
Keyword substitution: kv
Default branch: MAIN
* Updated copyright headers to 2007 (closes bug #102) * Added GPL and copyright headers to a few files that were missing them.
New Free Software Foundation Address in headers of various files
New Free Software Foundation Address in headers of various files
Remove some duplicate glob assignments for subroutines in other modules. To do this easily, I did "expand -t4" and "LC_ALL=C sort -u".
* We had been running without warnings so long, we had gotten a bit sloppy
in our code in some places.
Because we do lots of uninitialized hash member stuff with arrays
of fields and $opt, it is basically unreasonable for us to run with
the "use of uninitialized variable" warnings. Because we do a fair
amount of numerical comparisons on empty string values, it seemed
unreasonable to run with "string value in numeric gt" enabled.
Also, because Safe, HTML::Entities, and some other modules have
these checks enabled, page code is bound to have warnings issued
no matter what you do.
It seems better to run with some warnings enabled so that we can
catch bad code practice.
So I have made the code run without warnings prior to and after
interpolate_html(), and turned off warnings by default in the
page code.
If it is desirable to turn on warnings for pages, you can use
[pragma perl_warnings_in_page] and see warnings for that page
(or by default if you put in catalog.cfg).
* In general these changes are:
no warnings qw(uninitialized numeric);
in most pages.
* Add $::Pragma->{perl_warnings_in_page}.
* Remove defined checks when simple set tests will do.
* Streamline some code.
* Make filtering previous searches easier.
Before this, you had to create your own reference and somehow
pass it to the search object, and you had to provide your own
field names.
This patch assumes that if the called reference (re=foo) is
a scalar, it refers to $::Instance->{SearchObject}, which will
have the results of the last search.
So you can now do:
[loop
label=foo
search="
sf=prod_group
se=Hand Tools
rf=*
"
/]
<p>
Searching the reference...
</p>
[loop
search="
st=ref
re=foo
co=yes
sf=category
se=Shears
rf=*
"
]
[loop-param sku]<br>
<blockquote>
-- prod_group=[loop-param prod_group]<br>
-- cat=[loop-param category]<br>
-- description=[loop-param description] <br><br>
</blockquote>
[/loop]
I don't quite know why I didn't do this before -- probably I had completed
what I wanted to do and never set it up to be used generally.
TODO: Make it work for queries as a source, too.
The great copyright, email address, URL, and version update.
updated LINUXIA branch to 4.9 sources in order to use it as testbed again
* Get rid of mv_range_look check now that it will be deprecated and removed from docs.
Added handling for mv_max_matches.
Add option to disable matchlimit entirely, with ml=all or ml=none. Allow default of 50 to be changed in catalog variable MV_DEFAULT_MATCHLIMIT.
Big copyright date update. This will be the last time that Red Hat copyright notices get updated en masse, since the bulk of new code will very likely come from non-Red Hat employees.
* Add new mv_next_search, which allows filtering searches
through another search after the first one returns
some rows.
* Add search_reference() method to Search.pm
* Add st=ref to allow searching of an array of arrays with
an IC search -- I would not think it too useful but this
type of thing has been requested
* New Vend::RefSearch actually does the search
* Search is passed by setting in a scratch variable right now,
suggestions on how to better pass it are appreciated
* A small test will be posted to core list.