Skip to content

Commit

Permalink
Added more docs
Browse files Browse the repository at this point in the history
  • Loading branch information
miyagawa committed Aug 13, 2008
1 parent 843e5ce commit 4a4afcc
Showing 1 changed file with 13 additions and 1 deletion.
14 changes: 13 additions & 1 deletion lib/Web/oEmbed.pm
Expand Up @@ -154,7 +154,9 @@ oEmbed provider endpoint and parse the response. The method returns an
instance of Web::oEmbed::Response.
Returns undef if there's no provider found for the URL. Throws an
error if there's an error in JSON/XML parsing etc.
error if there's an error in JSON/XML parsing etc. (Note: I don't like
this interface because there's no cleaner way to handle and diagnose
errors. This might be changed.)
C<format> optional parameter specifies which C<format> is sent to the
provider as a prefered format parameter. When omitted, the default
Expand Down Expand Up @@ -228,6 +230,16 @@ or C<rich> response.
=back
=head1 TODO
Currently if you register 100 providers, the I<embed> method could
potentially iterate through all of providers to run the regular
expression, which doesn't sound good. I guess we could come up with
some Trie-ish regexp solution that immediately returns the
correspondent provider by compiling all regular expressions into one.
Patches are welcome on this :)
=head1 COPYRIGHT
Six Apart, Ltd. E<lt>cpan@sixapart.comE<gt>
Expand Down

0 comments on commit 4a4afcc

Please sign in to comment.