Text::Markdown::Discount
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

99 lines
2.0 KiB

16 years ago
16 years ago
16 years ago
16 years ago
16 years ago
16 years ago
16 years ago
16 years ago
  1. package Text::Markdown::PegMarkdown;
  2. use 5.008000;
  3. use strict;
  4. use warnings;
  5. require Exporter;
  6. our @ISA = qw(Exporter);
  7. our %EXPORT_TAGS = ( 'all' => [ qw(
  8. markdown
  9. ) ] );
  10. our @EXPORT_OK = ( @{ $EXPORT_TAGS{'all'} } );
  11. our @EXPORT = qw(
  12. );
  13. our $VERSION = '0.01';
  14. require XSLoader;
  15. XSLoader::load('Text::Markdown::PegMarkdown', $VERSION);
  16. sub new {
  17. return bless {}, 'Text::Markdown::PegMarkdown';
  18. }
  19. sub markdown {
  20. my ($self, $text) = @_;
  21. # Detect functional mode, and create an instance for this run..
  22. unless (ref $self) {
  23. if ( $self ne __PACKAGE__ ) {
  24. my $ob = __PACKAGE__->new();
  25. # $self is text, $text is options
  26. return $ob->markdown($self, $text);
  27. }
  28. else {
  29. croak('Calling ' . $self . '->markdown (as a class method) is not supported.');
  30. }
  31. }
  32. return _markdown($text);
  33. }
  34. 1;
  35. __END__
  36. # Below is stub documentation for your module. You'd better edit it!
  37. =head1 NAME
  38. Text::Markdown::PegMarkdown - Perl extension for blah blah blah
  39. =head1 SYNOPSIS
  40. use Text::Markdown::PegMarkdown;
  41. blah blah blah
  42. =head1 DESCRIPTION
  43. Stub documentation for Text::Markdown::PegMarkdown, created by h2xs. It looks like the
  44. author of the extension was negligent enough to leave the stub
  45. unedited.
  46. Blah blah blah.
  47. =head2 EXPORT
  48. None by default.
  49. =head1 SEE ALSO
  50. Mention other useful documentation such as the documentation of
  51. related modules or operating system documentation (such as man pages
  52. in UNIX), or any relevant external documentation such as RFCs or
  53. standards.
  54. If you have a mailing list set up for your module, mention it here.
  55. If you have a web site set up for your module, mention it here.
  56. =head1 AUTHOR
  57. Masayoshi Sekimura, E<lt>sekimura@E<gt>
  58. =head1 COPYRIGHT AND LICENSE
  59. Copyright (C) 2009 by Masayoshi Sekimura
  60. This library is free software; you can redistribute it and/or modify
  61. it under the same terms as Perl itself, either Perl version 5.10.0 or,
  62. at your option, any later version of Perl 5 you may have available.
  63. =cut