use strict; use warnings; use Foo; use CGI qw/:standard/; my $q = CGI->new( { foo => 'bar', baz => 'Ovid' } ); my $foo = Foo->new; print $foo->list_params( 1 ); print $foo->list_params( $q );