Commits

Shlomi Fish committed 2e14c35

Got t/boilerplate.t to succeed.

  • Participants
  • Parent commits cc294d9

Comments (0)

Files changed (6)

HTML-Widgets-NavMenu-ToJSON/Changes

 Revision history for HTML-Widgets-NavMenu-ToJSON
 
-0.01    Date/time
+0.01    TODO: FILL_IN
         First version, released on an unsuspecting world.
 

HTML-Widgets-NavMenu-ToJSON/README

 HTML-Widgets-NavMenu-ToJSON
 
-The README is used to introduce the module and provide instructions on
-how to install the module, any machine dependencies it may have (for
-example C compilers and installed libraries) and any other information
-that should be provided before the module is installed.
-
-A README file is required for CPAN modules since CPAN extracts the README
-file from a module distribution so that people browsing the archive
-can use it to get an idea of the module's uses. It is usually a good idea
-to provide version information here so that people can decide whether
-fixes for the module are worth downloading.
-
+This distribution converts the navigation menus of HTML-Widgets-NavMenu
+to JSON so they can be embedded in JavaScript code or transferred using an
+AJAX (XMLHttpRequest) call, 
 
 INSTALLATION
 

HTML-Widgets-NavMenu-ToJSON/lib/HTML/Widgets/NavMenu/ToJSON.pm

 
 =head1 NAME
 
-HTML::Widgets::NavMenu::ToJSON - The great new HTML::Widgets::NavMenu::ToJSON!
+HTML::Widgets::NavMenu::ToJSON - convert HTML::Widgets::NavMenu to JSON
 
 =head1 VERSION
 
-Version 0.01
+Version 0.0.1
 
 =cut
 
-our $VERSION = '0.01';
+our $VERSION = '0.0.1';
 
 
 =head1 SYNOPSIS
 
-Quick summary of what the module does.
+    use HTML::Widgets::NavMenu::ToJSON;
+    use HTML::Widgets::NavMenu::ToJSON::Data_Persistence::YAML;
 
-Perhaps a little code snippet.
+    my $persistence =
+        HTML::Widgets::NavMenu::ToJSON::Data_Persistence::YAML->new(
+            {
+                filename => '/path/to/persistence_data.yaml',
+            }
+        );
 
-    use HTML::Widgets::NavMenu::ToJSON;
+    my $obj = HTML::Widgets::NavMenu::ToJSON->new(
+        {
+            data_persistence_store => $persistence,
+            # The one given as input to HTML::Widgets::NavMenu
+            tree_contents => $tree_contents,
+        }
+    );
 
-    my $foo = HTML::Widgets::NavMenu::ToJSON->new();
-    ...
+    use IO::All;
 
-=head1 EXPORT
-
-A list of functions that can be exported.  You can delete this section
-if you don't export anything, such as for a purely object-oriented module.
+    io->file('output.json')->println(
+        $obj->output_as_json(
+            {
+                %args
+            }
+        )
+    );
 
 =head1 SUBROUTINES/METHODS
 
-=head2 function1
-
-=cut
-
-sub function1 {
-}
-
-=head2 function2
-
-=cut
-
-sub function2 {
-}
-
 =head1 AUTHOR
 
 Shlomi Fish, C<< <shlomif at cpan.org> >>
 the web interface at L<http://rt.cpan.org/NoAuth/ReportBug.html?Queue=HTML-Widgets-NavMenu-ToJSON>.  I will be notified, and then you'll
 automatically be notified of progress on your bug as I make changes.
 
-
-
-
 =head1 SUPPORT
 
 You can find documentation for this module with the perldoc command.

HTML-Widgets-NavMenu-ToJSON/lib/HTML/Widgets/NavMenu/ToJSON/Data_Persistence.pm

 
 =head1 NAME
 
-HTML::Widgets::NavMenu::ToJSON::Data_Persistence - The great new HTML::Widgets::NavMenu::ToJSON::Data_Persistence!
+HTML::Widgets::NavMenu::ToJSON::Data_Persistence - Data persistence base class.
 
 =head1 VERSION
 
-Version 0.01
+Version 0.0.1
 
 =cut
 
-our $VERSION = '0.01';
+our $VERSION = '0.0.1';
 
 
 =head1 SYNOPSIS
 
-Quick summary of what the module does.
-
-Perhaps a little code snippet.
+See L<HTML::Widgets::NavMenu::ToJSON> .
 
     use HTML::Widgets::NavMenu::ToJSON::Data_Persistence;
 
     my $foo = HTML::Widgets::NavMenu::ToJSON::Data_Persistence->new();
     ...
 
-=head1 EXPORT
-
-A list of functions that can be exported.  You can delete this section
-if you don't export anything, such as for a purely object-oriented module.
-
 =head1 SUBROUTINES/METHODS
 
-=head2 function1
-
-=cut
-
-sub function1 {
-}
-
-=head2 function2
-
-=cut
-
-sub function2 {
-}
-
 =head1 AUTHOR
 
 Shlomi Fish, C<< <shlomif at cpan.org> >>

HTML-Widgets-NavMenu-ToJSON/lib/HTML/Widgets/NavMenu/ToJSON/Data_Persistence/YAML.pm

 
 =head1 NAME
 
-HTML::Widgets::NavMenu::ToJSON::Data_Persistence::YAML - The great new HTML::Widgets::NavMenu::ToJSON::Data_Persistence::YAML!
+HTML::Widgets::NavMenu::ToJSON::Data_Persistence::YAML - YAML-based persistence
+for L<HTML::Widgets::NavMenu::ToJSON> .
 
 =head1 VERSION
 
-Version 0.01
+Version 0.0.1
 
 =cut
 
-our $VERSION = '0.01';
+our $VERSION = '0.0.1';
 
 
 =head1 SYNOPSIS
 
-Quick summary of what the module does.
-
-Perhaps a little code snippet.
-
-    use HTML::Widgets::NavMenu::ToJSON::Data_Persistence::YAML;
-
-    my $foo = HTML::Widgets::NavMenu::ToJSON::Data_Persistence::YAML->new();
-    ...
-
-=head1 EXPORT
-
-A list of functions that can be exported.  You can delete this section
-if you don't export anything, such as for a purely object-oriented module.
+    TODO: Write something.
 
 =head1 SUBROUTINES/METHODS
 
-=head2 function1
-
-=cut
-
-sub function1 {
-}
-
-=head2 function2
-
-=cut
-
-sub function2 {
-}
-
 =head1 AUTHOR
 
 Shlomi Fish, C<< <shlomif at cpan.org> >>

HTML-Widgets-NavMenu-ToJSON/t/boilerplate.t

 }
 
 TODO: {
-  local $TODO = "Need to replace the boilerplate text";
+  # local $TODO = "Need to replace the boilerplate text";
 
   not_in_file_ok(README =>
     "The README is used..."       => qr/The README is used/,