File: TODO

package info (click to toggle)
libcgi-validop-perl 0.56-1
  • links: PTS, VCS
  • area: main
  • in suites: jessie, jessie-kfreebsd, squeeze, wheezy
  • size: 500 kB
  • ctags: 251
  • sloc: perl: 4,804; makefile: 7
file content (72 lines) | stat: -rw-r--r-- 1,776 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
now
---
lowercase all ops automatically
checks shouldn't have to be under CGI::ValidOp::Check
checks should be found locally on the filesystem
decide:
    new({
        -config
        param/op
    })
    OR
    new({
        config
        params/ops => { param/op }
    })

file upload
-----------
use CGI qw/ -private_tempfiles /;
- or -
CGI::private_tempfiles(1);

<form enctype="multipart/form-data">
    - test with: application/x-www-form-urlencoded
check cgi_error
size and type per file?
cgi->upload (new in 2.47)


    $fh = upload('uploaded_file');
    while (<$fh>) {
        print;
    }

    $filename = param('uploaded_file');
    $type = uploadInfo($filename)->{'Content-Type'};
    unless ($type eq 'text/html') {
        die "HTML FILES ONLY!";
    }


    my $handler = CGI::Untaint->new( map { $_ => $cgi->param($_) } $cgi->param);
    # NOT my $handler = CGI::Untaint->new( $cgi->Vars ); !
    # It's important that you use CGI->param rather than CGI->Vars as the latter
    # only returns the uploaded file's name and not its contents.


maybe
-----
make ::Param->{ errors } a hashref -- ::Param
warnings, add_error, errors -- in ::Base?
find a better way to pass around error_decoration

later
-----
auto-vivify ops? -- ValidOp::add_param


done
----
better parsing of incoming params -- ValidOp::add_param
better error message if require fails -- ::Param::load_pkg
setting 'op' should also create Op object -- ValidOp::op
needs 'name' method -- ::Base
needs 'param' method -- ::Op
needs 'Param' method -- ::Op
needs 'params' method -- ::Op (note is in ValidOp)
needs 'Params' method -- ::Op (note is in ValidOp)
allow_unexpected -- ValidOp::make_params
ValidOp::Vars
ValidOp::errors
make 'default' a variable instead of hardcoded -- ::Param::check_one