Download Padre

Remote Editing

Description

This feature has a partial implementation and it needs a better description how it should work.

Remote editing via FTP (#12), HTTP, SSH and other protocols

Use File -> Open... -> Open URL to open a remote file.

Examples of valid URLs:

Some parts have special behavior depending on the URL type. Example: The file-refreshed-on-disk check is done less often.

Current state

HTTP

  • Currently read-only

FTP

  • Read/Write access
  • Supports anonymous ftp
  • Supports authenticated ftp (username/password)

SSH

(Need to check)

Test

Automated tests are in t/94.padre-file-remote.t but you have to set the environment variable PADRE_NETWORK_T to true to enable them.

Manual test: Open the following URLs with File -> Open... -> Open URL:

  • http://www.google.com (Should give you the HTML source of the Google homepage)
  • http://padre.perlide.org/trac/browser/trunk/Padre/Makefile.PL?format=txt
    • Should open the Padre Makefile.PL
    • Should be discovered as Perl source (see status bar)

TODO

  • Build a better UI for the open dialog
    • Good example: VLC open dialog with different tab's for each supported protocol (source for vlc)
  • Convert all Padre disk i/o to use Padre::File
  • Find a solution for syntax check and "run file"
    • A file edited over SSH could be checked/run at the remote server
    • HTTP/FTP don't easily support run, but FTP files might be run-able via HTTP (CGI scripts)

Related

Padre::Plugin::ReDevel - remote development through SSH