[Bps-public-commit] r14405 - in Prophet/trunk: .
sartak at bestpractical.com
sartak at bestpractical.com
Tue Jul 22 21:55:51 EDT 2008
Author: sartak
Date: Tue Jul 22 21:55:49 2008
New Revision: 14405
Modified:
Prophet/trunk/ (props changed)
Prophet/trunk/lib/Prophet/CLI/Command/Search.pm
Prophet/trunk/lib/Prophet/CLI/Command/Show.pm
Log:
r64764 at onn: sartak | 2008-07-22 21:55:22 -0400
Add a (temporary) --html argument to show, for testing
Modified: Prophet/trunk/lib/Prophet/CLI/Command/Search.pm
==============================================================================
--- Prophet/trunk/lib/Prophet/CLI/Command/Search.pm (original)
+++ Prophet/trunk/lib/Prophet/CLI/Command/Search.pm Tue Jul 22 21:55:49 2008
@@ -59,6 +59,7 @@
$self->$display_method($records);
}
+# XXX: this should go away once we have publish-as-html
sub display_html {
my $self = shift;
my $records = shift;
Modified: Prophet/trunk/lib/Prophet/CLI/Command/Show.pm
==============================================================================
--- Prophet/trunk/lib/Prophet/CLI/Command/Show.pm (original)
+++ Prophet/trunk/lib/Prophet/CLI/Command/Show.pm Tue Jul 22 21:55:49 2008
@@ -8,11 +8,20 @@
my $self = shift;
my $record = $self->_load_record;
- print $self->stringify_props(
- record => $record,
- batch => $self->has_arg('batch'),
- verbose => $self->has_arg('verbose'),
- );
+
+ # XXX: this should go away once we have publish-as-html
+ if ($self->has_arg('html')) {
+ require Prophet::Server::View;
+ Template::Declare->init(roots => ['Prophet::Server::View']);
+ print Template::Declare->show('record' => $record);
+ }
+ else {
+ print $self->stringify_props(
+ record => $record,
+ batch => $self->has_arg('batch'),
+ verbose => $self->has_arg('verbose'),
+ );
+ }
}
=head2 stringify_props
More information about the Bps-public-commit
mailing list